aboutsummaryrefslogtreecommitdiffhomepage
path: root/cocoa/ScintillaCocoa.mm
diff options
context:
space:
mode:
authormitchell <unknown>2019-03-31 23:20:01 -0400
committermitchell <unknown>2019-03-31 23:20:01 -0400
commit2c20e36f4ec739fd0887aceda589fce2c1757342 (patch)
tree7a00c34eab91ecec5e28a45df72f22d3c99d8701 /cocoa/ScintillaCocoa.mm
parentde07b9abd6711d657c170de23871ddb5503a1011 (diff)
downloadscintilla-mirror-2c20e36f4ec739fd0887aceda589fce2c1757342.tar.gz
Backport: Use generic versions of ceil, floor, round, lround, trunc from <cmath>.
Backport of changeset 7329:2662ef098d93, but without std::round and std::lround, since older Mac OSX SDKs may not have them.
Diffstat (limited to 'cocoa/ScintillaCocoa.mm')
-rw-r--r--cocoa/ScintillaCocoa.mm4
1 files changed, 3 insertions, 1 deletions
diff --git a/cocoa/ScintillaCocoa.mm b/cocoa/ScintillaCocoa.mm
index d262e79b2..3eaf17665 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 <vector>
#import <Cocoa/Cocoa.h>
@@ -2622,7 +2624,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;