summaryrefslogtreecommitdiffhomepage
path: root/logic/tracklogger.hpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2018-07-08 23:20:56 +0200
committerStanislaw Halik <sthalik@misaki.pl>2018-07-08 23:20:56 +0200
commit90940a774eab876c38d5cef981b4be5bae67a462 (patch)
tree2e60edc1719ffd53752a55a7f0444166965e90c5 /logic/tracklogger.hpp
parente3292e1ddaa8d69eb320d2700fc582b4675cf8ce (diff)
modernize only
Diffstat (limited to 'logic/tracklogger.hpp')
-rw-r--r--logic/tracklogger.hpp38
1 files changed, 9 insertions, 29 deletions
diff --git a/logic/tracklogger.hpp b/logic/tracklogger.hpp
index 0a8d5410..d6c34157 100644
--- a/logic/tracklogger.hpp
+++ b/logic/tracklogger.hpp
@@ -5,41 +5,21 @@
#include <fstream>
#include <QString>
-#include <QMessageBox>
-#include <QWidget>
+#include <QDebug>
class OTR_LOGIC_EXPORT TrackLogger
{
- TrackLogger(TrackLogger&&) = delete;
- TrackLogger(const TrackLogger&) = delete;
- TrackLogger& operator=(const TrackLogger&) = delete;
- TrackLogger& operator=(TrackLogger&&) = delete;
-
Timer t;
public:
- TrackLogger()
- {
- }
-
- virtual ~TrackLogger();
-
- virtual void write(const char *)
- {
- }
+ TrackLogger() = default;
+ virtual ~TrackLogger() = default;
- virtual void write(const double *, int)
- {
- }
+ virtual void write(const char *) {}
+ virtual void write(const double *, int) {}
+ virtual void next_line() {}
- virtual void next_line()
- {
- }
-
- void write_pose(const double *p)
- {
- write(p, 6);
- }
+ void write_pose(const double *p);
void reset_dt();
void write_dt();
@@ -49,10 +29,10 @@ public:
class OTR_LOGIC_EXPORT TrackLoggerCSV : public TrackLogger
{
std::ofstream out;
- bool first_col;
+ bool first_col = true;
inline void handle_first_col_sep();
public:
- TrackLoggerCSV(const QString &filename) : first_col(true)
+ explicit TrackLoggerCSV(const QString &filename)
{
out.open(filename.toStdString());
}