aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Fadel <samuelfadel@gmail.com>2016-01-06 13:01:15 +0100
committerSamuel Fadel <samuelfadel@gmail.com>2016-01-06 13:01:15 +0100
commit336cd3e4239cd31a6f946761807bd5b18acde63f (patch)
tree6d490b18061a7861c8f99b68a31d1a5544b3f6a5
parentb8048c4c0ea797908ce8365da7466a6b6b9f6d36 (diff)
Added note to unsafe code in the Main singleton.
-rw-r--r--main.h7
1 files 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);