forked from mia/Aegisub
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:
parent
561216d4c8
commit
330411c94a
1 changed files with 14 additions and 5 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue