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:
Martin Natano
2023-04-19 19:31:40 +02:00
parent f39ed52dbf
commit b68ca517e6
111 changed files with 1831 additions and 1785 deletions
+4 -2
View File
@@ -1,4 +1,4 @@
#include "global.h"
#include "global.h"
#include "StatsManager.h"
#include "RageFileManager.h"
#include "GameState.h"
@@ -19,6 +19,8 @@
#include "PlayerState.h"
#include "Player.h"
#include <cmath>
StatsManager* STATSMAN = nullptr; // global object accessible from anywhere in the program
void AddPlayerStatsToProfile( Profile *pProfile, const StageStats &ss, PlayerNumber pn );
@@ -209,7 +211,7 @@ void StatsManager::CommitStatsToProfiles( const StageStats *pSS )
// Update profile stats
Profile* pMachineProfile = PROFILEMAN->GetMachineProfile();
int iGameplaySeconds = (int)truncf(pSS->m_fGameplaySeconds);
int iGameplaySeconds = std::trunc(pSS->m_fGameplaySeconds);
pMachineProfile->m_iTotalGameplaySeconds += iGameplaySeconds;
pMachineProfile->m_iNumTotalSongsPlayed += pSS->m_vpPlayedSongs.size();