D24308: [DataProtocol] compile without implicit coversion from ascii
David Faure
noreply at phabricator.kde.org
Tue Oct 1 10:50:17 BST 2019
dfaure requested changes to this revision.
dfaure added inline comments.
This revision now requires changes to proceed.
INLINE COMMENTS
> dataprotocol.cpp:120
> {
> - int size = buf.length();
> - while (pos < size && buf[pos].isSpace()) {
> + const QString &str = QString::fromLatin1(buf);
> + int size = str.length();
It would be faster to keep a QByteArray here and just compare to ' ' and possibly \t.
> dataprotocol.cpp:196
> // jump over delimiter token and return if data reached
> - if (raw_url[header_info.data_offset++] == QLatin1Char(',')) {
> + if (QLatin1Char(raw_url[header_info.data_offset++]) == QLatin1Char(',')) {
> return header_info;
Better remove both QLatin1Char and just compare chars.
> dataprotocol.cpp:206
> if (header_info.data_offset >= raw_url_len
> - || raw_url[header_info.data_offset] != QLatin1Char('=')) {
> + || QLatin1Char(raw_url[header_info.data_offset]) != QLatin1Char('=')) {
> // no assignment, must be base64 option
Same here, and more that follow
REPOSITORY
R241 KIO
REVISION DETAIL
https://phabricator.kde.org/D24308
To: ahmadsamir, dfaure
Cc: kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20191001/3fcce3c0/attachment-0001.html>
More information about the Kde-frameworks-devel
mailing list