summaryrefslogtreecommitdiffstats
path: root/source/core/slang-math.h
diff options
context:
space:
mode:
authorMatt Pharr <matt@pharr.org>2018-10-22 07:45:09 -0700
committerTim Foley <tfoleyNV@users.noreply.github.com>2018-10-22 07:45:09 -0700
commitcda9c3b1a712715209a3f4ba155c1425898334cb (patch)
tree9814bed442a388d8c1e025b07f92499b0ae0da2e /source/core/slang-math.h
parent53731f674601a2eb81c5715957d2e0e65637aee3 (diff)
Osx build fixes (#681)
* Remove 'register' qualifiers. These will be illegal come c++17 and give a warning on OSX. * Add UNREACHABLE_RETURNs to silence compiler warnings. * Make FileStream::GetPosition() compile on OSX (w.r.t. the linux build, I believe that strictly-speaking, fpos64_t is specified as an opaque type and the cast to an Int64 is not necessarily well-defined.) * Avoid an inadvertent trigraph.
Diffstat (limited to 'source/core/slang-math.h')
-rw-r--r--source/core/slang-math.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/core/slang-math.h b/source/core/slang-math.h
index e57cc68ff..6d6b3e7a1 100644
--- a/source/core/slang-math.h
+++ b/source/core/slang-math.h
@@ -63,7 +63,7 @@ namespace Slang
return isinf(x);
}
- static inline unsigned int Ones32(register unsigned int x)
+ static inline unsigned int Ones32(unsigned int x)
{
/* 32-bit recursive reduction using SWAR...
but first step is mapping 2-bit values
@@ -77,7 +77,7 @@ namespace Slang
return(x & 0x0000003f);
}
- static inline unsigned int Log2Floor(register unsigned int x)
+ static inline unsigned int Log2Floor(unsigned int x)
{
x |= (x >> 1);
x |= (x >> 2);
@@ -87,7 +87,7 @@ namespace Slang
return(Ones32(x >> 1));
}
- static inline unsigned int Log2Ceil(register unsigned int x)
+ static inline unsigned int Log2Ceil(unsigned int x)
{
int y = (x & (x - 1));
y |= -y;