Integrate C++11 branch into 5_1-new
This commit is contained in:
+7
-8
@@ -10,7 +10,6 @@
|
||||
#include "RageLog.h"
|
||||
#include "XmlFile.h"
|
||||
#include "GameState.h" // blame radar calculations.
|
||||
#include "Foreach.h"
|
||||
#include "RageUtil_AutoPtr.h"
|
||||
|
||||
REGISTER_CLASS_TRAITS( NoteData, new NoteData(*pCopy) )
|
||||
@@ -31,8 +30,8 @@ bool NoteData::IsComposite() const
|
||||
{
|
||||
for( int track = 0; track < GetNumTracks(); ++track )
|
||||
{
|
||||
FOREACHM_CONST( int, TapNote, m_TapNotes[track], tn )
|
||||
if( tn->second.pn != PLAYER_INVALID )
|
||||
for (std::pair<int, TapNote> const &tn : m_TapNotes[track])
|
||||
if( tn.second.pn != PLAYER_INVALID )
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
@@ -351,13 +350,13 @@ void NoteData::AddHoldNote( int iTrack, int iStartRow, int iEndRow, TapNote tn )
|
||||
}
|
||||
|
||||
/* Determine if a hold note lies on the given spot. Return true if so. If
|
||||
* pHeadRow is non-NULL, return the row of the head. */
|
||||
* pHeadRow is non-nullptr, return the row of the head. */
|
||||
bool NoteData::IsHoldHeadOrBodyAtRow( int iTrack, int iRow, int *pHeadRow ) const
|
||||
{
|
||||
const TapNote &tn = GetTapNote( iTrack, iRow );
|
||||
if( tn.type == TapNoteType_HoldHead )
|
||||
{
|
||||
if( pHeadRow != NULL )
|
||||
if( pHeadRow != nullptr )
|
||||
*pHeadRow = iRow;
|
||||
return true;
|
||||
}
|
||||
@@ -366,13 +365,13 @@ bool NoteData::IsHoldHeadOrBodyAtRow( int iTrack, int iRow, int *pHeadRow ) cons
|
||||
}
|
||||
|
||||
/* Determine if a hold note lies on the given spot. Return true if so. If
|
||||
* pHeadRow is non-NULL, return the row of the head. (Note that this returns
|
||||
* pHeadRow is non-nullptr, return the row of the head. (Note that this returns
|
||||
* false if a hold head lies on iRow itself.) */
|
||||
/* XXX: rename this to IsHoldBodyAtRow */
|
||||
bool NoteData::IsHoldNoteAtRow( int iTrack, int iRow, int *pHeadRow ) const
|
||||
{
|
||||
int iDummy;
|
||||
if( pHeadRow == NULL )
|
||||
if( pHeadRow == nullptr )
|
||||
pHeadRow = &iDummy;
|
||||
|
||||
/* Starting at iRow, search upwards. If we find a TapNoteType_HoldHead, we're within
|
||||
@@ -1343,7 +1342,7 @@ NoteData::_all_tracks_iterator<ND, iter, TN>::_all_tracks_iterator( const _all_t
|
||||
template<typename ND, typename iter, typename TN>
|
||||
NoteData::_all_tracks_iterator<ND, iter, TN>::~_all_tracks_iterator()
|
||||
{
|
||||
if(m_pNoteData != NULL)
|
||||
if(m_pNoteData != nullptr)
|
||||
{
|
||||
m_pNoteData->RemoveATIFromList(this);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user