From 6e63cf025c291ad9a36c634b9cad4a1b48d3aeef Mon Sep 17 00:00:00 2001 From: Neil Date: Mon, 22 Nov 2021 13:04:04 +1100 Subject: Make const where correct. --- win32/PlatWin.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/win32/PlatWin.cxx b/win32/PlatWin.cxx index 71c23eee7..bdd2c0585 100644 --- a/win32/PlatWin.cxx +++ b/win32/PlatWin.cxx @@ -1905,7 +1905,7 @@ void SurfaceD2D::Copy(PRectangle rc, Point from, Surface &surfaceSource) { const HRESULT hr = surfOther.GetBitmap(&pBitmap); if (SUCCEEDED(hr) && pBitmap) { const D2D1_RECT_F rcDestination = RectangleFromPRectangle(rc); - D2D1_RECT_F rcSource = RectangleFromPRectangle(PRectangle( + const D2D1_RECT_F rcSource = RectangleFromPRectangle(PRectangle( from.x, from.y, from.x + rc.Width(), from.y + rc.Height())); pRenderTarget->DrawBitmap(pBitmap, rcDestination, 1.0f, D2D1_BITMAP_INTERPOLATION_MODE_NEAREST_NEIGHBOR, rcSource); @@ -2336,7 +2336,7 @@ void SurfaceD2D::DrawTextCommon(PRectangle rc, const Font *font_, XYPOSITION yba static_cast(rc.Height()), &pTextLayout); if (SUCCEEDED(hr)) { - D2D1_POINT_2F origin = DPointFromPoint(Point(rc.left, ybase-yAscent)); + const D2D1_POINT_2F origin = DPointFromPoint(Point(rc.left, ybase-yAscent)); pRenderTarget->DrawTextLayout(origin, pTextLayout, pBrush, d2dDrawTextOptions); ReleaseUnknown(pTextLayout); } -- cgit v1.2.3