From 06418b4cf423697e2665ab19917845996d064c7b Mon Sep 17 00:00:00 2001 From: Slendi Date: Wed, 15 Oct 2025 03:34:10 +0300 Subject: [PATCH] Small improvements Signed-off-by: Slendi --- src/IconRegistry.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/IconRegistry.cpp b/src/IconRegistry.cpp index eb657e0..fae1852 100644 --- a/src/IconRegistry.cpp +++ b/src/IconRegistry.cpp @@ -138,13 +138,14 @@ auto IconTheme::lookup(std::string_view const name, std::vector rgba( bitmap.width() * bitmap.height() * 4); - auto *src = bitmap.data(); for (size_t i = 0, px = bitmap.width() * bitmap.height(); i < px; ++i) { - uint8_t b = src[i * 4 + 0]; - uint8_t g = src[i * 4 + 1]; - uint8_t r = src[i * 4 + 2]; - uint8_t a = src[i * 4 + 3]; + auto *src { bitmap.data() }; + + uint8_t b { src[i * 4 + 0] }; + uint8_t g { src[i * 4 + 1] }; + uint8_t r { src[i * 4 + 2] }; + uint8_t a { src[i * 4 + 3] }; if (a != 0) { r = (uint8_t)std::min(