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 | 50bbd6a2bea15a623d19a8a20c5cb01f8cfbe1bd (patch) | |
| tree | 816f87d781de223418432b915acf39bafef460b0 /gtk | |
| parent | 2c20e36f4ec739fd0887aceda589fce2c1757342 (diff) | |
| download | scintilla-mirror-50bbd6a2bea15a623d19a8a20c5cb01f8cfbe1bd.tar.gz | |
Backport: Use generic std::abs instead of abs and fabs.
Backport of changeset 7330:09e5fe965a79.
Diffstat (limited to 'gtk')
| -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 d9485c048..379a5a790 100644 --- a/gtk/PlatGTK.cxx +++ b/gtk/PlatGTK.cxx @@ -404,13 +404,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); |
