summaryrefslogtreecommitdiff
path: root/core/config/engine.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/config/engine.cpp')
-rw-r--r--core/config/engine.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/core/config/engine.cpp b/core/config/engine.cpp
index b0037ffb37..8e2ab094b0 100644
--- a/core/config/engine.cpp
+++ b/core/config/engine.cpp
@@ -219,3 +219,13 @@ Engine *Engine::get_singleton() {
Engine::Engine() {
singleton = this;
}
+
+Engine::Singleton::Singleton(const StringName &p_name, Object *p_ptr) :
+ name(p_name),
+ ptr(p_ptr) {
+#ifdef DEBUG_ENABLED
+ if (Object::cast_to<Reference>(p_ptr)) {
+ ERR_PRINT("A class intended to be used as a singleton must *not* inherit from Reference.");
+ }
+#endif
+}