From e7c285e3423ddd660447f6a6fc6bbae25f99f386 Mon Sep 17 00:00:00 2001 From: Thorbjørn Lindeijer Date: Fri, 26 Jan 2024 16:21:43 +0100 Subject: Apply C++11 fixits modernize-loop-convert modernize-deprecated-headers --- src/gui/widgets/playerbox.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'src/gui/widgets/playerbox.cpp') diff --git a/src/gui/widgets/playerbox.cpp b/src/gui/widgets/playerbox.cpp index 1d3325ee..0d63ddf2 100644 --- a/src/gui/widgets/playerbox.cpp +++ b/src/gui/widgets/playerbox.cpp @@ -56,11 +56,12 @@ PlayerBox::PlayerBox(const Being *being): bggridx[x], bggridy[y], bggridx[x + 1] - bggridx[x] + 1, bggridy[y + 1] - bggridy[y] + 1); - background.grid[a]->setAlpha(config.getFloatValue("guialpha")); a++; } } + background.setAlpha(config.getFloatValue("guialpha")); + textbox->decRef(); } @@ -92,10 +93,7 @@ void PlayerBox::draw(gcn::Graphics *graphics) if (config.getFloatValue("guialpha") != mAlpha) { - for (int a = 0; a < 9; a++) - { - background.grid[a]->setAlpha(config.getFloatValue("guialpha")); - } + background.setAlpha(config.getFloatValue("guialpha")); } } -- cgit v1.2.3-70-g09d2