summaryrefslogtreecommitdiff
path: root/platform/darwin/src/MGLConversion.h
diff options
context:
space:
mode:
Diffstat (limited to 'platform/darwin/src/MGLConversion.h')
-rw-r--r--platform/darwin/src/MGLConversion.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/platform/darwin/src/MGLConversion.h b/platform/darwin/src/MGLConversion.h
index 9057ed7824..7050b4febf 100644
--- a/platform/darwin/src/MGLConversion.h
+++ b/platform/darwin/src/MGLConversion.h
@@ -85,7 +85,7 @@ public:
static optional<float> toNumber(const Holder& holder) {
const id value = holder.value;
if (_isNumber(value)) {
- return ((NSNumber *)value).floatValue;
+ return ((NSNumber *)value).doubleValue;
} else {
return {};
}
@@ -119,7 +119,7 @@ public:
return { *toString(holder) };
} else if (_isNumber(value)) {
// Need to cast to a double here as the float is otherwise considered a bool...
- return { static_cast<double>(*toNumber(holder)) };
+ return { *toDouble(holder) };
} else {
return {};
}