summaryrefslogtreecommitdiffhomepage
path: root/opentrack-logic/tracklogger.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'opentrack-logic/tracklogger.cpp')
-rw-r--r--opentrack-logic/tracklogger.cpp15
1 files changed, 10 insertions, 5 deletions
diff --git a/opentrack-logic/tracklogger.cpp b/opentrack-logic/tracklogger.cpp
index 5e4cf4f9..f007c2bc 100644
--- a/opentrack-logic/tracklogger.cpp
+++ b/opentrack-logic/tracklogger.cpp
@@ -1,22 +1,27 @@
#include "tracklogger.hpp"
#include "tracker.h"
-
+
+void TrackLoggerCSV::handle_first_col_sep()
+{
+ if (!first_col)
+ out.put(',');
+ first_col = false;
+}
void TrackLoggerCSV::write(const char *s)
{
+ handle_first_col_sep();
out << s;
}
void TrackLoggerCSV::write(const double *p, int n)
{
- if (!first_col)
- out.put(';');
- first_col = false;
+ handle_first_col_sep();
for (int i = 0; i < n-1; ++i)
{
out << p[i];
- out.put(';');
+ out.put(',');
}
out << p[n-1];
}