From 3fc8c97d80a6797e60e6b203c9b4aa9d553df8a7 Mon Sep 17 00:00:00 2001 From: Neil Date: Mon, 14 May 2018 13:57:03 +1000 Subject: Modernize Platform.h (2) - noexcept, const, constexpr. ColourDesired is an int instead of long for consistency over different platforms. Changes made to Point, PRectangle, and ColourDesired. RoundXYPosition removed. --- gtk/PlatGTK.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'gtk') diff --git a/gtk/PlatGTK.cxx b/gtk/PlatGTK.cxx index bb8f7575c..622936877 100644 --- a/gtk/PlatGTK.cxx +++ b/gtk/PlatGTK.cxx @@ -362,7 +362,7 @@ void SurfaceImpl::InitPixMap(int width, int height, Surface *surface_, WindowID void SurfaceImpl::PenColour(ColourDesired fore) { if (context) { - ColourDesired cdFore(fore.AsLong()); + ColourDesired cdFore(fore.AsInteger()); cairo_set_source_rgb(context, cdFore.GetRed() / 255.0, cdFore.GetGreen() / 255.0, @@ -520,7 +520,7 @@ static void PathRoundRectangle(cairo_t *context, double left, double top, double void SurfaceImpl::AlphaRectangle(PRectangle rc, int cornerSize, ColourDesired fill, int alphaFill, ColourDesired outline, int alphaOutline, int /*flags*/) { if (context && rc.Width() > 0) { - ColourDesired cdFill(fill.AsLong()); + ColourDesired cdFill(fill.AsInteger()); cairo_set_source_rgba(context, cdFill.GetRed() / 255.0, cdFill.GetGreen() / 255.0, @@ -532,7 +532,7 @@ void SurfaceImpl::AlphaRectangle(PRectangle rc, int cornerSize, ColourDesired fi cairo_rectangle(context, rc.left + 1.0, rc.top + 1.0, rc.right - rc.left - 2.0, rc.bottom - rc.top - 2.0); cairo_fill(context); - ColourDesired cdOutline(outline.AsLong()); + ColourDesired cdOutline(outline.AsInteger()); cairo_set_source_rgba(context, cdOutline.GetRed() / 255.0, cdOutline.GetGreen() / 255.0, -- cgit v1.2.3