Use C strings in position_iterator.

Copying std::string in position_iterator was taking up a lot of
execution time.

[SVN r65104]
This commit is contained in:
Daniel James
2010-08-29 11:20:57 +00:00
parent dd52f1cd29
commit 4fb6a45290
5 changed files with 65 additions and 31 deletions

View File

@@ -248,9 +248,8 @@ namespace quickbook
if (err != 0)
return err; // return early on error
typedef position_iterator<std::string::const_iterator> iterator_type;
iterator_type first(code.begin(), code.end(), file);
iterator_type last(code.end(), code.end());
iterator first(code.begin(), code.end(), file.c_str());
iterator last(code.end(), code.end());
size_t fname_len = file.size();
bool is_python = fname_len >= 3