From dce53b4989a351749dd356cbcbb3f21fcc9fbc71 Mon Sep 17 00:00:00 2001 From: Mirek Fidler Date: Fri, 31 Jan 2025 09:35:55 +0100 Subject: [PATCH] .cosmetics --- reference/AnimateCtrlGeometry/main.cpp | 3 +-- uppsrc/CtrlLib/CtrlUtil.cpp | 8 ++++---- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/reference/AnimateCtrlGeometry/main.cpp b/reference/AnimateCtrlGeometry/main.cpp index 7ba532445..96edc5ca0 100644 --- a/reference/AnimateCtrlGeometry/main.cpp +++ b/reference/AnimateCtrlGeometry/main.cpp @@ -13,7 +13,7 @@ struct AnimateCtrlGeometry : TopWindow { CenterScreen().SetRect(0,0, 400, 200); - for(int row = 0, i = 0; row < 2; row++) { + for(int row = 0; row < 2; row++) { for(int col = 0; col < 4; col++) { ColorPusher& bt = pushers.Add(); bt <<= Color(Random(256), Random(256), Random(256)); @@ -25,7 +25,6 @@ struct AnimateCtrlGeometry : TopWindow { } SetTimeCallback(1000, [&]{ Animate(ctrls, targets, 300); }); - } }; diff --git a/uppsrc/CtrlLib/CtrlUtil.cpp b/uppsrc/CtrlLib/CtrlUtil.cpp index ca91b4dd2..a5199fbbf 100644 --- a/uppsrc/CtrlLib/CtrlUtil.cpp +++ b/uppsrc/CtrlLib/CtrlUtil.cpp @@ -72,13 +72,13 @@ void Animate(Event update, int duration) Ctrl::GuiSleep(0); } update(1); - } +} void Animate(Vector>& ctrls, const Vector& targets, int duration) { - Vector data; - for(const Ptr& c : ctrls) - data.Add(Nvl(c->GetRect(), {0, 0, 0, 0})); + Vector data; + for(const Ptr& c : ctrls) + data.Add(Nvl(c->GetRect(), {0, 0, 0, 0})); Animate(data, targets, [&] { for(int i = 0; i < ctrls.GetCount(); i++)