Fix code-style issues

Fixed issues pointed out during review
This commit is contained in:
Christian Kieschnick authored and Janek Bevendorff committed 2018-01-23 00:57:04 +01:00
1 parent 943dc6cdd6
commit 258438f01f
6 files changed
+24 -24

No files matched your search

+5 -8
View File
@@ -153,16 +153,13 @@ bool EntryAttachments::operator!=(const EntryAttachments& other) const
return m_attachments != other.m_attachments;
}
int EntryAttachments::attachmentsSize(const QSet<QByteArray> &ignoredAttachments) const
int EntryAttachments::attachmentsSize(const QSet<QByteArray>& ignoredAttachments) const
{
int size = 0;
QMapIterator<QString, QByteArray> i(m_attachments);
while (i.hasNext()) {
i.next();
if( ! ignoredAttachments.contains( i.value() )){
size += i.key().toUtf8().size() + i.value().size();
}
for (auto it = m_attachments.constBegin(); it != m_attachments.constEnd(); ++it) {
if (!ignoredAttachments.contains(it.value())) {
size += it.key().toUtf8().size() + it.value().size();
}
}
return size;
}