aboutsummaryrefslogtreecommitdiffhomepage
path: root/cocoa/ScintillaCocoa.mm
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2019-03-25 11:00:39 +1100
committerNeil <nyamatongwe@gmail.com>2019-03-25 11:00:39 +1100
commit1cf755b51cc643240f60131a8fac5e990cfa5e9f (patch)
tree1a1a8d12e390942dc456b6df0d64d51701c1b9af /cocoa/ScintillaCocoa.mm
parent5344ef2aee7eaca738b0bddab8d9025bf49f1137 (diff)
downloadscintilla-mirror-1cf755b51cc643240f60131a8fac5e990cfa5e9f.tar.gz
Use generic versions of ceil, floor, round, lround, trunc from <cmath>.
Diffstat (limited to 'cocoa/ScintillaCocoa.mm')
-rw-r--r--cocoa/ScintillaCocoa.mm6
1 files changed, 4 insertions, 2 deletions
diff --git a/cocoa/ScintillaCocoa.mm b/cocoa/ScintillaCocoa.mm
index b7b595b62..ffb365d13 100644
--- a/cocoa/ScintillaCocoa.mm
+++ b/cocoa/ScintillaCocoa.mm
@@ -14,6 +14,8 @@
* This file is dual licensed under LGPL v2.1 and the Scintilla license (http://www.scintilla.org/License.txt).
*/
+#include <cmath>
+
#include <string_view>
#include <vector>
@@ -818,7 +820,7 @@ namespace {
*/
bool SupportAnimatedFind() {
- return floor(NSAppKitVersionNumber) < NSAppKitVersionNumber10_12;
+ return std::floor(NSAppKitVersionNumber) < NSAppKitVersionNumber10_12;
}
}
@@ -2486,7 +2488,7 @@ void ScintillaCocoa::ShowFindIndicatorForRange(NSRange charRange, BOOL retaining
layerFindIndicator = [[FindHighlightLayer alloc] init];
[content setWantsLayer: YES];
layerFindIndicator.geometryFlipped = content.layer.geometryFlipped;
- if (floor(NSAppKitVersionNumber) > NSAppKitVersionNumber10_8) {
+ if (std::floor(NSAppKitVersionNumber) > NSAppKitVersionNumber10_8) {
// Content layer is unflipped on 10.9, but the indicator shows wrong unless flipped
layerFindIndicator.geometryFlipped = YES;
}