Do not create an exception for debug logging

This commit is contained in:
blankie 2023-01-09 14:56:24 +07:00
parent 85b0d7b8d4
commit ea18d1ca57
Signed by: blankie
GPG Key ID: CC15FC822C7F61F5
1 changed files with 2 additions and 4 deletions

View File

@ -110,8 +110,7 @@ static inline void debug_window() {
ImGui::Separator(); ImGui::Separator();
if (ImGui::Button("Add Log Entry")) { 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)");
log(std::string("Debug log entry #") + std::to_string(add_log_entry_presses++) + " (activated via manual button press)", e);
} }
ImGui::SameLine(); ImGui::SameLine();
// returns true when it's pressed // returns true when it's pressed
@ -121,9 +120,8 @@ static inline void debug_window() {
if (log_entry_every_second) { if (log_entry_every_second) {
log_entry_every_second_delta += ImGui::GetIO().DeltaTime; log_entry_every_second_delta += ImGui::GetIO().DeltaTime;
if (log_entry_every_second_delta >= 1.0f) { if (log_entry_every_second_delta >= 1.0f) {
std::exception e;
log_entry_every_second_delta = 0.0f; 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)");
} }
} }