aboutsummaryrefslogtreecommitdiff
path: root/src/util
diff options
context:
space:
mode:
authorJonathan Schoeller <jonathan.schoeller@rea-group.com>2020-06-01 18:05:15 +1000
committerJonathan Schoeller <jonathan.schoeller@rea-group.com>2020-06-02 06:20:04 +1000
commitd15db4b1fc988736b08c092d000ca1d1ff686975 (patch)
tree9b223f81d2a0deca3d8082216a00ddb13608d93c /src/util
parent091cc4b94e009f7140493cd37798d447c6881e5e (diff)
refactor: Fix unreachable code in init arg checks
Building with -Wunreachable-code-loop-increment causes a warning due to always returning on the first iteration of the loop that outputs errors on invalid args. Collect all errors, and output them in a single error message after the loop completes, resolving the warning and avoiding popup hell by outputting a seperate message for each error.
Diffstat (limited to 'src/util')
-rw-r--r--src/util/translation.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/util/translation.h b/src/util/translation.h
index 268bcf30a7..695d6dac96 100644
--- a/src/util/translation.h
+++ b/src/util/translation.h
@@ -23,6 +23,11 @@ struct bilingual_str {
translated += rhs.translated;
return *this;
}
+
+ bool empty() const
+ {
+ return original.empty();
+ }
};
inline bilingual_str operator+(bilingual_str lhs, const bilingual_str& rhs)