Integrate C++11 branch into 5_1-new
This commit is contained in:
@@ -14,8 +14,8 @@ REGISTER_ACTOR_CLASS( CourseContentsList );
|
||||
|
||||
CourseContentsList::~CourseContentsList()
|
||||
{
|
||||
FOREACH( Actor *, m_vpDisplay, d )
|
||||
delete *d;
|
||||
for (Actor *d : m_vpDisplay)
|
||||
delete d;
|
||||
m_vpDisplay.clear();
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ void CourseContentsList::LoadFromNode( const XNode* pNode )
|
||||
pNode->GetAttrValue( "MaxSongs", iMaxSongs );
|
||||
|
||||
const XNode *pDisplayNode = pNode->GetChild( "Display" );
|
||||
if( pDisplayNode == NULL )
|
||||
if( pDisplayNode == nullptr )
|
||||
{
|
||||
LuaHelpers::ReportScriptErrorFmt("%s: CourseContentsList: missing the Display child", ActorUtil::GetWhere(pNode).c_str());
|
||||
return;
|
||||
@@ -48,7 +48,7 @@ void CourseContentsList::SetFromGameState()
|
||||
if( GAMESTATE->GetMasterPlayerNumber() == PlayerNumber_Invalid )
|
||||
return;
|
||||
const Trail *pMasterTrail = GAMESTATE->m_pCurTrail[GAMESTATE->GetMasterPlayerNumber()];
|
||||
if( pMasterTrail == NULL )
|
||||
if( pMasterTrail == nullptr )
|
||||
return;
|
||||
unsigned uNumEntriesToShow = pMasterTrail->m_vEntries.size();
|
||||
CLAMP( uNumEntriesToShow, 0, m_vpDisplay.size() );
|
||||
@@ -81,21 +81,21 @@ void CourseContentsList::SetItemFromGameState( Actor *pActor, int iCourseEntryIn
|
||||
FOREACH_HumanPlayer(pn)
|
||||
{
|
||||
const Trail *pTrail = GAMESTATE->m_pCurTrail[pn];
|
||||
if( pTrail == NULL
|
||||
if( pTrail == nullptr
|
||||
|| iCourseEntryIndex >= (int) pTrail->m_vEntries.size()
|
||||
|| iCourseEntryIndex >= (int) pCourse->m_vEntries.size() )
|
||||
continue;
|
||||
|
||||
const TrailEntry *te = &pTrail->m_vEntries[iCourseEntryIndex];
|
||||
const CourseEntry *ce = &pCourse->m_vEntries[iCourseEntryIndex];
|
||||
if( te == NULL )
|
||||
if( te == nullptr )
|
||||
continue;
|
||||
|
||||
RString s;
|
||||
Difficulty dc;
|
||||
if( te->bSecret )
|
||||
{
|
||||
if( ce == NULL )
|
||||
if( ce == nullptr )
|
||||
continue;
|
||||
|
||||
int iLow = ce->stepsCriteria.m_iLowMeter;
|
||||
|
||||
Reference in New Issue
Block a user