aboutsummaryrefslogtreecommitdiffhomepage
path: root/win32/PlatWin.cxx
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
commit5476eada003a1fbc182676c625b767efb2c16e6f (patch)
treeaa2d89bf5f61cb359c8ff4a5b2dd14968965e50c /win32/PlatWin.cxx
parent2e794b1ef52cb04e93f65906a266095bc8eae4f6 (diff)
downloadscintilla-mirror-5476eada003a1fbc182676c625b767efb2c16e6f.tar.gz
Bug [#2068]. Fix some clang-tidy warnings.
Diffstat (limited to 'win32/PlatWin.cxx')
-rw-r--r--win32/PlatWin.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/win32/PlatWin.cxx b/win32/PlatWin.cxx
index 59ac5d820..a93b3a22c 100644
--- a/win32/PlatWin.cxx
+++ b/win32/PlatWin.cxx
@@ -1108,7 +1108,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;
@@ -1267,9 +1267,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);