[UI/Windows] Object out of scope optimization for better codegeneration (lower level scope)

This commit is contained in:
Herman Semenov committed 2023-12-20 12:35:02 +03:00
1 parent ca94de8d4b
commit 95f535dab0
19 files changed
+59 -69

No files matched your search

+1 -1
View File
@@ -134,8 +134,8 @@ static void RenderNotice(UIContext &dc, Bounds bounds, float height1, NoticeLeve
if (iconID.isValid()) {
// Atlas icon.
dc.Draw()->GetAtlas()->measureImage(iconID, &iconW, &iconH);
Bounds iconBounds = Bounds(bounds.x + 2.5f, bounds.y + 2.5f, iconW, iconH);
if (!iconName.empty()) {
Bounds iconBounds = Bounds(bounds.x + 2.5f, bounds.y + 2.5f, iconW, iconH);
// If it's not a preset OSD icon, give it some background to blend in. The RA icon for example
// easily melts into the orange of warnings otherwise.
dc.FillRect(UI::Drawable(0x50000000), iconBounds.Expand(2.0f));