From 3d90a3339429c0be0c9725aca4b34ed3921c1dab Mon Sep 17 00:00:00 2001 From: Jason Felds Date: Sun, 10 Feb 2013 10:32:11 -0500 Subject: [PATCH] No point in saving CoinData anymore. --- src/Profile.cpp | 45 --------------------------------------------- src/Profile.h | 2 -- 2 files changed, 47 deletions(-) diff --git a/src/Profile.cpp b/src/Profile.cpp index 20d9236760..1728500701 100644 --- a/src/Profile.cpp +++ b/src/Profile.cpp @@ -39,7 +39,6 @@ const RString EDIT_COURSES_SUBDIR = "EditCourses/"; //const RString UPLOAD_SUBDIR = "Upload/"; const RString RIVAL_SUBDIR = "Rivals/"; -ThemeMetric SHOW_COIN_DATA( "Profile", "ShowCoinData" ); static Preference g_bProfileDataCompress( "ProfileDataCompress", false ); static ThemeMetric UNLOCK_AUTH_STRING( "Profile", "UnlockAuthString" ); #define GUID_SIZE_BYTES 8 @@ -949,8 +948,6 @@ XNode *Profile::SaveStatsXmlCreateNode() const xml->AppendChild( SaveCategoryScoresCreateNode() ); xml->AppendChild( SaveScreenshotDataCreateNode() ); xml->AppendChild( SaveCalorieDataCreateNode() ); - if( SHOW_COIN_DATA.GetValue() && IsMachine() ) - xml->AppendChild( SaveCoinDataCreateNode() ); return xml; } @@ -1839,48 +1836,6 @@ bool Profile::IsMachine() const return this == PROFILEMAN->GetMachineProfile(); } - -XNode* Profile::SaveCoinDataCreateNode() const -{ - CHECKPOINT; - - const Profile* pProfile = this; - ASSERT( pProfile != NULL ); - - XNode* pNode = new XNode( "CoinData" ); - - { - int coins[NUM_LAST_DAYS]; - BOOKKEEPER->GetCoinsLastDays( coins ); - XNode* p = pNode->AppendChild( "LastDays" ); - for( int i=0; iAppendChild( LastDayToString(i), coins[i] ); - } - { - int coins[NUM_LAST_WEEKS]; - BOOKKEEPER->GetCoinsLastWeeks( coins ); - XNode* p = pNode->AppendChild( "LastWeeks" ); - for( int i=0; iAppendChild( LastWeekToString(i), coins[i] ); - } - { - int coins[DAYS_IN_WEEK]; - BOOKKEEPER->GetCoinsByDayOfWeek( coins ); - XNode* p = pNode->AppendChild( "DayOfWeek" ); - for( int i=0; iAppendChild( DayOfWeekToString(i), coins[i] ); - } - { - int coins[HOURS_IN_DAY]; - BOOKKEEPER->GetCoinsByHour( coins ); - XNode* p = pNode->AppendChild( "Hour" ); - for( int i=0; iAppendChild( HourInDayToString(i), coins[i] ); - } - - return pNode; -} - void Profile::MoveBackupToDir( RString sFromDir, RString sToDir ) { if( FILEMAN->IsAFile(sFromDir + STATS_XML) && diff --git a/src/Profile.h b/src/Profile.h index d86941b14c..b791d9dab1 100644 --- a/src/Profile.h +++ b/src/Profile.h @@ -369,8 +369,6 @@ public: XNode* SaveScreenshotDataCreateNode() const; XNode* SaveCalorieDataCreateNode() const; - XNode* SaveCoinDataCreateNode() const; - void SaveStatsWebPageToDir( RString sDir ) const; void SaveMachinePublicKeyToDir( RString sDir ) const;