Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit a775d66b authored by Laurent Montel's avatar Laurent Montel 😁

Minor optimization

parent e00945b8
......@@ -182,7 +182,7 @@ void SignJob::process()
<< "=2D";
if (d->content->contentTransferEncoding()->encoding() == KMime::Headers::CE7Bit) {
for (int i = 0; i < search.size(); ++i) {
for (int i = 0, total = search.size(); i < total; ++i) {
const auto pos = body.indexOf(search[i]);
if (pos == 0 || (pos > 0 && body.at(pos - 1) == '\n')) {
changed = true;
......
......@@ -1038,7 +1038,7 @@ KMime::Message::Ptr NodeHelper::unencryptedMessage(const KMime::Message::Ptr &or
QVector<KMime::Content *> NodeHelper::attachmentsOfExtraContents() const
{
QVector<KMime::Content *> result;
for (auto it = mExtraContents.begin(); it != mExtraContents.end(); ++it) {
for (auto it = mExtraContents.begin(), end = mExtraContents.end(); it != end; ++it) {
foreach (auto content, it.value()) {
if (KMime::isAttachment(content)) {
result.push_back(content);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment