From 336cd3e4239cd31a6f946761807bd5b18acde63f Mon Sep 17 00:00:00 2001 From: Samuel Fadel Date: Wed, 6 Jan 2016 13:01:15 +0100 Subject: Added note to unsafe code in the Main singleton. --- main.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/main.h b/main.h index 474c7c2..b6bed67 100644 --- a/main.h +++ b/main.h @@ -10,8 +10,8 @@ class Main : public QObject { Q_OBJECT public: - static Main *instance() - { + static Main *instance() { + // FIXME: Possibly dangerous static Main *m = 0; if (m == 0) { m = new Main(); @@ -20,8 +20,7 @@ public: return m; } - Q_INVOKABLE bool saveData() const - { + Q_INVOKABLE bool saveData() const { bool ret = true; if (m_subsample.n_elem > 0 && m_indicesSavePath.size() > 0) { ret = ret && m_subsample.save(m_subsampleSavePath, arma::raw_ascii); -- cgit v1.2.3