From 8822e0ed1db342bf1947004c660a9c8649ce35c0 Mon Sep 17 00:00:00 2001 From: Neil Date: Thu, 19 Apr 2018 17:26:14 +1000 Subject: Backport: Use ColourDesired constructor explicitly to make more obvious. Constructor not marked explicit as may be used in external platform layers. Backport of changeset 6706:73c8bc321f62. --- win32/PlatWin.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'win32') diff --git a/win32/PlatWin.cxx b/win32/PlatWin.cxx index 90433201e..8e06b7f4c 100644 --- a/win32/PlatWin.cxx +++ b/win32/PlatWin.cxx @@ -666,7 +666,7 @@ void SurfaceGDI::BrushColor(ColourDesired back) { brushOld = 0; } // Only ever want pure, non-dithered brushes - ColourDesired colourNearest = ::GetNearestColor(hdc, back.AsLong()); + ColourDesired colourNearest = ColourDesired(::GetNearestColor(hdc, back.AsLong())); brush = ::CreateSolidBrush(colourNearest.AsLong()); brushOld = static_cast(::SelectObject(hdc, brush)); } @@ -2987,11 +2987,11 @@ DynamicLibrary *DynamicLibrary::Load(const char *modulePath) { } ColourDesired Platform::Chrome() { - return ::GetSysColor(COLOR_3DFACE); + return ColourDesired(::GetSysColor(COLOR_3DFACE)); } ColourDesired Platform::ChromeHighlight() { - return ::GetSysColor(COLOR_3DHIGHLIGHT); + return ColourDesired(::GetSysColor(COLOR_3DHIGHLIGHT)); } const char *Platform::DefaultFont() { -- cgit v1.2.3