diff options
author | João Abecasis <joao@abecasis.name> | 2009-11-16 12:07:53 (GMT) |
---|---|---|
committer | João Abecasis <joao@abecasis.name> | 2009-11-17 13:00:51 (GMT) |
commit | 98a05681851db9d88b1364af52be543715fbe306 (patch) | |
tree | ea6822c15c8fee57288369cc5745616e63a88d84 /tools/qev | |
parent | d5eb850f8c2524aa5573bb4e672b195724e5b5ad (diff) | |
download | Qt-98a05681851db9d88b1364af52be543715fbe306.zip Qt-98a05681851db9d88b1364af52be543715fbe306.tar.gz Qt-98a05681851db9d88b1364af52be543715fbe306.tar.bz2 |
Fix QIODevice::getChar optimization
In Text mode there would be a huge penalty on each '\r' found even if
the internal buffer was not exhausted, because we would repeatedly
remove the '\r' from the buffer and put it back it. Before following
through to the unoptimized code, anyway.
Instead, we now loop over the internal buffer until we find a suitable
character.
Reduced code duplication by having QIODevice::getChar directly call
QIODevice::read and letting compilers do their job.
Reviewed-by: Markus Goetz
Diffstat (limited to 'tools/qev')
0 files changed, 0 insertions, 0 deletions