From 32798196d81439fa77b34425b95eb47556aebc8d Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Wed, 25 Mar 2009 21:05:25 +0100 Subject: micro-optimization: don't evaluate same condition twice --- tools/linguist/shared/qm.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/linguist/shared/qm.cpp b/tools/linguist/shared/qm.cpp index 1534e3f..4627b5d 100644 --- a/tools/linguist/shared/qm.cpp +++ b/tools/linguist/shared/qm.cpp @@ -650,6 +650,8 @@ static bool saveQM(const Translator &translator, QIODevice &dev, ConversionData ++untranslated; continue; } else { + if (cd.ignoreUnfinished()) + continue; ++unfinished; } } else { @@ -660,7 +662,6 @@ static bool saveQM(const Translator &translator, QIODevice &dev, ConversionData QString comment = msg.comment(); QStringList translations = msg.translations(); - if (!cd.ignoreUnfinished() || typ != TranslatorMessage::Unfinished) { /* Drop the comment in (context, sourceText, comment), unless the context is empty, @@ -680,7 +681,6 @@ static bool saveQM(const Translator &translator, QIODevice &dev, ConversionData //filename and lineNumbers will be ignored from now. releaser.insert(tm); } - } } } -- cgit v0.12