diff options
author | Jukka Jylänki <jujjyl@gmail.com> | 2016-03-28 15:56:33 +0300 |
---|---|---|
committer | Jukka Jylänki <jujjyl@gmail.com> | 2016-03-28 21:40:24 +0300 |
commit | a6c00e1fee1a840902cb10e715e2571e824666fa (patch) | |
tree | 214510809631a2f78a88ad55a66d03eb709ab1b8 | |
parent | 5340abb9ebd1ea73df0c3cf724522510637a9a1c (diff) | |
download | binaryen-a6c00e1fee1a840902cb10e715e2571e824666fa.tar.gz binaryen-a6c00e1fee1a840902cb10e715e2571e824666fa.tar.bz2 binaryen-a6c00e1fee1a840902cb10e715e2571e824666fa.zip |
Also clean up Visual Studio build warning in wasm::toSInteger32 for double->int32_t cast.
-rw-r--r-- | src/support/safe_integer.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/support/safe_integer.cpp b/src/support/safe_integer.cpp index 39c7ee2d0..a596f871c 100644 --- a/src/support/safe_integer.cpp +++ b/src/support/safe_integer.cpp @@ -44,7 +44,7 @@ int32_t wasm::toSInteger32(double x) { assert(isSInteger32(x)); return x > std::numeric_limits<int32_t>::min() && x < std::numeric_limits<int32_t>::max() - ? x + ? (int32_t)x : (x < 0 ? std::numeric_limits<int32_t>::min() : std::numeric_limits<int32_t>::max()); } |