aboutsummaryrefslogtreecommitdiffhomepage
path: root/win32
diff options
context:
space:
mode:
authorZufu Liu <unknown>2019-01-06 12:06:48 +1100
committerZufu Liu <unknown>2019-01-06 12:06:48 +1100
commit24b2acfddea20bbcdb6c714dcdc96389ab4f54b5 (patch)
tree1a438cf0677801a264f5d6047118b001286b0d89 /win32
parentb7937365db8e0a049155fda1b31d2c3ff5321547 (diff)
downloadscintilla-mirror-24b2acfddea20bbcdb6c714dcdc96389ab4f54b5.tar.gz
Backport: Bug [#2068]. Fix some clang-tidy warnings.
Backport of changeset 7195:ce4394f12c76.
Diffstat (limited to 'win32')
-rw-r--r--win32/PlatWin.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/win32/PlatWin.cxx b/win32/PlatWin.cxx
index 0dc420d19..e5cff0042 100644
--- a/win32/PlatWin.cxx
+++ b/win32/PlatWin.cxx
@@ -1094,7 +1094,7 @@ public:
SurfaceD2D(SurfaceD2D &&) = delete;
SurfaceD2D &operator=(const SurfaceD2D &) = delete;
SurfaceD2D &operator=(SurfaceD2D &&) = delete;
- virtual ~SurfaceD2D() override;
+ ~SurfaceD2D() override;
void SetScale();
void Init(WindowID wid) override;
@@ -1250,9 +1250,9 @@ void SurfaceD2D::PenColour(ColourDesired fore) {
void SurfaceD2D::D2DPenColour(ColourDesired fore, int alpha) {
if (pRenderTarget) {
D2D_COLOR_F col;
- col.r = (fore.AsInteger() & 0xff) / 255.0f;
- col.g = ((fore.AsInteger() & 0xff00) >> 8) / 255.0f;
- col.b = (fore.AsInteger() >> 16) / 255.0f;
+ col.r = fore.GetRedComponent();
+ col.g = fore.GetGreenComponent();
+ col.b = fore.GetBlueComponent();
col.a = alpha / 255.0f;
if (pBrush) {
pBrush->SetColor(col);