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 | 7a4fd484cc8229d3518039c82d950b4fa7f673cb (patch) | |
tree | 56eb3385ec0c7da13691236af5c9b1d78b851b22 /cocoa | |
parent | 8e94953b2d9f7d946445759fe31d169879b680c8 (diff) | |
download | scintilla-mirror-7a4fd484cc8229d3518039c82d950b4fa7f673cb.tar.gz |
Backport: 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.
Backport of changeset 6939:7441dcb96e6a.
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 73d528d00..405cdee8e 100644 --- a/cocoa/PlatCocoa.mm +++ b/cocoa/PlatCocoa.mm @@ -276,7 +276,7 @@ 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, @@ -290,7 +290,7 @@ 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, @@ -911,7 +911,7 @@ void SurfaceImpl::DrawTextTransparent(PRectangle rc, Font &font_, XYPOSITION yba 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_); |