summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <montel@kde.org>2016-10-17 05:44:32 (GMT)
committerMontel Laurent <montel@kde.org>2016-10-17 05:44:32 (GMT)
commit0fee5f264f540363be2766fbdc069531a404c263 (patch)
tree80932562f3f483a0199bcb1c7223c6cd10713202
parent1daedaa2ff26b2d79b4beb71fdeb25b04fd93a61 (diff)
Minor optimization
-rw-r--r--messagecomposer/autotests/messagefactorytest.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/messagecomposer/autotests/messagefactorytest.cpp b/messagecomposer/autotests/messagefactorytest.cpp
index 4fe05ff..5fdbd04 100644
--- a/messagecomposer/autotests/messagefactorytest.cpp
+++ b/messagecomposer/autotests/messagefactorytest.cpp
@@ -107,10 +107,12 @@ String very_simplistic_diff(const String &a, const String &b)
//qDebug( "result ( a@%d b@%d ):\n%s\n--end", ai, bi, result.constData() );
}
- for (int i = ai; i < al.size(); ++i) {
+ const int sizeal(al.size());
+ for (int i = ai; i < sizeal; ++i) {
result += "- " + al[i] + '\n';
}
- for (int i = bi; i < bl.size(); ++i) {
+ const int sizebl(bl.size());
+ for (int i = bi; i < sizebl; ++i) {
result += "+ " + bl[i] + '\n';
}
return result;