Clean up math functions
- Remove checking for standard functions from the build system - Prefix all invocations with std:: - Replace suffixed functions with unprefixed versions - Include <cmath> in all files that use it and remove the global include e.g. floorf(x) -> std::floor(x)
This commit is contained in:
@@ -2,6 +2,8 @@
|
||||
#include "RageSoundMixBuffer.h"
|
||||
#include "RageUtil.h"
|
||||
|
||||
#include <cmath>
|
||||
|
||||
#if defined(MACOSX)
|
||||
#include "archutils/Darwin/VectorHelper.h"
|
||||
#ifdef USE_VEC
|
||||
@@ -79,7 +81,7 @@ void RageSoundMixBuffer::read( int16_t *pBuf )
|
||||
{
|
||||
float iOut = m_pMixbuf[iPos];
|
||||
iOut = clamp( iOut, -1.0f, +1.0f );
|
||||
pBuf[iPos] = lrintf(iOut * 32767);
|
||||
pBuf[iPos] = std::lrint(iOut * 32767);
|
||||
}
|
||||
m_iBufUsed = 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user