Get rid of repeating if/else branches
Clang-tidy says repeating branches lead to bugs.
Change-Id: I20c2f5734606e4626d2ee5c2b53751c61f570b2b
diff --git a/tests/datastore_access.cpp b/tests/datastore_access.cpp
index 10b6a6f..b45f027 100644
--- a/tests/datastore_access.cpp
+++ b/tests/datastore_access.cpp
@@ -838,12 +838,15 @@
bool hasCities = false;
for (size_t i = 0; i < input->val_cnt(); ++i) {
const auto& val = input->val(i);
+ if (val->xpath() == nukes + "/payload") {
+ continue; // ignore, container
+ }
+ if (val->xpath() == nukes + "/description") {
+ continue; // unused
+ }
+
if (val->xpath() == nukes + "/payload/kilotons") {
kilotons = val->data()->get_uint64();
- } else if (val->xpath() == nukes + "/payload") {
- // ignore, container
- } else if (val->xpath() == nukes + "/description") {
- // unused
} else if (std::string_view{val->xpath()}.find(nukes + "/cities") == 0) {
hasCities = true;
} else {