Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
QIODevice: remove unneeded resize(1) in QIODevice::readLine()
AFAIU, the resize(1) was merely there to have result.size() return 1 in the initial iteration of the do loop. Since resize(1) is always followed by another unconditional resize() in the do-while loop, remove it and use "1 + readBytes" instead of result.size() in the follow-up resize() call inside the do loop. Saves one resize() call and the corresponding executable size and runtime overhead. Pick-to: 6.7 6.5 Change-Id: I507acab2a6b7d55217cd454ecbbaf1df0e1d18e6 Reviewed-by: Ivan Solovev <[email protected]> Reviewed-by: Marc Mutz <[email protected]> (cherry picked from commit d9579f0) Reviewed-by: Qt Cherry-pick Bot <[email protected]>
- Loading branch information