Fix compile: replace foreach with std::remove_if + erase
Instead of using a foreach which operates on a copy and then mutates the original list, use idiomatic C++ with std::remove_if and erase. Fixes compile error now that foreach is disallowed: kidentitymanagement/src/signature.cpp: In member function ‘void KIdentityManagement::SignaturePrivate::cleanupImages()’: kidentitymanagement/src/signature.cpp:194:18: error: expected primary-expression before ‘const’ foreach (const Signature::EmbeddedImagePtr &imageInList, embeddedImages) { //Don't use for(...:...) here.
parent
f6a61093
Please register or sign in to comment