Integrate C++11 branch into 5_1-new
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
#include "RageTexture.h"
|
||||
#include "RageUtil.h"
|
||||
#include "ActorUtil.h"
|
||||
#include "Foreach.h"
|
||||
|
||||
#include "LuaBinding.h"
|
||||
#include "LuaManager.h"
|
||||
|
||||
@@ -35,8 +35,8 @@ ActorMultiTexture::ActorMultiTexture( const ActorMultiTexture &cpy ):
|
||||
CPY( m_aTextureUnits );
|
||||
#undef CPY
|
||||
|
||||
FOREACH( TextureUnitState, m_aTextureUnits, tex )
|
||||
tex->m_pTexture = TEXTUREMAN->CopyTexture( tex->m_pTexture );
|
||||
for (TextureUnitState &tex : m_aTextureUnits)
|
||||
tex.m_pTexture = TEXTUREMAN->CopyTexture( tex.m_pTexture );
|
||||
}
|
||||
|
||||
void ActorMultiTexture::SetTextureCoords( const RectF &r )
|
||||
@@ -58,14 +58,14 @@ void ActorMultiTexture::SetSizeFromTexture( RageTexture *pTexture )
|
||||
|
||||
void ActorMultiTexture::ClearTextures()
|
||||
{
|
||||
FOREACH( TextureUnitState, m_aTextureUnits, tex )
|
||||
TEXTUREMAN->UnloadTexture( tex->m_pTexture );
|
||||
for (TextureUnitState &tex : m_aTextureUnits)
|
||||
TEXTUREMAN->UnloadTexture( tex.m_pTexture );
|
||||
m_aTextureUnits.clear();
|
||||
}
|
||||
|
||||
int ActorMultiTexture::AddTexture( RageTexture *pTexture )
|
||||
{
|
||||
if( pTexture == NULL )
|
||||
if( pTexture == nullptr )
|
||||
{
|
||||
LOG->Warn( "Can't add nil texture to ActorMultiTexture" );
|
||||
return m_aTextureUnits.size();
|
||||
|
||||
Reference in New Issue
Block a user