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:
+7
-5
@@ -6,7 +6,9 @@
|
||||
#include "RageLog.h"
|
||||
#include "ThemeManager.h"
|
||||
#include "NoteTypes.h"
|
||||
#include <float.h>
|
||||
|
||||
#include <cfloat>
|
||||
#include <cmath>
|
||||
|
||||
static void EraseSegment(std::vector<TimingSegment*> &vSegs, int index, TimingSegment *cur);
|
||||
static const int INVALID_INDEX = -1;
|
||||
@@ -414,7 +416,7 @@ int TimingData::GetSegmentIndexAtRow(TimingSegmentType tst, int iRow ) const
|
||||
r = m - 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// iRow is before the first segment of type tst
|
||||
return INVALID_INDEX;
|
||||
}
|
||||
@@ -1030,7 +1032,7 @@ void TimingData::ScaleRegion( float fScale, int iStartIndex, int iEndIndex, bool
|
||||
ASSERT( iStartIndex < iEndIndex );
|
||||
|
||||
int length = iEndIndex - iStartIndex;
|
||||
int newLength = lrintf( fScale * length );
|
||||
int newLength = std::lrint( fScale * length );
|
||||
|
||||
FOREACH_TimingSegmentType( tst )
|
||||
for (unsigned j = 0; j < m_avpTimingSegments[tst].size(); j++)
|
||||
@@ -1435,7 +1437,7 @@ LUA_REGISTER_CLASS( TimingData )
|
||||
/*
|
||||
* (c) 2001-2004 Chris Danford, Glenn Maynard
|
||||
* All rights reserved.
|
||||
*
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the
|
||||
* "Software"), to deal in the Software without restriction, including
|
||||
@@ -1445,7 +1447,7 @@ LUA_REGISTER_CLASS( TimingData )
|
||||
* copyright notice(s) and this permission notice appear in all copies of
|
||||
* the Software and that both the above copyright notice(s) and this
|
||||
* permission notice appear in supporting documentation.
|
||||
*
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
|
||||
|
||||
Reference in New Issue
Block a user