Inline static variables (part 1)

This commit is contained in:
kobewi
2025-04-28 20:27:50 +02:00
parent 67c96c89cc
commit 5af4bef46f
52 changed files with 85 additions and 247 deletions

View File

@@ -48,7 +48,7 @@ class ResourceLoader : public Object {
protected:
static void _bind_methods();
static ResourceLoader *singleton;
static inline ResourceLoader *singleton = nullptr;
public:
enum ThreadLoadStatus {
@@ -93,7 +93,7 @@ class ResourceSaver : public Object {
protected:
static void _bind_methods();
static ResourceSaver *singleton;
static inline ResourceSaver *singleton = nullptr;
public:
enum SaverFlags {
@@ -162,7 +162,7 @@ class OS : public Object {
protected:
static void _bind_methods();
static OS *singleton;
static inline OS *singleton = nullptr;
#ifndef DISABLE_DEPRECATED
Dictionary _execute_with_pipe_bind_compat_94434(const String &p_path, const Vector<String> &p_arguments);
@@ -322,7 +322,7 @@ public:
class Geometry2D : public Object {
GDCLASS(Geometry2D, Object);
static Geometry2D *singleton;
static inline Geometry2D *singleton = nullptr;
protected:
static void _bind_methods();
@@ -388,7 +388,7 @@ public:
class Geometry3D : public Object {
GDCLASS(Geometry3D, Object);
static Geometry3D *singleton;
static inline Geometry3D *singleton = nullptr;
protected:
static void _bind_methods();
@@ -419,7 +419,7 @@ public:
class Marshalls : public Object {
GDCLASS(Marshalls, Object);
static Marshalls *singleton;
static inline Marshalls *singleton = nullptr;
protected:
static void _bind_methods();
@@ -570,7 +570,7 @@ class Engine : public Object {
protected:
static void _bind_methods();
static Engine *singleton;
static inline Engine *singleton = nullptr;
public:
static Engine *get_singleton() { return singleton; }
@@ -650,7 +650,7 @@ class EngineDebugger : public Object {
protected:
static void _bind_methods();
static EngineDebugger *singleton;
static inline EngineDebugger *singleton = nullptr;
public:
static EngineDebugger *get_singleton() { return singleton; }