From aa9d4c34a4ac3f8ff1f11a34a5265ac19b3566d7 Mon Sep 17 00:00:00 2001 From: Neil Date: Thu, 21 Nov 2019 16:57:28 +1100 Subject: Make reference argument const as safe to do so. --- win32/PlatWin.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'win32') diff --git a/win32/PlatWin.cxx b/win32/PlatWin.cxx index 27e8293c9..d449e78a9 100644 --- a/win32/PlatWin.cxx +++ b/win32/PlatWin.cxx @@ -471,7 +471,7 @@ public: std::unique_ptr Layout(const IScreenLine *screenLine) override; - void DrawTextCommon(PRectangle rc, Font &font_, XYPOSITION ybase, std::string_view text, UINT fuOptions); + void DrawTextCommon(PRectangle rc, const Font &font_, XYPOSITION ybase, std::string_view text, UINT fuOptions); void DrawTextNoClip(PRectangle rc, Font &font_, XYPOSITION ybase, std::string_view text, ColourDesired fore, ColourDesired back) override; void DrawTextClipped(PRectangle rc, Font &font_, XYPOSITION ybase, std::string_view text, ColourDesired fore, ColourDesired back) override; void DrawTextTransparent(PRectangle rc, Font &font_, XYPOSITION ybase, std::string_view text, ColourDesired fore) override; @@ -817,7 +817,7 @@ std::unique_ptr SurfaceGDI::Layout(const IScreenLine *) { typedef VarBuffer TextPositionsI; -void SurfaceGDI::DrawTextCommon(PRectangle rc, Font &font_, XYPOSITION ybase, std::string_view text, UINT fuOptions) { +void SurfaceGDI::DrawTextCommon(PRectangle rc, const Font &font_, XYPOSITION ybase, std::string_view text, UINT fuOptions) { SetFont(font_); const RECT rcw = RectFromPRectangle(rc); const int x = static_cast(rc.left); @@ -1038,7 +1038,7 @@ public: std::unique_ptr Layout(const IScreenLine *screenLine) override; - void DrawTextCommon(PRectangle rc, Font &font_, XYPOSITION ybase, std::string_view text, UINT fuOptions); + void DrawTextCommon(PRectangle rc, const Font &font_, XYPOSITION ybase, std::string_view text, UINT fuOptions); void DrawTextNoClip(PRectangle rc, Font &font_, XYPOSITION ybase, std::string_view text, ColourDesired fore, ColourDesired back) override; void DrawTextClipped(PRectangle rc, Font &font_, XYPOSITION ybase, std::string_view text, ColourDesired fore, ColourDesired back) override; void DrawTextTransparent(PRectangle rc, Font &font_, XYPOSITION ybase, std::string_view text, ColourDesired fore) override; @@ -1884,7 +1884,7 @@ std::unique_ptr SurfaceD2D::Layout(const IScreenLine *screenL return std::make_unique(screenLine); } -void SurfaceD2D::DrawTextCommon(PRectangle rc, Font &font_, XYPOSITION ybase, std::string_view text, UINT fuOptions) { +void SurfaceD2D::DrawTextCommon(PRectangle rc, const Font &font_, XYPOSITION ybase, std::string_view text, UINT fuOptions) { SetFont(font_); // Use Unicode calls -- cgit v1.2.3