diff options
author | Neil <nyamatongwe@gmail.com> | 2019-03-25 11:00:39 +1100 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2019-03-25 11:00:39 +1100 |
commit | 1cf755b51cc643240f60131a8fac5e990cfa5e9f (patch) | |
tree | 1a1a8d12e390942dc456b6df0d64d51701c1b9af /gtk/ScintillaGTK.cxx | |
parent | 5344ef2aee7eaca738b0bddab8d9025bf49f1137 (diff) | |
download | scintilla-mirror-1cf755b51cc643240f60131a8fac5e990cfa5e9f.tar.gz |
Use generic versions of ceil, floor, round, lround, trunc from <cmath>.
Diffstat (limited to 'gtk/ScintillaGTK.cxx')
-rw-r--r-- | gtk/ScintillaGTK.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gtk/ScintillaGTK.cxx b/gtk/ScintillaGTK.cxx index 2fbeae39c..29cf5d3ac 100644 --- a/gtk/ScintillaGTK.cxx +++ b/gtk/ScintillaGTK.cxx @@ -1681,8 +1681,8 @@ gint ScintillaGTK::PressThis(GdkEventButton *event) { evbtn = gdk_event_copy(reinterpret_cast<GdkEvent *>(event)); buttonMouse = event->button; Point pt; - pt.x = floor(event->x); - pt.y = floor(event->y); + pt.x = std::floor(event->x); + pt.y = std::floor(event->y); PRectangle rcClient = GetClientRectangle(); //Platform::DebugPrintf("Press %0d,%0d in %0d,%0d %0d,%0d\n", // pt.x, pt.y, rcClient.left, rcClient.top, rcClient.right, rcClient.bottom); @@ -1811,12 +1811,12 @@ gint ScintillaGTK::ScrollEvent(GtkWidget *widget, GdkEventScroll *event) { sciThis->smoothScrollY += event->delta_y * smoothScrollFactor; sciThis->smoothScrollX += event->delta_x * smoothScrollFactor;; if (ABS(sciThis->smoothScrollY) >= 1.0) { - const int scrollLines = trunc(sciThis->smoothScrollY); + const int scrollLines = std::trunc(sciThis->smoothScrollY); sciThis->ScrollTo(sciThis->topLine + scrollLines); sciThis->smoothScrollY -= scrollLines; } if (ABS(sciThis->smoothScrollX) >= 1.0) { - const int scrollPixels = trunc(sciThis->smoothScrollX); + const int scrollPixels = std::trunc(sciThis->smoothScrollX); sciThis->HorizontalScrollTo(sciThis->xOffset + scrollPixels); sciThis->smoothScrollX -= scrollPixels; } |