From b943891c240651b9a1ae3f95912251ce9674affe Mon Sep 17 00:00:00 2001 From: gir489 <100792176+gir489returns@users.noreply.github.com> Date: Sun, 12 Nov 2023 08:20:08 -0500 Subject: [PATCH] Refactored ImGui::Bitfield to use std::format. (#2410) --- src/widgets/imgui_bitfield.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/widgets/imgui_bitfield.hpp b/src/widgets/imgui_bitfield.hpp index 5fd23c35..6a121707 100644 --- a/src/widgets/imgui_bitfield.hpp +++ b/src/widgets/imgui_bitfield.hpp @@ -44,7 +44,7 @@ namespace ImGui { ImGui::PushStyleColor(ImGuiCol_Button, IM_COL32_BLACK_TRANS); ImGui::PushStyleColor(ImGuiCol_Text, IM_COL32(41, 134, 204, 255)); - if (ImGui::Button(std::string("1##").append(std::to_string(i)).append(name).c_str(), ImVec2(25, 0))) + if (ImGui::Button(std::format("1##{}{}", name, i).c_str(), ImVec2(25, 0))) { ret_val = true; *param ^= (1ULL << i); @@ -54,7 +54,7 @@ namespace ImGui else { ImGui::PushStyleColor(ImGuiCol_Button, IM_COL32_BLACK_TRANS); - if (ImGui::Button(std::string("0##").append(std::to_string(i)).append(name).c_str(), ImVec2(25, 0))) + if (ImGui::Button(std::format("0##{}{}", name, i).c_str(), ImVec2(25, 0))) { ret_val = true; *param ^= (1ULL << i);