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.
This commit is contained in:
Jonathan Schoeller
2020-06-01 18:05:15 +10:00
parent 091cc4b94e
commit d15db4b1fc
3 changed files with 19 additions and 4 deletions

View File

@@ -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)