Skip to content

Commit

Permalink
Remove [[maybe_unused]] (was needed because CLion Nova had a bug with…
Browse files Browse the repository at this point in the history
… highlighting)
  • Loading branch information
MunWolf committed Nov 25, 2023
1 parent 916f3c3 commit 13c4f95
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ namespace {
core::api::uber_states::UberState built_spirit_well(UberStateGroup::GladesProjects, 16825);
core::api::uber_states::UberState built_spirit_well_condition(42178, 3072);

[[maybe_unused]] auto on_game_ready = modloader::event_bus().register_handler(ModloaderEvent::GameReady, [](auto) {
auto on_game_ready = modloader::event_bus().register_handler(ModloaderEvent::GameReady, [](auto) {
randomizer::conditions::register_condition_intercept(
randomizer::conditions::ConditionType::VisibleOnWorldMap,
"swampIntroTop/artSetups/interactives/savePedestalSetup/savePedestalParent/savePedestal",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ namespace {
);
}

[[maybe_unused]] auto on_game_ready = modloader::event_bus().register_handler(ModloaderEvent::GameReady, [](auto) {
auto on_game_ready = modloader::event_bus().register_handler(ModloaderEvent::GameReady, [](auto) {
create_build_intercept(grom_spirit_well_built, "wellspringGladesHubSetups/interactives/builderProjects/spiritWellSetup");
create_build_intercept(grom_houses_a_built, "wellspringGladesHubSetups/interactives/builderProjects/mokiHutsSetup");
create_build_intercept(grom_houses_b_built, "wellspringGladesHubSetups/interactives/builderProjects/mokiHutsBSetup");
Expand Down
2 changes: 1 addition & 1 deletion projects/Randomizer/ipc/hierarchy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ namespace randomizer::ipc {
extern nlohmann::json visualize(void* obj, std::string name, bool verbose);

template <class...>
[[maybe_unused]] constexpr bool always_false = false;
constexpr bool always_false = false;

template <typename T>
nlohmann::json visualize_struct(std::string_view name, T const& value) {
Expand Down
20 changes: 10 additions & 10 deletions projects/Randomizer/timing/game_timer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -114,16 +114,16 @@ namespace randomizer::timing {
stats_mutex.unlock();
}

[[maybe_unused]] auto on_new_game = core::api::game::event_bus().register_handler(GameEvent::NewGame, EventTiming::Before, [](GameEvent event, EventTiming timing) {
auto on_new_game = core::api::game::event_bus().register_handler(GameEvent::NewGame, EventTiming::Before, [](GameEvent event, EventTiming timing) {
reset_stats();
loaded_any_save_file = true;
});

[[maybe_unused]] auto on_finished_loading = core::api::game::event_bus().register_handler(GameEvent::FinishedLoadingSave, EventTiming::Before, [](GameEvent event, EventTiming timing) {
auto on_finished_loading = core::api::game::event_bus().register_handler(GameEvent::FinishedLoadingSave, EventTiming::Before, [](GameEvent event, EventTiming timing) {
loaded_any_save_file = true;
});

[[maybe_unused]] auto on_create_checkpoint = core::api::game::event_bus().register_handler(GameEvent::CreateCheckpoint, EventTiming::Before, [](GameEvent event, EventTiming timing) {
auto on_create_checkpoint = core::api::game::event_bus().register_handler(GameEvent::CreateCheckpoint, EventTiming::Before, [](GameEvent event, EventTiming timing) {
if (!timer_should_run()) {
return;
}
Expand All @@ -133,7 +133,7 @@ namespace randomizer::timing {
stats_mutex.unlock();
});

[[maybe_unused]] auto on_respawn = core::api::game::event_bus().register_handler(GameEvent::Respawn, EventTiming::Before, [](GameEvent event, EventTiming timing) {
auto on_respawn = core::api::game::event_bus().register_handler(GameEvent::Respawn, EventTiming::Before, [](GameEvent event, EventTiming timing) {
if (!timer_should_run()) {
return;
}
Expand All @@ -143,7 +143,7 @@ namespace randomizer::timing {
stats_mutex.unlock();
});

[[maybe_unused]] auto on_teleport = core::api::game::event_bus().register_handler(GameEvent::Teleport, EventTiming::Before, [](GameEvent event, EventTiming timing) {
auto on_teleport = core::api::game::event_bus().register_handler(GameEvent::Teleport, EventTiming::Before, [](GameEvent event, EventTiming timing) {
if (!timer_should_run()) {
return;
}
Expand All @@ -153,7 +153,7 @@ namespace randomizer::timing {
stats_mutex.unlock();
});

[[maybe_unused]] auto on_death = core::api::death_listener::player_death_event_bus().register_handler(EventTiming::Before, [](auto, auto) {
auto on_death = core::api::death_listener::player_death_event_bus().register_handler(EventTiming::Before, [](auto, auto) {
if (!timer_should_run()) {
return;
}
Expand All @@ -165,7 +165,7 @@ namespace randomizer::timing {

float time_to_next_debug_print = 0.f;

[[maybe_unused]] auto on_fixed_update = core::api::game::event_bus().register_handler(GameEvent::FixedUpdate, EventTiming::After, [](auto, auto) {
auto on_fixed_update = core::api::game::event_bus().register_handler(GameEvent::FixedUpdate, EventTiming::After, [](auto, auto) {
// Only set these values when in game because the main menu sets some wonky states
if (GameStateMachine::get_IsGame()) {
game_finished.store(game_finished_uber_state.get<bool>());
Expand All @@ -183,7 +183,7 @@ namespace randomizer::timing {
timer_state_reporting_throttled_for -= TimeUtility::get_fixedDeltaTime();
});

[[maybe_unused]] auto on_async_update = core::events::async_update_bus().register_handler([](float delta) {
auto on_async_update = core::events::async_update_bus().register_handler([](float delta) {
if (!timer_should_run()) {
return;
}
Expand Down Expand Up @@ -215,7 +215,7 @@ namespace randomizer::timing {
}
});

[[maybe_unused]] auto uber_state_notify = core::api::uber_states::notification_bus().register_handler([](auto params) {
auto uber_state_notify = core::api::uber_states::notification_bus().register_handler([](auto params) {
if (params.state == game_finished_uber_state) {
stats_mutex.lock();
report_timer_state_to_external_services(save_stats->total_time, save_stats->get_total_loading_time(), false);
Expand All @@ -235,7 +235,7 @@ namespace randomizer::timing {
}
});

[[maybe_unused]] auto on_ready = modloader::event_bus().register_handler(ModloaderEvent::GameReady, [](auto){
auto on_ready = modloader::event_bus().register_handler(ModloaderEvent::GameReady, [](auto){
reset_stats();

core::ipc::register_request_handler("timer.get_stats", [](const nlohmann::json& j) {
Expand Down

0 comments on commit 13c4f95

Please sign in to comment.