From 55e3ddb4653291ce3c3655f8a85e591f63ab5396 Mon Sep 17 00:00:00 2001 From: Shyotl Date: Mon, 18 May 2015 14:02:39 -0500 Subject: [PATCH] Can't you just be happy GCC? It's all I've ever wanted. --- indra/llcommon/llstat.cpp | 4 ++-- indra/llmath/llperlin.h | 16 +++------------- 2 files changed, 5 insertions(+), 15 deletions(-) diff --git a/indra/llcommon/llstat.cpp b/indra/llcommon/llstat.cpp index 3c2289649..bbb2b30d7 100644 --- a/indra/llcommon/llstat.cpp +++ b/indra/llcommon/llstat.cpp @@ -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) diff --git a/indra/llmath/llperlin.h b/indra/llmath/llperlin.h index 8f9f68bbe..4e019d794 100644 --- a/indra/llmath/llperlin.h +++ b/indra/llmath/llperlin.h @@ -35,15 +35,7 @@ class LLPerlinNoise { public: - template - static F32 noise(const T& x, U32 wrap_at); - template - 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;