]> git.jsancho.org Git - lugaru.git/blobdiff - Source/Account.cpp
Replaced as much char* as possible by std::strings
[lugaru.git] / Source / Account.cpp
index b93eff19ad5978f91628d4885a43c70a879c31be..b3d42c7d320eb55bb120848428338baa45d7e719 100644 (file)
@@ -75,7 +75,7 @@ Account* Account::destroy(Account* a)
             return NULL;
         }
     }
-    printf("Unexpected error : User %s not found\n", a->getName());
+    printf("Unexpected error : User %s not found\n", a->getName().c_str());
     return accounts.front();
 }
 
@@ -199,13 +199,12 @@ void Account::saveFile(string filename, Account* accountactive)
 
     tfile = fopen(filename.c_str(), "wb" );
     if (tfile) {
-        printf("writing %d accounts :\n", getNbAccounts());
         fpackf(tfile, "Bi", getNbAccounts());
         fpackf(tfile, "Bi", indice(accountactive));
 
         for (int i = 0; i < getNbAccounts(); i++) {
             Account* a = Account::get(i);
-            printf("writing account %d/%d (%s)\n", i + 1, getNbAccounts(), a->getName());
+            printf("writing account %d/%d (%s)\n", i + 1, getNbAccounts(), a->getName().c_str());
             fpackf(tfile, "Bi", a->difficulty);
             fpackf(tfile, "Bi", a->progress);
             fpackf(tfile, "Bi", a->campaignProgress.size());