aboutsummaryrefslogtreecommitdiff
path: root/src/crepe
diff options
context:
space:
mode:
Diffstat (limited to 'src/crepe')
-rw-r--r--src/crepe/system/ScriptSystem.cpp8
-rw-r--r--src/crepe/system/ScriptSystem.h5
-rw-r--r--src/crepe/system/System.h14
3 files changed, 3 insertions, 24 deletions
diff --git a/src/crepe/system/ScriptSystem.cpp b/src/crepe/system/ScriptSystem.cpp
index f1fae4d..f2673e7 100644
--- a/src/crepe/system/ScriptSystem.cpp
+++ b/src/crepe/system/ScriptSystem.cpp
@@ -12,14 +12,6 @@
using namespace std;
using namespace crepe;
-ScriptSystem::ScriptSystem() { dbg_trace(); }
-ScriptSystem::~ScriptSystem() { dbg_trace(); }
-
-ScriptSystem & ScriptSystem::get_instance() {
- static ScriptSystem instance;
- return instance;
-}
-
void ScriptSystem::update() {
using namespace std;
dbg_trace();
diff --git a/src/crepe/system/ScriptSystem.h b/src/crepe/system/ScriptSystem.h
index 32e793c..4fa6141 100644
--- a/src/crepe/system/ScriptSystem.h
+++ b/src/crepe/system/ScriptSystem.h
@@ -10,14 +10,9 @@ class Script;
class ScriptSystem : public System {
public:
- static ScriptSystem & get_instance();
void update();
private:
- ScriptSystem();
- ~ScriptSystem();
-
-private:
// TODO: to forward_list<reference_wrapper>
std::forward_list<Script *> get_scripts();
};
diff --git a/src/crepe/system/System.h b/src/crepe/system/System.h
index ecbb7f5..3b81bef 100644
--- a/src/crepe/system/System.h
+++ b/src/crepe/system/System.h
@@ -4,19 +4,11 @@ namespace crepe {
class System {
public:
- static System & get_instance();
virtual void update() = 0;
-protected:
- System() {};
- virtual ~System() {};
-
-private:
- // singleton
- System(const System &) = delete;
- System(System &&) = delete;
- System & operator=(const System &) = delete;
- System & operator=(System &&) = delete;
+public:
+ System() = default;
+ virtual ~System() = default;
};
} // namespace crepe