diff options
| author | Jonathan Schoeller <[email protected]> | 2020-06-01 18:05:15 +1000 |
|---|---|---|
| committer | Jonathan Schoeller <[email protected]> | 2020-06-02 06:20:04 +1000 |
| commit | d15db4b1fc988736b08c092d000ca1d1ff686975 (patch) | |
| tree | 9b223f81d2a0deca3d8082216a00ddb13608d93c /src/util | |
| parent | Merge #16564: test: Always define the raii_event_tests test suite (diff) | |
| download | discoin-d15db4b1fc988736b08c092d000ca1d1ff686975.tar.xz discoin-d15db4b1fc988736b08c092d000ca1d1ff686975.zip | |
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.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/util/translation.h b/src/util/translation.h index 268bcf30a..695d6dac9 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) |