From dcc4976b3a4f1827a9c516e150e00d7b0a150381 Mon Sep 17 00:00:00 2001 From: Neil Date: Tue, 20 Apr 2021 12:51:45 +1000 Subject: Avoid some warnings and make similar code more consistent. --- win32/PlatWin.cxx | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) diff --git a/win32/PlatWin.cxx b/win32/PlatWin.cxx index 45523ff6e..b1975d724 100644 --- a/win32/PlatWin.cxx +++ b/win32/PlatWin.cxx @@ -2400,7 +2400,7 @@ void SurfaceD2D::MeasureWidths(const Font *font_, std::string_view text, XYPOSIT return; } // A cluster may be more than one WCHAR, such as for "ffi" which is a ligature in the Candara font - FLOAT position = 0.0f; + XYPOSITION position = 0.0; int ti=0; for (unsigned int ci=0; ci 0) - lastPos = positions[i-1]; + const XYPOSITION lastPos = (i > 0) ? positions[i - 1] : 0.0; while (i 0) - lastPos = positions[i - 1]; + const XYPOSITION lastPos = (i > 0) ? positions[i - 1] : 0.0; while (i < text.length()) { positions[i++] = lastPos; } -- cgit v1.2.3