D27965: [KPasswdServer] replace foreach with range/index-based for
Aleix Pol Gonzalez
noreply at phabricator.kde.org
Tue Mar 10 21:20:59 GMT 2020
apol added a comment.
Having the iterated value change under the hood will eventually break. I'd suggest preferring QList::erase to QList::removeOne.
INLINE COMMENTS
> kpasswdserver.cpp:648
> + static_cast<qulonglong>(time(nullptr)) > current->expireTime) {
> authList->removeOne(current);
> delete current;
Use erase.
> kpasswdserver.cpp:682
> {
> authList->removeOne(current);
> delete current;
Use erase.
REPOSITORY
R241 KIO
BRANCH
l-kpasswdserver (branched from master)
REVISION DETAIL
https://phabricator.kde.org/D27965
To: ahmadsamir, #frameworks, dfaure, meven
Cc: apol, kde-frameworks-devel, LeGast00n, cblack, GB_2, michaelh, ngraham, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20200310/d22cf11b/attachment.html>
More information about the Kde-frameworks-devel
mailing list