From c4aa7826f3d2178e39e5bff2f6886d7d3d3f46d7 Mon Sep 17 00:00:00 2001 From: Neil Date: Mon, 14 May 2018 14:13:13 +1000 Subject: Modernize Platform.h (3) - update Surface to delete WidthChar, use size_t for Polygon and delete the standard copy and assignment methods. --- qt/ScintillaEditBase/PlatQt.cpp | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'qt/ScintillaEditBase/PlatQt.cpp') diff --git a/qt/ScintillaEditBase/PlatQt.cpp b/qt/ScintillaEditBase/PlatQt.cpp index ac8fbc9cc..26890e4b7 100644 --- a/qt/ScintillaEditBase/PlatQt.cpp +++ b/qt/ScintillaEditBase/PlatQt.cpp @@ -269,7 +269,7 @@ void SurfaceImpl::LineTo(int x_, int y_) } void SurfaceImpl::Polygon(Point *pts, - int npts, + size_t npts, ColourDesired fore, ColourDesired back) { @@ -277,11 +277,11 @@ void SurfaceImpl::Polygon(Point *pts, BrushColour(back); std::vector qpts(npts); - for (int i = 0; i < npts; i++) { + for (size_t i = 0; i < npts; i++) { qpts[i] = QPoint(pts[i].x, pts[i].y); } - GetPainter()->drawPolygon(&qpts[0], npts); + GetPainter()->drawPolygon(&qpts[0], static_cast(npts)); } void SurfaceImpl::RectangleDraw(PRectangle rc, @@ -494,12 +494,6 @@ XYPOSITION SurfaceImpl::WidthText(Font &font, const char *s, int len) return metrics.width(string); } -XYPOSITION SurfaceImpl::WidthChar(Font &font, char ch) -{ - QFontMetricsF metrics(*FontPointer(font), device); - return metrics.width(ch); -} - XYPOSITION SurfaceImpl::Ascent(Font &font) { QFontMetricsF metrics(*FontPointer(font), device); -- cgit v1.2.3