aboutsummaryrefslogtreecommitdiff
path: root/source/sar.h
diff options
context:
space:
mode:
authorJoão Silva2017-01-29 04:55:23 +0000
committerJoão Silva2017-01-29 04:55:23 +0000
commit0e59b999fa976de2d00490f552a1ff0a27d40f63 (patch)
treeadce7b06d1acc25f52c6e10616451bba02f9f7a5 /source/sar.h
parent813fc89d37d1d8c8d2fa090a28f74aa0fdcea5df (diff)
downloadsnes9x2005-0e59b999fa976de2d00490f552a1ff0a27d40f63.tar.gz
snes9x2005-0e59b999fa976de2d00490f552a1ff0a27d40f63.tar.bz2
snes9x2005-0e59b999fa976de2d00490f552a1ff0a27d40f63.zip
Converted most types to stdint-style (fixing a few in the process).
Diffstat (limited to 'source/sar.h')
-rw-r--r--source/sar.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/source/sar.h b/source/sar.h
index 4ab4ecb..3f160a6 100644
--- a/source/sar.h
+++ b/source/sar.h
@@ -16,7 +16,7 @@
#define SAR64(b, n) ((b)>>(n))
#else
-static inline int8_t SAR8(const int8_t b, const int n)
+static inline int8_t SAR8(const int8_t b, const int32_t n)
{
#ifndef RIGHTSHIFT_INT8_IS_SAR
if (b < 0) return (b >> n) | (-1 << (8 - n));
@@ -24,7 +24,7 @@ static inline int8_t SAR8(const int8_t b, const int n)
return b >> n;
}
-static inline int16_t SAR16(const int16_t b, const int n)
+static inline int16_t SAR16(const int16_t b, const int32_t n)
{
#ifndef RIGHTSHIFT_INT16_IS_SAR
if (b < 0) return (b >> n) | (-1 << (16 - n));
@@ -32,7 +32,7 @@ static inline int16_t SAR16(const int16_t b, const int n)
return b >> n;
}
-static inline int32_t SAR32(const int32_t b, const int n)
+static inline int32_t SAR32(const int32_t b, const int32_t n)
{
#ifndef RIGHTSHIFT_INT32_IS_SAR
if (b < 0) return (b >> n) | (-1 << (32 - n));
@@ -40,7 +40,7 @@ static inline int32_t SAR32(const int32_t b, const int n)
return b >> n;
}
-static inline int64_t SAR64(const int64_t b, const int n)
+static inline int64_t SAR64(const int64_t b, const int32_t n)
{
#ifndef RIGHTSHIFT_INT64_IS_SAR
if (b < 0) return (b >> n) | (-1 << (64 - n));