summaryrefslogtreecommitdiff
path: root/Source/Core/Common
diff options
context:
space:
mode:
authordegasus <wickmarkus@web.de>2014-02-24 10:20:53 +0100
committerdegasus <wickmarkus@web.de>2014-02-26 11:37:28 +0100
commit94da4e1aa29a68cb723898a63bd01568bbbd8c4f (patch)
tree267e067a61a3a1a2d07915797b4c002aeaf88768 /Source/Core/Common
parentf99c8a0b70c604565731d2c7c000629806d755b4 (diff)
MathUtil: Change Log2 return value to int
Log2(u64) can't be bigger than 63, so there is no need in forcing a 64 bit value. So just using a common int seems more natural.
Diffstat (limited to 'Source/Core/Common')
-rw-r--r--Source/Core/Common/MathUtil.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/Core/Common/MathUtil.h b/Source/Core/Common/MathUtil.h
index da12822f5d..14b9309fc6 100644
--- a/Source/Core/Common/MathUtil.h
+++ b/Source/Core/Common/MathUtil.h
@@ -150,7 +150,7 @@ float MathFloatVectorSum(const std::vector<float>&);
#define ROUND_DOWN(x, a) ((x) & ~((a) - 1))
// Rounds down. 0 -> undefined
-inline u64 Log2(u64 val)
+inline int Log2(u64 val)
{
#if defined(__GNUC__)
return 63 - __builtin_clzll(val);
@@ -161,7 +161,7 @@ inline u64 Log2(u64 val)
return result;
#else
- u64 result = -1;
+ int result = -1;
while (val != 0)
{
val >>= 1;