diff options
author | Neil <nyamatongwe@gmail.com> | 2018-05-14 13:57:03 +1000 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2018-05-14 13:57:03 +1000 |
commit | 3fc8c97d80a6797e60e6b203c9b4aa9d553df8a7 (patch) | |
tree | 9875855a197986e4ba8bf8ab1e8a491d1d1b321f /cocoa | |
parent | 9948c490832acd4d211070adfef982d1c0e8b4c4 (diff) | |
download | scintilla-mirror-3fc8c97d80a6797e60e6b203c9b4aa9d553df8a7.tar.gz |
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.
Diffstat (limited to 'cocoa')
-rw-r--r-- | cocoa/PlatCocoa.mm | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/cocoa/PlatCocoa.mm b/cocoa/PlatCocoa.mm index bdf0d3997..704645cb6 100644 --- a/cocoa/PlatCocoa.mm +++ b/cocoa/PlatCocoa.mm @@ -255,7 +255,7 @@ void SurfaceImpl::InitPixMap(int width, int height, Surface *surface_, WindowID void SurfaceImpl::PenColour(ColourDesired fore) { if (gc) { - ColourDesired colour(fore.AsLong()); + ColourDesired colour(fore.AsInteger()); // Set the Stroke color to match CGContextSetRGBStrokeColor(gc, colour.GetRed() / 255.0, colour.GetGreen() / 255.0, @@ -267,7 +267,7 @@ void SurfaceImpl::PenColour(ColourDesired fore) { void SurfaceImpl::FillColour(const ColourDesired &back) { if (gc) { - ColourDesired colour(back.AsLong()); + ColourDesired colour(back.AsInteger()); // Set the Fill color to match CGContextSetRGBFillColor(gc, colour.GetRed() / 255.0, colour.GetGreen() / 255.0, @@ -854,7 +854,7 @@ CFStringEncoding EncodingFromCharacterSet(bool unicode, int characterSet) { void SurfaceImpl::DrawTextTransparent(PRectangle rc, Font &font_, XYPOSITION ybase, const char *s, int len, ColourDesired fore) { CFStringEncoding encoding = EncodingFromCharacterSet(unicodeMode, FontCharacterSet(font_)); - ColourDesired colour(fore.AsLong()); + ColourDesired colour(fore.AsInteger()); CGColorRef color = CGColorCreateGenericRGB(colour.GetRed()/255.0, colour.GetGreen()/255.0, colour.GetBlue()/255.0, 1.0); QuartzTextStyle *style = TextStyleFromFont(font_); |