diff options
author | John Firebaugh <john.firebaugh@gmail.com> | 2017-10-18 10:44:15 -0700 |
---|---|---|
committer | John Firebaugh <john.firebaugh@gmail.com> | 2017-10-18 12:34:58 -0700 |
commit | 5193d5b20fa813a6b2d2ef283749c96f29b06664 (patch) | |
tree | 0e086ed4900b9e533eb668b3fde48380b2dcc3f6 | |
parent | 99d635f8f7ad4204517b88fbb09efbf7a6ed0e30 (diff) | |
download | qtlocation-mapboxgl-5193d5b20fa813a6b2d2ef283749c96f29b06664.tar.gz |
Platform-specific storage sizes
-rw-r--r-- | include/mbgl/style/conversion.hpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/include/mbgl/style/conversion.hpp b/include/mbgl/style/conversion.hpp index 41ccbf0ff2..2c75a71206 100644 --- a/include/mbgl/style/conversion.hpp +++ b/include/mbgl/style/conversion.hpp @@ -186,13 +186,17 @@ public: } private: - // Node: JSValue* or v8::Local<v8::Value> +#if __ANDROID__ // Android: JSValue* or mbgl::android::Value - // iOS/macOS: JSValue* or id + using Storage = std::aligned_storage_t<32, 8>; +#elif __QT__ // Qt: JSValue* or QVariant - - // TODO: use platform-specific size using Storage = std::aligned_storage_t<32, 8>; +#else + // Node: JSValue* or v8::Local<v8::Value> + // iOS/macOS: JSValue* or id + using Storage = std::aligned_storage_t<8, 8>; +#endif struct VTable { void (*move) (Storage&& src, Storage& dest); |