diff --git a/app_win_2_back.cpp b/app_win_2_back.cpp index 334ba9e..ff5dac1 100644 --- a/app_win_2_back.cpp +++ b/app_win_2_back.cpp @@ -75,27 +75,29 @@ namespace gui_to_app { const auto test_result = [this]() -> std::vector { 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 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 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 \ No newline at end of file +} // gui_to_app