From 986084f3cd488f0b5c852350dd1afb4dd2582b84 Mon Sep 17 00:00:00 2001 From: scawful Date: Tue, 11 Mar 2025 15:45:09 -0400 Subject: [PATCH] Replace hardcoded separator with constexpr variable in menu drawing logic --- src/app/gui/input.cc | 2 +- src/app/gui/input.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/app/gui/input.cc b/src/app/gui/input.cc index 0f1999da..5a10a2ba 100644 --- a/src/app/gui/input.cc +++ b/src/app/gui/input.cc @@ -374,7 +374,7 @@ void DrawMenu(Menu& menu) { } ImGui::EndMenu(); } - } else if (each_item.name == "-") { + } else if (each_item.name == kSeparator) { ImGui::Separator(); } else { if (ImGui::MenuItem(each_item.name.c_str(), diff --git a/src/app/gui/input.h b/src/app/gui/input.h index 4ade0b00..fc5285d8 100644 --- a/src/app/gui/input.h +++ b/src/app/gui/input.h @@ -89,6 +89,8 @@ void DrawMenu(Menu ¶ms); static Menu kMainMenu; +constexpr std::string kSeparator = "-"; + } // namespace gui } // namespace yaze