diff options
author | Samuel Fadel <samuelfadel@gmail.com> | 2016-01-06 13:01:15 +0100 |
---|---|---|
committer | Samuel Fadel <samuelfadel@gmail.com> | 2016-01-06 13:01:15 +0100 |
commit | 336cd3e4239cd31a6f946761807bd5b18acde63f (patch) | |
tree | 6d490b18061a7861c8f99b68a31d1a5544b3f6a5 | |
parent | b8048c4c0ea797908ce8365da7466a6b6b9f6d36 (diff) |
Added note to unsafe code in the Main singleton.
-rw-r--r-- | main.h | 7 |
1 files changed, 3 insertions, 4 deletions
@@ -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); |