diff options
| author | hachem <im@hachem.wtf> | 2026-08-20 02:05:45 +0200 |
|---|---|---|
| committer | hachem <im@hachem.wtf> | 2026-08-20 02:18:50 +0200 |
| commit | 0802ee19573e880e319a61ae814ee42c01e28cd3 (patch) | |
| tree | 76d279402ea8ff3d209296192f6ac0d572798c9d /src/states/config_state.cpp | |
| parent | 7d39ee93a6d354e727c7534a18663f1d00d46b0f (diff) | |
refactor: trailing return types in engine and states
Diffstat (limited to 'src/states/config_state.cpp')
| -rw-r--r-- | src/states/config_state.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/states/config_state.cpp b/src/states/config_state.cpp index 4573aab..d5fca87 100644 --- a/src/states/config_state.cpp +++ b/src/states/config_state.cpp @@ -10,7 +10,7 @@ namespace Donut { - void ConfigState::on_enter() + auto ConfigState::on_enter() -> void { DONUT_INFO("Entering Config State"); @@ -32,12 +32,12 @@ namespace Donut m_enable_anti_aliasing = settings.graphics.enable_anti_aliasing; } - void ConfigState::on_exit() + auto ConfigState::on_exit() -> void { DONUT_INFO("Exiting Config State"); } - void ConfigState::on_update(float delta_time) + auto ConfigState::on_update(float delta_time) -> void { if (m_show_restart_message) { @@ -50,17 +50,17 @@ namespace Donut } } - void ConfigState::on_render() + auto ConfigState::on_render() -> void { Renderer::set_clear_color({ 0.1f, 0.1f, 0.1f, 1.0f }); Renderer::clear(); } - void ConfigState::on_event(Event& event) + auto ConfigState::on_event(Event& event) -> void { } - void ConfigState::on_im_ui_render() + auto ConfigState::on_im_ui_render() -> void { ImGui::SetNextWindowSize(ImVec2(900, 700), ImGuiCond_FirstUseEver); ImGui::SetNextWindowPos(ImVec2(ImGui::GetIO().DisplaySize.x * 0.5f, ImGui::GetIO().DisplaySize.y * 0.5f), @@ -258,7 +258,7 @@ namespace Donut ImGui::End(); } - void ConfigState::apply_settings() + auto ConfigState::apply_settings() -> void { SimulationSettings sim_settings; sim_settings.target_fps = m_target_fps; @@ -285,7 +285,7 @@ namespace Donut DONUT_INFO("Settings applied and saved"); } - void ConfigState::reset_to_defaults() + auto ConfigState::reset_to_defaults() -> void { m_selected_api = RendererAPI::API::OpenGL; m_target_fps = 60; |
