Reformat
This commit is contained in:
parent
abf68d7ad3
commit
124f15c213
@ -75,27 +75,29 @@ namespace gui_to_app {
|
||||
|
||||
const auto test_result = [this]() -> std::vector<const char *> {
|
||||
const std::array test_ptrs{
|
||||
std::pair{ "sword_switch", sword_switch == nullptr },
|
||||
std::pair{ "lance_switch", lance_switch == nullptr },
|
||||
std::pair{ "morgen_switch", morgen_switch == nullptr },
|
||||
std::pair{ "bow_switch", bow_switch == nullptr },
|
||||
std::pair{ "chainmail_switch", chainmail_switch == nullptr },
|
||||
std::pair{ "cookpot_switch", cookpot_switch == nullptr },
|
||||
std::pair{ "pamphlet_switch", pamphlet_switch == nullptr },
|
||||
std::pair{ "medkit_switch", medkit_switch == nullptr },
|
||||
std::pair{ "fourche_switch", fourche_switch == nullptr },
|
||||
std::pair{ "dagger_switch", dagger_switch == nullptr },
|
||||
std::pair{ "rock_kit_switch", rock_kit_switch == nullptr },
|
||||
std::pair{ "sack_switch", sack_switch == nullptr },
|
||||
std::pair{ "sword_switch", sword_switch == nullptr },
|
||||
std::pair{ "lance_switch", lance_switch == nullptr },
|
||||
std::pair{ "morgen_switch", morgen_switch == nullptr },
|
||||
std::pair{ "bow_switch", bow_switch == nullptr },
|
||||
std::pair{ "chainmail_switch", chainmail_switch == nullptr },
|
||||
std::pair{ "cookpot_switch", cookpot_switch == nullptr },
|
||||
std::pair{ "pamphlet_switch", pamphlet_switch == nullptr },
|
||||
std::pair{ "medkit_switch", medkit_switch == nullptr },
|
||||
std::pair{ "fourche_switch", fourche_switch == nullptr },
|
||||
std::pair{ "dagger_switch", dagger_switch == nullptr },
|
||||
std::pair{ "rock_kit_switch", rock_kit_switch == nullptr },
|
||||
std::pair{ "sack_switch", sack_switch == nullptr },
|
||||
};
|
||||
std::vector<const char *> test_result;
|
||||
test_result.reserve(test_ptrs.size());
|
||||
std::for_each(test_ptrs.cbegin(), test_ptrs.cend(), [&test_result](const auto &a) {
|
||||
if (a.second) {
|
||||
test_result.emplace_back(a.first);
|
||||
}
|
||||
});
|
||||
return test_result;
|
||||
std::vector<const char *> local_test_result;
|
||||
local_test_result.reserve(test_ptrs.size());
|
||||
std::for_each(test_ptrs.cbegin(),
|
||||
test_ptrs.cend(),
|
||||
[&local_test_result](const auto &a) {
|
||||
if (a.second) {
|
||||
local_test_result.emplace_back(a.first);
|
||||
}
|
||||
});
|
||||
return local_test_result;
|
||||
}();
|
||||
if (!test_result.empty()) {
|
||||
spdlog::critical("Error occurred, at least one switch is not available. See logs below");
|
||||
@ -115,5 +117,4 @@ namespace gui_to_app {
|
||||
}
|
||||
quit();
|
||||
}
|
||||
|
||||
} // gui_to_app
|
||||
} // gui_to_app
|
||||
|
Loading…
Reference in New Issue
Block a user