Decouple <cstddef>

This commit is contained in:
Martin Natano
2023-04-20 11:21:29 +02:00
parent 093675cdc3
commit 78fb2e9fc3
171 changed files with 2012 additions and 1786 deletions
+6 -5
View File
@@ -62,6 +62,7 @@
#include "RageDisplay.h"
#include <cmath>
#include <cstddef>
// Defines
#define SHOW_LIFE_METER_FOR_DISABLED_PLAYERS THEME->GetMetricB(m_sName,"ShowLifeMeterForDisabledPlayers")
@@ -2077,7 +2078,7 @@ void ScreenGameplay::UpdateHasteRate()
float scale_from_high= 1;
float scale_to_low= 0;
float scale_to_high=0;
for(size_t turning_point= 0; turning_point < m_HasteTurningPoints.size();
for(std::size_t turning_point= 0; turning_point < m_HasteTurningPoints.size();
++turning_point)
{
float curr_turning_point= m_HasteTurningPoints[turning_point];
@@ -2179,7 +2180,7 @@ void ScreenGameplay::UpdateLights()
{
std::vector<GameInput> gi;
pStyle->StyleInputToGameInput( t, pi->m_pn, gi );
for(size_t i= 0; i < gi.size(); ++i)
for(std::size_t i= 0; i < gi.size(); ++i)
{
bBlinkGameButton[gi[i].controller][gi[i].button] = true;
}
@@ -2842,7 +2843,7 @@ void ScreenGameplay::HandleScreenMessage( const ScreenMessage SM )
GAMESTATE->SetNewStageSeed();
course->InvalidateTrailCache();
course->RegenerateNonFixedTrails();
size_t info_id= 0; // Can't use the player number in the playerinfo
std::size_t info_id= 0; // Can't use the player number in the playerinfo
// because it won't match up in 2-player.
FOREACH_EnabledPlayerInfo(m_vPlayerInfo, pi)
{
@@ -3230,13 +3231,13 @@ public:
static int GetHasteRate( T* p, lua_State *L ) { lua_pushnumber( L, p->GetHasteRate() ); return 1; }
static bool TurningPointsValid(lua_State* L, int index)
{
size_t size= lua_objlen(L, index);
std::size_t size= lua_objlen(L, index);
if(size < 2)
{
luaL_error(L, "Invalid number of entries %zu", size);
}
float prev_turning= -1;
for(size_t n= 1; n < size; ++n)
for(std::size_t n= 1; n < size; ++n)
{
lua_pushnumber(L, n);
lua_gettable(L, index);