Can't you just be happy GCC? It's all I've ever wanted.

This commit is contained in:
Shyotl
2015-05-18 14:02:39 -05:00
parent 690f3614c1
commit 55e3ddb465
2 changed files with 5 additions and 15 deletions

View File

@@ -113,8 +113,8 @@ void LLStat::addValue(const F32 value)
}
// Increment the bin counters.
mCurBin = ++mCurBin % mNumBins;
mNextBin = ++mNextBin % mNumBins;
mCurBin = (mCurBin+1) % mNumBins;
mNextBin = (mNextBin+1) % mNumBins;
mBins[mCurBin].mValue = value;
if (mUseFrameTimer)

View File

@@ -35,15 +35,7 @@
class LLPerlinNoise
{
public:
template<typename T>
static F32 noise(const T& x, U32 wrap_at);
template<typename T>
static F32 noise(const T& x)
{
return noise(x, 256);
}
template<>
static F32 noise(const F32& x, U32 wrap_at)
static F32 noise(const F32& x, U32 wrap_at = 256)
{
U8 b[1][2];
F32 r[1][2], s[1], u, v;
@@ -55,8 +47,7 @@ public:
return lerp(u, v, s[VX]);
}
template <>
static F32 noise(const LLVector2& vec, U32 wrap_at)
static F32 noise(const LLVector2& vec, U32 wrap_at = 256)
{
U8 b[2][2];
F32 r[2][2], s[2], u, v, A, B;
@@ -73,8 +64,7 @@ public:
return lerp(A, B, s[VY]);
}
template <>
static F32 noise(const LLVector3& vec, U32 wrap_at)
static F32 noise(const LLVector3& vec, U32 wrap_at = 256)
{
U8 b[3][2];
F32 r[3][2], s[3], u, v, A, B, C, D;