From 0802ee19573e880e319a61ae814ee42c01e28cd3 Mon Sep 17 00:00:00 2001 From: hachem Date: Thu, 20 Aug 2026 02:05:45 +0200 Subject: refactor: trailing return types in engine and states --- src/states/config_state.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/states/config_state.cpp') 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; -- cgit v1.3