diff options
author | Neil <nyamatongwe@gmail.com> | 2019-04-28 14:00:21 +1000 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2019-04-28 14:00:21 +1000 |
commit | 0ddf701022ac01180d1e00372e8ccc43d69d85a2 (patch) | |
tree | 6f410bba90d1c414908bc1a29fbc0fd97aa647bd /win32 | |
parent | 91cbdae330333600a50121228a52e24fd30e2fec (diff) | |
download | scintilla-mirror-0ddf701022ac01180d1e00372e8ccc43d69d85a2.tar.gz |
Use const and noexcept for private methods.
Diffstat (limited to 'win32')
-rw-r--r-- | win32/PlatWin.cxx | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/win32/PlatWin.cxx b/win32/PlatWin.cxx index 31e97ea0f..03b5a343c 100644 --- a/win32/PlatWin.cxx +++ b/win32/PlatWin.cxx @@ -432,8 +432,8 @@ class SurfaceGDI : public Surface { int codePage = 0; - void BrushColor(ColourDesired back); - void SetFont(Font &font_); + void BrushColor(ColourDesired back) noexcept; + void SetFont(const Font &font_) noexcept; void Clear() noexcept; public: @@ -573,7 +573,7 @@ void SurfaceGDI::PenColour(ColourDesired fore) { penOld = SelectPen(hdc, pen); } -void SurfaceGDI::BrushColor(ColourDesired back) { +void SurfaceGDI::BrushColor(ColourDesired back) noexcept { if (brush) { ::SelectObject(hdc, brushOld); ::DeleteObject(brush); @@ -586,7 +586,7 @@ void SurfaceGDI::BrushColor(ColourDesired back) { brushOld = SelectBrush(hdc, brush); } -void SurfaceGDI::SetFont(Font &font_) { +void SurfaceGDI::SetFont(const Font &font_) noexcept { const FormatAndMetrics *pfm = FamFromFontID(font_.GetID()); PLATFORM_ASSERT(pfm->technology == SCWIN_TECH_GDI); if (fontOld) { @@ -997,7 +997,7 @@ class SurfaceD2D : public Surface { float dpiScaleY; void Clear() noexcept; - void SetFont(Font &font_); + void SetFont(const Font &font_); public: SurfaceD2D() noexcept; @@ -1181,7 +1181,7 @@ void SurfaceD2D::D2DPenColour(ColourDesired fore, int alpha) { } } -void SurfaceD2D::SetFont(Font &font_) { +void SurfaceD2D::SetFont(const Font &font_) { const FormatAndMetrics *pfm = FamFromFontID(font_.GetID()); PLATFORM_ASSERT(pfm->technology == SCWIN_TECH_DIRECTWRITE); pTextFormat = pfm->pTextFormat; |