This commit is contained in:
Steve Checkoway
2006-08-23 20:45:30 +00:00
parent 540965cb40
commit dd7871b0c6
2 changed files with 8 additions and 8 deletions
+7 -7
View File
@@ -31,7 +31,7 @@ Steps::Steps()
m_bSavedToDisk = false; m_bSavedToDisk = false;
m_StepsType = STEPS_TYPE_INVALID; m_StepsType = STEPS_TYPE_INVALID;
m_LoadedFromProfile = ProfileSlot_INVALID; m_LoadedFromProfile = ProfileSlot_INVALID;
m_uHash = 0; m_iHash = 0;
m_Difficulty = DIFFICULTY_INVALID; m_Difficulty = DIFFICULTY_INVALID;
m_iMeter = 0; m_iMeter = 0;
@@ -49,16 +49,16 @@ unsigned Steps::GetHash() const
{ {
if( parent ) if( parent )
return parent->GetHash(); return parent->GetHash();
if( m_uHash ) if( m_iHash )
return m_uHash; return m_iHash;
if( m_sNoteDataCompressed.empty() ) if( m_sNoteDataCompressed.empty() )
{ {
if( !m_bNoteDataIsFilled ) if( !m_bNoteDataIsFilled )
return 0; // No data, no hash. return 0; // No data, no hash.
NoteDataUtil::GetSMNoteDataString( *m_pNoteData, m_sNoteDataCompressed ); NoteDataUtil::GetSMNoteDataString( *m_pNoteData, m_sNoteDataCompressed );
} }
m_uHash = GetHashForString( m_sNoteDataCompressed ); m_iHash = GetHashForString( m_sNoteDataCompressed );
return m_uHash; return m_iHash;
} }
void Steps::SetNoteData( const NoteData& noteDataNew ) void Steps::SetNoteData( const NoteData& noteDataNew )
@@ -78,7 +78,7 @@ void Steps::SetNoteData( const NoteData& noteDataNew )
m_bNoteDataIsFilled = true; m_bNoteDataIsFilled = true;
m_sNoteDataCompressed = EMPTY_STRING; m_sNoteDataCompressed = EMPTY_STRING;
m_uHash = 0; m_iHash = 0;
m_sFilename = EMPTY_STRING; // We can no longer read from the file because it has changed in memory. m_sFilename = EMPTY_STRING; // We can no longer read from the file because it has changed in memory.
} }
@@ -103,7 +103,7 @@ void Steps::SetSMNoteData( const RString &notes_comp_ )
m_bNoteDataIsFilled = false; m_bNoteDataIsFilled = false;
m_sNoteDataCompressed = notes_comp_; m_sNoteDataCompressed = notes_comp_;
m_uHash = 0; m_iHash = 0;
m_sFilename = EMPTY_STRING; // We can no longer read from the file because it has changed in memory. m_sFilename = EMPTY_STRING; // We can no longer read from the file because it has changed in memory.
} }
+1 -1
View File
@@ -87,7 +87,7 @@ private:
ProfileSlot m_LoadedFromProfile; // ProfileSlot_INVALID if wasn't loaded from a profile ProfileSlot m_LoadedFromProfile; // ProfileSlot_INVALID if wasn't loaded from a profile
/* These values are pulled from the autogen source first, if there is one. */ /* These values are pulled from the autogen source first, if there is one. */
mutable unsigned m_uHash; // only used if m_Difficulty == DIFFICULTY_EDIT mutable unsigned m_iHash; // only used if m_Difficulty == DIFFICULTY_EDIT
RString m_sDescription; // Step author, edit name, or something meaningful RString m_sDescription; // Step author, edit name, or something meaningful
Difficulty m_Difficulty; // difficulty classification Difficulty m_Difficulty; // difficulty classification
int m_iMeter; // difficulty rating from MIN_METER to MAX_METER int m_iMeter; // difficulty rating from MIN_METER to MAX_METER