aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2017-06-09 11:31:14 +1000
committerNeil <nyamatongwe@gmail.com>2017-06-09 11:31:14 +1000
commit91e85ffa9fb176b9c87dac1a3849a99ab594d899 (patch)
tree7bcb7ea3f640821519ad77c6018df2b531176caa /src
parent454c44ddcd26843a1253757de333bc3c3c0cba8e (diff)
downloadscintilla-mirror-91e85ffa9fb176b9c87dac1a3849a99ab594d899.tar.gz
Use min and max from std instead of own version from platform.
Diffstat (limited to 'src')
-rw-r--r--src/Indicator.cxx7
-rw-r--r--src/LineMarker.cxx3
2 files changed, 6 insertions, 4 deletions
diff --git a/src/Indicator.cxx b/src/Indicator.cxx
index 16fc5912d..b59f1804f 100644
--- a/src/Indicator.cxx
+++ b/src/Indicator.cxx
@@ -8,6 +8,7 @@
#include <stdexcept>
#include <vector>
#include <map>
+#include <algorithm>
#include <memory>
#include "Platform.h"
@@ -55,7 +56,7 @@ void Indicator::Draw(Surface *surface, const PRectangle &rc, const PRectangle &r
} else if (sacDraw.style == INDIC_SQUIGGLEPIXMAP) {
PRectangle rcSquiggle = PixelGridAlign(rc);
- int width = Platform::Minimum(4000, static_cast<int>(rcSquiggle.Width()));
+ int width = std::min(4000, static_cast<int>(rcSquiggle.Width()));
RGBAImage image(width, 3, 1.0, 0);
enum { alphaFull = 0xff, alphaSide = 0x2f, alphaSide2=0x5f };
for (int x = 0; x < width; x++) {
@@ -137,7 +138,7 @@ void Indicator::Draw(Surface *surface, const PRectangle &rc, const PRectangle &r
rcBox.top = rcLine.top + 1;
rcBox.bottom = rcLine.bottom;
// Cap width at 4000 to avoid large allocations when mistakes made
- int width = Platform::Minimum(static_cast<int>(rcBox.Width()), 4000);
+ int width = std::min(static_cast<int>(rcBox.Width()), 4000);
RGBAImage image(width, static_cast<int>(rcBox.Height()), 1.0, 0);
// Draw horizontal lines top and bottom
for (int x=0; x<width; x++) {
@@ -156,7 +157,7 @@ void Indicator::Draw(Surface *surface, const PRectangle &rc, const PRectangle &r
int x = static_cast<int>(rc.left);
while (x < rc.right) {
surface->MoveTo(x, ymid);
- surface->LineTo(Platform::Minimum(x + 4, static_cast<int>(rc.right)), ymid);
+ surface->LineTo(std::min(x + 4, static_cast<int>(rc.right)), ymid);
x += 7;
}
} else if (sacDraw.style == INDIC_DOTS) {
diff --git a/src/LineMarker.cxx b/src/LineMarker.cxx
index d80a3c78c..5f8243ff8 100644
--- a/src/LineMarker.cxx
+++ b/src/LineMarker.cxx
@@ -11,6 +11,7 @@
#include <stdexcept>
#include <vector>
#include <map>
+#include <algorithm>
#include <memory>
#include "Platform.h"
@@ -117,7 +118,7 @@ void LineMarker::Draw(Surface *surface, PRectangle &rcWhole, Font &fontForCharac
PRectangle rc = rcWhole;
rc.top++;
rc.bottom--;
- int minDim = Platform::Minimum(static_cast<int>(rc.Width()), static_cast<int>(rc.Height()));
+ int minDim = std::min(static_cast<int>(rc.Width()), static_cast<int>(rc.Height()));
minDim--; // Ensure does not go beyond edge
int centreX = static_cast<int>(floor((rc.right + rc.left) / 2.0));
const int centreY = static_cast<int>(floor((rc.bottom + rc.top) / 2.0));