aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2019-04-28 14:00:21 +1000
committerNeil <nyamatongwe@gmail.com>2019-04-28 14:00:21 +1000
commit920f6ebb1d99186ea0699c97235667239604f278 (patch)
tree74b9151caa20359f0eac8e6e53aa52ea94499bb7
parent24b0d88f4d88ba83c52a8588e49c5ea597093618 (diff)
downloadscintilla-mirror-920f6ebb1d99186ea0699c97235667239604f278.tar.gz
Backport: Use const and noexcept for private methods.
Backport of changeset 7485:3c487fc19b62.
-rw-r--r--win32/PlatWin.cxx12
1 files changed, 6 insertions, 6 deletions
diff --git a/win32/PlatWin.cxx b/win32/PlatWin.cxx
index d0a4f4fdd..499fcac7f 100644
--- a/win32/PlatWin.cxx
+++ b/win32/PlatWin.cxx
@@ -431,8 +431,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:
@@ -569,7 +569,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);
@@ -582,7 +582,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) {
@@ -983,7 +983,7 @@ class SurfaceD2D : public Surface {
float dpiScaleY;
void Clear() noexcept;
- void SetFont(Font &font_);
+ void SetFont(const Font &font_);
public:
SurfaceD2D() noexcept;
@@ -1164,7 +1164,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;