From 64531a0f81556c7e30eb2d2f8ad40db99772dd8d Mon Sep 17 00:00:00 2001 From: Nanako <00sh.chiha+github@gmail.com> Date: Wed, 3 Aug 2022 17:35:34 +0900 Subject: [PATCH] Update AnimationChanger.cpp --- .../src/user/cheat/visuals/AnimationChanger.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/cheat-library/src/user/cheat/visuals/AnimationChanger.cpp b/cheat-library/src/user/cheat/visuals/AnimationChanger.cpp index 2b61f77..2b77708 100644 --- a/cheat-library/src/user/cheat/visuals/AnimationChanger.cpp +++ b/cheat-library/src/user/cheat/visuals/AnimationChanger.cpp @@ -245,12 +245,11 @@ namespace cheat::feature { if (ImGui::BeginCombo("Animations", f_Animation.value().c_str())) { - for (int n = 0; n < IM_ARRAYSIZE(animations); n++) + for (auto &animation : animations) { - bool is_selected = (f_Animation.value().c_str() == animations[n]); - if (ImGui::Selectable(animations[n].c_str(), is_selected)) - f_Animation.value() = animations[n]; - + bool is_selected = (f_Animation.value().c_str() == animation); + if (ImGui::Selectable(animation.c_str(), is_selected)) + f_Animation.value() = animation; if (is_selected) ImGui::SetItemDefaultFocus(); }