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
+6 -4
View File
@@ -7,6 +7,8 @@
#include "Course.h"
#include "ActorUtil.h"
#include <cmath>
LifeMeterBattery::LifeMeterBattery()
{
m_iLivesLeft= 4;
@@ -144,7 +146,7 @@ void LifeMeterBattery::AddLives( int iLives )
void LifeMeterBattery::ChangeLives(int iLifeDiff)
{
if( iLifeDiff < 0 )
SubtractLives( abs(iLifeDiff) );
SubtractLives( std::abs(iLifeDiff) );
else if( iLifeDiff > 0 )
AddLives(iLifeDiff);
}
@@ -268,7 +270,7 @@ void LifeMeterBattery::Update( float fDeltaTime )
// lua start
#include "LuaBinding.h"
/** @brief Allow Lua to have access to the LifeMeterBattery. */
/** @brief Allow Lua to have access to the LifeMeterBattery. */
class LunaLifeMeterBattery: public Luna<LifeMeterBattery>
{
public:
@@ -289,7 +291,7 @@ LUA_REGISTER_DERIVED_CLASS( LifeMeterBattery, LifeMeter )
/*
* (c) 2001-2004 Chris Danford
* 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
@@ -299,7 +301,7 @@ LUA_REGISTER_DERIVED_CLASS( LifeMeterBattery, LifeMeter )
* 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