diff options
author | Neil <nyamatongwe@gmail.com> | 2019-03-25 11:42:40 +1100 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2019-03-25 11:42:40 +1100 |
commit | 2cfe99dc4716bb77d500e2e9b88a57ee621e2135 (patch) | |
tree | 17efb792e6e51473c96e8983f58db6c279d5f193 /gtk/PlatGTK.cxx | |
parent | 1cf755b51cc643240f60131a8fac5e990cfa5e9f (diff) | |
download | scintilla-mirror-2cfe99dc4716bb77d500e2e9b88a57ee621e2135.tar.gz |
Use generic std::abs instead of abs and fabs.
Diffstat (limited to 'gtk/PlatGTK.cxx')
-rw-r--r-- | gtk/PlatGTK.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gtk/PlatGTK.cxx b/gtk/PlatGTK.cxx index bb53bd693..7d555e312 100644 --- a/gtk/PlatGTK.cxx +++ b/gtk/PlatGTK.cxx @@ -408,13 +408,13 @@ void SurfaceImpl::LineTo(int x_, int y_) { // Horizontal or vertical lines can be more precisely drawn as a filled rectangle int xEnd = x_ - xDelta; int left = std::min(x, xEnd); - int width = abs(x - xEnd) + 1; + int width = std::abs(x - xEnd) + 1; int yEnd = y_ - yDelta; int top = std::min(y, yEnd); - int height = abs(y - yEnd) + 1; + int height = std::abs(y - yEnd) + 1; cairo_rectangle(context, left, top, width, height); cairo_fill(context); - } else if ((abs(xDiff) == abs(yDiff))) { + } else if ((std::abs(xDiff) == std::abs(yDiff))) { // 45 degree slope cairo_move_to(context, x + 0.5, y + 0.5); cairo_line_to(context, x_ + 0.5 - xDelta, y_ + 0.5 - yDelta); |