Simplify.
This commit is contained in:
@@ -14,21 +14,11 @@
|
|||||||
#include "RageUtil_AutoPtr.h"
|
#include "RageUtil_AutoPtr.h"
|
||||||
REGISTER_CLASS_TRAITS( NoteData, new NoteData(*pCopy) )
|
REGISTER_CLASS_TRAITS( NoteData, new NoteData(*pCopy) )
|
||||||
|
|
||||||
NoteData::NoteData()
|
|
||||||
{
|
|
||||||
Init();
|
|
||||||
}
|
|
||||||
|
|
||||||
void NoteData::Init()
|
void NoteData::Init()
|
||||||
{
|
{
|
||||||
ClearAll();
|
|
||||||
m_TapNotes = vector<TrackMap>(); // ensure that the memory is freed
|
m_TapNotes = vector<TrackMap>(); // ensure that the memory is freed
|
||||||
}
|
}
|
||||||
|
|
||||||
NoteData::~NoteData()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
void NoteData::SetNumTracks( int iNewNumTracks )
|
void NoteData::SetNumTracks( int iNewNumTracks )
|
||||||
{
|
{
|
||||||
ASSERT( iNewNumTracks > 0 );
|
ASSERT( iNewNumTracks > 0 );
|
||||||
|
|||||||
@@ -58,13 +58,13 @@ private:
|
|||||||
vector<TrackMap> m_TapNotes;
|
vector<TrackMap> m_TapNotes;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
NoteData();
|
|
||||||
~NoteData();
|
|
||||||
void Init();
|
void Init();
|
||||||
|
|
||||||
int GetNumTracks() const { return m_TapNotes.size(); }
|
int GetNumTracks() const { return m_TapNotes.size(); }
|
||||||
void SetNumTracks( int iNewNumTracks );
|
void SetNumTracks( int iNewNumTracks );
|
||||||
bool IsComposite() const;
|
bool IsComposite() const;
|
||||||
|
bool operator==( const NoteData &nd ) const { return m_TapNotes == nd.m_TapNotes; }
|
||||||
|
bool operator!=( const NoteData &nd ) const { return m_TapNotes != nd.m_TapNotes; }
|
||||||
|
|
||||||
/* Return the note at the given track and row. Row may be out of
|
/* Return the note at the given track and row. Row may be out of
|
||||||
* range; pretend the song goes on with TAP_EMPTYs indefinitely. */
|
* range; pretend the song goes on with TAP_EMPTYs indefinitely. */
|
||||||
@@ -195,7 +195,8 @@ public:
|
|||||||
void LoadFromNode( const XNode* pNode );
|
void LoadFromNode( const XNode* pNode );
|
||||||
};
|
};
|
||||||
|
|
||||||
namespace std {
|
namespace std
|
||||||
|
{
|
||||||
template<> inline void swap<NoteData>( NoteData &nd1, NoteData &nd2 ) { nd1.swap( nd2 ); }
|
template<> inline void swap<NoteData>( NoteData &nd1, NoteData &nd2 ) { nd1.swap( nd2 ); }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user