From ea18d1ca57c50996609b491afdc2c0b6357ab0c0 Mon Sep 17 00:00:00 2001 From: blankie Date: Mon, 9 Jan 2023 14:56:24 +0700 Subject: [PATCH] Do not create an exception for debug logging --- event_loop.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/event_loop.cpp b/event_loop.cpp index 45e2627..d859ae4 100644 --- a/event_loop.cpp +++ b/event_loop.cpp @@ -110,8 +110,7 @@ static inline void debug_window() { ImGui::Separator(); if (ImGui::Button("Add Log Entry")) { - std::exception e; - log(std::string("Debug log entry #") + std::to_string(add_log_entry_presses++) + " (activated via manual button press)", e); + log(std::string("Debug log entry #") + std::to_string(add_log_entry_presses++) + " (activated via manual button press)"); } ImGui::SameLine(); // returns true when it's pressed @@ -121,9 +120,8 @@ static inline void debug_window() { if (log_entry_every_second) { log_entry_every_second_delta += ImGui::GetIO().DeltaTime; if (log_entry_every_second_delta >= 1.0f) { - std::exception e; log_entry_every_second_delta = 0.0f; - log(std::string("Debug log entry #") + std::to_string(add_log_entry_presses++) + " (activated by add log entry every second)", e); + log(std::string("Debug log entry #") + std::to_string(add_log_entry_presses++) + " (activated by add log entry every second)"); } }