pingus-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Pingus-CVS] r4150 - branches/pingus-hanusz/src


From: grumbel
Subject: [Pingus-CVS] r4150 - branches/pingus-hanusz/src
Date: Thu, 12 May 2011 19:12:11 +0200

Author: grumbel
Date: 2011-05-12 19:12:11 +0200 (Thu, 12 May 2011)
New Revision: 4150

Modified:
   branches/pingus-hanusz/src/statistics.cpp
Log:
Output proper CSV


Modified: branches/pingus-hanusz/src/statistics.cpp
===================================================================
--- branches/pingus-hanusz/src/statistics.cpp   2011-05-12 16:40:55 UTC (rev 
4149)
+++ branches/pingus-hanusz/src/statistics.cpp   2011-05-12 17:12:11 UTC (rev 
4150)
@@ -37,6 +37,11 @@
 Statistics::set_username(const std::string& username)
 {
   m_username = username;
+  for(std::string::iterator i = m_username.begin(); i != m_username.end(); ++i)
+  {
+    if (*i == ';')
+      *i = ':';
+  }
 }
 
 void
@@ -50,11 +55,11 @@
   }
   else
   {
-    m_out << m_username << ", "
-          << result.plf.get_resname() << ", "
-          << result.saved << ", "
-          << result.killed << ", "
-          << result.used_time << ", "
+    m_out << m_username << ";"
+          << result.plf.get_resname() << ";"
+          << result.saved << ";"
+          << result.killed << ";"
+          << result.used_time << ";"
           << (result.success()?"success":"failure") << std::endl;
   }
 }




reply via email to

[Prev in Thread] Current Thread [Next in Thread]