Add some special cases to line_iterator that makes it significantly faster in common cases

Originally committed to SVN as r5534.
This commit is contained in:
Thomas Goyne 2011-08-17 05:32:01 +00:00
parent 561216d4c8
commit 330411c94a

View file

@ -191,12 +191,21 @@ void line_iterator<OutputType>::next() {
valid = false;
return;
}
std::string str;
getline(str);
if (conv.get()) {
str = conv->Convert(str);
std::string str, cstr, *target;
if (width == 1) {
std::getline(*stream, str);
}
if (!convert(str)) {
else {
getline(str);
}
if (conv.get()) {
conv->Convert(str, cstr);
target = &cstr;
}
else {
target = &str;
}
if (!convert(*target)) {
next();
return;
}