Decouple <cstddef>
This commit is contained in:
+13
-12
@@ -15,6 +15,7 @@
|
||||
#include "Preference.h"
|
||||
|
||||
#include <cmath>
|
||||
#include <cstddef>
|
||||
#include <typeinfo>
|
||||
|
||||
static Preference<bool> g_bShowMasks("ShowMasks", false);
|
||||
@@ -173,7 +174,7 @@ Actor::~Actor()
|
||||
{
|
||||
StopTweening();
|
||||
UnsubscribeAll();
|
||||
for(size_t i= 0; i < m_WrapperStates.size(); ++i)
|
||||
for(std::size_t i= 0; i < m_WrapperStates.size(); ++i)
|
||||
{
|
||||
SAFE_DELETE(m_WrapperStates[i]);
|
||||
}
|
||||
@@ -194,7 +195,7 @@ Actor::Actor( const Actor &cpy ):
|
||||
CPY( m_pLuaInstance );
|
||||
|
||||
m_WrapperStates.resize(cpy.m_WrapperStates.size());
|
||||
for(size_t i= 0; i < m_WrapperStates.size(); ++i)
|
||||
for(std::size_t i= 0; i < m_WrapperStates.size(); ++i)
|
||||
{
|
||||
m_WrapperStates[i]= new ActorFrame(*dynamic_cast<ActorFrame*>(cpy.m_WrapperStates[i]));
|
||||
}
|
||||
@@ -402,7 +403,7 @@ void Actor::Draw()
|
||||
{
|
||||
m_FakeParent->BeginDraw();
|
||||
}
|
||||
size_t wrapper_states_used= 0;
|
||||
std::size_t wrapper_states_used= 0;
|
||||
RageColor last_diffuse;
|
||||
RageColor last_glow;
|
||||
bool use_last_diffuse= false;
|
||||
@@ -418,7 +419,7 @@ void Actor::Draw()
|
||||
// wrapper[3] is the outermost frame. wrapper[2] is inside wrapper[3].
|
||||
// wrapper[1] is inside wrapper[2]. The actor is inside wrapper[1].
|
||||
// -Kyz
|
||||
for(size_t i= m_WrapperStates.size(); i > 0 && dont_abort_draw; --i)
|
||||
for(std::size_t i= m_WrapperStates.size(); i > 0 && dont_abort_draw; --i)
|
||||
{
|
||||
Actor* state= m_WrapperStates[i-1];
|
||||
if(!state->m_bVisible || state->m_fHibernateSecondsLeft > 0 ||
|
||||
@@ -467,7 +468,7 @@ void Actor::Draw()
|
||||
}
|
||||
this->PostDraw();
|
||||
}
|
||||
for(size_t i= 0; i < wrapper_states_used; ++i)
|
||||
for(std::size_t i= 0; i < wrapper_states_used; ++i)
|
||||
{
|
||||
Actor* state= m_WrapperStates[i];
|
||||
if(abort_with_end_draw)
|
||||
@@ -886,7 +887,7 @@ void Actor::Update( float fDeltaTime )
|
||||
fDeltaTime = -m_fHibernateSecondsLeft;
|
||||
m_fHibernateSecondsLeft = 0;
|
||||
}
|
||||
for(size_t i= 0; i < m_WrapperStates.size(); ++i)
|
||||
for(std::size_t i= 0; i < m_WrapperStates.size(); ++i)
|
||||
{
|
||||
m_WrapperStates[i]->Update(fDeltaTime);
|
||||
}
|
||||
@@ -992,14 +993,14 @@ void Actor::AddWrapperState()
|
||||
m_WrapperStates.push_back(wrapper);
|
||||
}
|
||||
|
||||
void Actor::RemoveWrapperState(size_t i)
|
||||
void Actor::RemoveWrapperState(std::size_t i)
|
||||
{
|
||||
ASSERT(i < m_WrapperStates.size());
|
||||
SAFE_DELETE(m_WrapperStates[i]);
|
||||
m_WrapperStates.erase(m_WrapperStates.begin()+i);
|
||||
}
|
||||
|
||||
Actor* Actor::GetWrapperState(size_t i)
|
||||
Actor* Actor::GetWrapperState(std::size_t i)
|
||||
{
|
||||
ASSERT(i < m_WrapperStates.size());
|
||||
return m_WrapperStates[i];
|
||||
@@ -1972,11 +1973,11 @@ public:
|
||||
p->GetWrapperState(p->GetNumWrapperStates()-1)->PushSelf(L);
|
||||
return 1;
|
||||
}
|
||||
static size_t get_state_index(T* p, lua_State* L, int stack_index)
|
||||
static std::size_t get_state_index(T* p, lua_State* L, int stack_index)
|
||||
{
|
||||
// Lua is one indexed.
|
||||
int i= IArg(stack_index)-1;
|
||||
const size_t si= static_cast<size_t>(i);
|
||||
const std::size_t si= static_cast<std::size_t>(i);
|
||||
if(i < 0 || si >= p->GetNumWrapperStates())
|
||||
{
|
||||
luaL_error(L, "%d is not a valid wrapper state index.", i+1);
|
||||
@@ -1985,7 +1986,7 @@ public:
|
||||
}
|
||||
static int RemoveWrapperState(T* p, lua_State* L)
|
||||
{
|
||||
size_t si= get_state_index(p, L, 1);
|
||||
std::size_t si= get_state_index(p, L, 1);
|
||||
p->RemoveWrapperState(si);
|
||||
COMMON_RETURN_SELF;
|
||||
}
|
||||
@@ -1996,7 +1997,7 @@ public:
|
||||
}
|
||||
static int GetWrapperState(T* p, lua_State* L)
|
||||
{
|
||||
size_t si= get_state_index(p, L, 1);
|
||||
std::size_t si= get_state_index(p, L, 1);
|
||||
p->GetWrapperState(si)->PushSelf(L);
|
||||
return 1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user