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 /cocoa | |
parent | 1cf755b51cc643240f60131a8fac5e990cfa5e9f (diff) | |
download | scintilla-mirror-2cfe99dc4716bb77d500e2e9b88a57ee621e2135.tar.gz |
Use generic std::abs instead of abs and fabs.
Diffstat (limited to 'cocoa')
-rw-r--r-- | cocoa/InfoBar.mm | 2 | ||||
-rw-r--r-- | cocoa/PlatCocoa.mm | 2 | ||||
-rw-r--r-- | cocoa/ScintillaView.mm | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/cocoa/InfoBar.mm b/cocoa/InfoBar.mm index 5dd74f46f..db30dd134 100644 --- a/cocoa/InfoBar.mm +++ b/cocoa/InfoBar.mm @@ -351,7 +351,7 @@ static float BarFontSize = 10.0; // We only work with some preset zoom values. If the given value does not correspond // to one then show no selection. - while (count < numberOfDefaultItems && (fabs(newScaleFactor - DefaultScaleMenuFactors[count]) > 0.07)) + while (count < numberOfDefaultItems && (std::abs(newScaleFactor - DefaultScaleMenuFactors[count]) > 0.07)) count++; if (count == numberOfDefaultItems) [mZoomPopup selectItemAtIndex: -1]; diff --git a/cocoa/PlatCocoa.mm b/cocoa/PlatCocoa.mm index 08b3facfd..2b41f476d 100644 --- a/cocoa/PlatCocoa.mm +++ b/cocoa/PlatCocoa.mm @@ -252,7 +252,7 @@ void AddToIntervalVector(std::vector<Interval> &vi, XYPOSITION left, XYPOSITION vi.push_back(interval); } else { Interval &last = vi.back(); - if (fabs(last.right-interval.left) < 0.01) { + if (std::abs(last.right-interval.left) < 0.01) { // If new left is very close to previous right then extend last item last.right = interval.right; } else { diff --git a/cocoa/ScintillaView.mm b/cocoa/ScintillaView.mm index 116ea36e9..84dbff16a 100644 --- a/cocoa/ScintillaView.mm +++ b/cocoa/ScintillaView.mm @@ -1235,7 +1235,7 @@ static NSCursor *cursorFromEnum(Window::Cursor cursor) { #if MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_5 zoomDelta += event.magnification * 10.0; - if (fabs(zoomDelta)>=1.0) { + if (std::abs(zoomDelta)>=1.0) { long zoomFactor = static_cast<long>([self getGeneralProperty: SCI_GETZOOM] + zoomDelta); [self setGeneralProperty: SCI_SETZOOM parameter: zoomFactor value: 0]; zoomDelta = 0.0; |