From 05b9509dba806a08cde7428da1353d5e52b3723c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Wed, 16 Oct 2019 18:26:56 +0200 Subject: [PATCH] Expose UnsignedLong and Long on Emscripten. The "64-bit integers have to be emulated and it's slow" problem doesn't apply for WebAssembly anymore. --- doc/changelog.dox | 3 +++ src/Magnum/Magnum.h | 16 ++-------------- src/Magnum/Types.h | 2 -- 3 files changed, 5 insertions(+), 16 deletions(-) diff --git a/doc/changelog.dox b/doc/changelog.dox index 15bcef084..775439413 100644 --- a/doc/changelog.dox +++ b/doc/changelog.dox @@ -346,6 +346,9 @@ See also: - The [base-qt](https://github.com/mosra/magnum-bootstrap/tree/base-qt) bootstrap project is fixed to use OpenGL 4.1 on macOS instead of being stuck on 2.1 (see [mosra/magnum-bootstrap#22](https://github.com/mosra/magnum-bootstrap/issues/22)) +- Since asm.js days are long over and WebAssembly supports 64-bit integers + natively, the @ref UnsignedLong and @ref Long types are now exposed on + @ref CORRADE_TARGET_EMSCRIPTEN "Emscripten" as well @subsubsection changelog-latest-changes-animation Animation library diff --git a/src/Magnum/Magnum.h b/src/Magnum/Magnum.h index 5913dfcc5..5612dca26 100644 --- a/src/Magnum/Magnum.h +++ b/src/Magnum/Magnum.h @@ -201,23 +201,11 @@ Equivalent to GLSL @glsl int @ce. */ typedef std::int32_t Int; -#ifndef CORRADE_TARGET_EMSCRIPTEN -/** -@brief Unsigned long (64bit) - -@partialsupport 64-bit integers are not available under - @ref CORRADE_TARGET_EMSCRIPTEN "Emscripten". -*/ +/** @brief Unsigned long (64bit) */ typedef std::uint64_t UnsignedLong; -/** -@brief Signed long (64bit) - -@partialsupport 64-bit integers are not available in - @ref CORRADE_TARGET_EMSCRIPTEN "Emscripten". -*/ +/** @brief Signed long (64bit) */ typedef std::int64_t Long; -#endif /** @brief Float (32bit) diff --git a/src/Magnum/Types.h b/src/Magnum/Types.h index e4c0bcb3c..1fcb5995d 100644 --- a/src/Magnum/Types.h +++ b/src/Magnum/Types.h @@ -43,10 +43,8 @@ typedef std::uint16_t UnsignedShort; typedef std::int16_t Short; typedef std::uint32_t UnsignedInt; typedef std::int32_t Int; -#ifndef CORRADE_TARGET_EMSCRIPTEN typedef std::uint64_t UnsignedLong; typedef std::int64_t Long; -#endif typedef float Float; typedef double Double;