From 3444147fd86122a421cd8cc436090723228d1a47 Mon Sep 17 00:00:00 2001 From: Niklas Mischkulnig Date: Mon, 4 Jun 2018 17:24:35 +0200 Subject: [PATCH] Cleanup --- windows/attrstr.cpp | 1 - windows/drawtext.cpp | 5 +---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/windows/attrstr.cpp b/windows/attrstr.cpp index d6349c08..ef512783 100644 --- a/windows/attrstr.cpp +++ b/windows/attrstr.cpp @@ -154,7 +154,6 @@ public: ret ^= doubleHash(b); ret ^= doubleHash(a); } - if (this->backgroundAttr != NULL) { uiAttributeBackground(this->backgroundAttr, &r, &g, &b, &a); ret ^= doubleHash(r); diff --git a/windows/drawtext.cpp b/windows/drawtext.cpp index 27f2cb9d..cdcfd0b1 100644 --- a/windows/drawtext.cpp +++ b/windows/drawtext.cpp @@ -360,9 +360,7 @@ public: if (backgroundBrush != nullptr) { // Get width of text float totalWidth = 0; - - for (UINT32 index = 0; index < glyphRun->glyphCount; index++) - { + for (UINT32 index = 0; index < glyphRun->glyphCount; index++) { totalWidth += glyphRun->glyphAdvances[index]; } @@ -377,7 +375,6 @@ public: baselineOriginX + totalWidth, baselineOriginY + descent); - // Fill Rectangle this->rt->FillRectangle(rect, backgroundBrush); } this->rt->DrawGlyphRun(