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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user