From 4f7da83726433a9e1f7dd7bf9a73ad2561f5d699 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Fri, 12 Aug 2005 01:29:40 +0000 Subject: [PATCH] pull function out of header const --- stepmania/src/HighScore.cpp | 18 ++++++++++++++++++ stepmania/src/HighScore.h | 20 ++------------------ 2 files changed, 20 insertions(+), 18 deletions(-) diff --git a/stepmania/src/HighScore.cpp b/stepmania/src/HighScore.cpp index 3136f94999..eaac8aa87c 100644 --- a/stepmania/src/HighScore.cpp +++ b/stepmania/src/HighScore.cpp @@ -21,6 +21,24 @@ HighScore::HighScore() Unset(); } +void HighScore::Unset() +{ + sName = ""; + grade = GRADE_NO_DATA; + iScore = 0; + fPercentDP = 0; + fSurviveSeconds = 0; + sModifiers = ""; + dateTime.Init(); + sPlayerGuid = ""; + sMachineGuid = ""; + iProductID = 0; + ZERO( iTapNoteScores ); + ZERO( iHoldNoteScores ); + radarValues.MakeUnknown(); + fLifeRemainingSeconds = 0; +} + bool HighScore::operator>=( const HighScore& other ) const { /* Make sure we treat AAAA as higher than AAA, even though the score diff --git a/stepmania/src/HighScore.h b/stepmania/src/HighScore.h index fb655f91d1..240e35c10f 100644 --- a/stepmania/src/HighScore.h +++ b/stepmania/src/HighScore.h @@ -31,28 +31,12 @@ struct HighScore HighScore(); - void Unset() - { - sName = ""; - grade = GRADE_NO_DATA; - iScore = 0; - fPercentDP = 0; - fSurviveSeconds = 0; - sModifiers = ""; - dateTime.Init(); - sPlayerGuid = ""; - sMachineGuid = ""; - iProductID = 0; - ZERO( iTapNoteScores ); - ZERO( iHoldNoteScores ); - radarValues.MakeUnknown(); - fLifeRemainingSeconds = 0; - } + void Unset(); bool operator>=( const HighScore& other ) const; bool operator==( const HighScore& other ) const; - float GetSurvivalSeconds() { return fSurviveSeconds + fLifeRemainingSeconds; } + float GetSurvivalSeconds() const { return fSurviveSeconds + fLifeRemainingSeconds; } XNode* CreateNode() const; void LoadFromNode( const XNode* pNode );