diff options
author | Neil <nyamatongwe@gmail.com> | 2018-05-14 14:13:13 +1000 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2018-05-14 14:13:13 +1000 |
commit | c4aa7826f3d2178e39e5bff2f6886d7d3d3f46d7 (patch) | |
tree | e5f93f314c700da99e6c54f590d034645c73a111 /src/LineMarker.cxx | |
parent | 3fc8c97d80a6797e60e6b203c9b4aa9d553df8a7 (diff) | |
download | scintilla-mirror-c4aa7826f3d2178e39e5bff2f6886d7d3d3f46d7.tar.gz |
Modernize Platform.h (3) - update Surface to delete WidthChar, use size_t for
Polygon and delete the standard copy and assignment methods.
Diffstat (limited to 'src/LineMarker.cxx')
-rw-r--r-- | src/LineMarker.cxx | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/LineMarker.cxx b/src/LineMarker.cxx index 6f1e4b01a..a2f7e299e 100644 --- a/src/LineMarker.cxx +++ b/src/LineMarker.cxx @@ -19,7 +19,6 @@ #include "Scintilla.h" -#include "StringCopy.h" #include "IntegerRectangle.h" #include "XPM.h" #include "LineMarker.h" @@ -186,7 +185,7 @@ void LineMarker::Draw(Surface *surface, PRectangle &rcWhole, Font &fontForCharac Point::FromInts(centreX - dimOn4, centreY + dimOn2), Point::FromInts(centreX + dimOn2 - dimOn4, centreY), }; - surface->Polygon(pts, ELEMENTS(pts), fore, back); + surface->Polygon(pts, std::size(pts), fore, back); } else if (markType == SC_MARK_ARROWDOWN) { Point pts[] = { @@ -194,7 +193,7 @@ void LineMarker::Draw(Surface *surface, PRectangle &rcWhole, Font &fontForCharac Point::FromInts(centreX + dimOn2, centreY - dimOn4), Point::FromInts(centreX, centreY + dimOn2 - dimOn4), }; - surface->Polygon(pts, ELEMENTS(pts), fore, back); + surface->Polygon(pts, std::size(pts), fore, back); } else if (markType == SC_MARK_PLUS) { Point pts[] = { @@ -211,7 +210,7 @@ void LineMarker::Draw(Surface *surface, PRectangle &rcWhole, Font &fontForCharac Point::FromInts(centreX - 1, centreY + 1), Point::FromInts(centreX - armSize, centreY + 1), }; - surface->Polygon(pts, ELEMENTS(pts), fore, back); + surface->Polygon(pts, std::size(pts), fore, back); } else if (markType == SC_MARK_MINUS) { Point pts[] = { @@ -220,7 +219,7 @@ void LineMarker::Draw(Surface *surface, PRectangle &rcWhole, Font &fontForCharac Point::FromInts(centreX + armSize, centreY +1), Point::FromInts(centreX - armSize, centreY + 1), }; - surface->Polygon(pts, ELEMENTS(pts), fore, back); + surface->Polygon(pts, std::size(pts), fore, back); } else if (markType == SC_MARK_SMALLRECT) { PRectangle rcSmall; @@ -416,7 +415,7 @@ void LineMarker::Draw(Surface *surface, PRectangle &rcWhole, Font &fontForCharac Point::FromInts(centreX, centreY + dimOn4), Point::FromInts(centreX, centreY + dimOn2), }; - surface->Polygon(pts, ELEMENTS(pts), fore, back); + surface->Polygon(pts, std::size(pts), fore, back); } else if (markType == SC_MARK_LEFTRECT) { PRectangle rcLeft = rcWhole; rcLeft.right = rcLeft.left + 4; @@ -430,7 +429,7 @@ void LineMarker::Draw(Surface *surface, PRectangle &rcWhole, Font &fontForCharac Point::FromInts(ircWhole.right - 3, centreY + halfHeight), Point::FromInts(ircWhole.left, centreY + halfHeight), }; - surface->Polygon(pts, ELEMENTS(pts), fore, back); + surface->Polygon(pts, std::size(pts), fore, back); } else { // SC_MARK_FULLRECT surface->FillRectangle(rcWhole, back); } |