summaryrefslogtreecommitdiff
path: root/core/os
diff options
context:
space:
mode:
Diffstat (limited to 'core/os')
-rw-r--r--core/os/memory.h8
-rw-r--r--core/os/os.h8
2 files changed, 8 insertions, 8 deletions
diff --git a/core/os/memory.h b/core/os/memory.h
index baa96ef3e9..42ba9634e2 100644
--- a/core/os/memory.h
+++ b/core/os/memory.h
@@ -197,4 +197,12 @@ struct _GlobalNilClass {
static _GlobalNil _nil;
};
+template <class T>
+class DefaultTypedAllocator {
+public:
+ template <class... Args>
+ _FORCE_INLINE_ T *new_allocation(const Args &&...p_args) { return memnew(T(p_args...)); }
+ _FORCE_INLINE_ void delete_allocation(T *p_allocation) { memdelete(p_allocation); }
+};
+
#endif // MEMORY_H
diff --git a/core/os/os.h b/core/os/os.h
index 5eac77d634..157b8ab992 100644
--- a/core/os/os.h
+++ b/core/os/os.h
@@ -82,11 +82,6 @@ public:
RENDER_SEPARATE_THREAD
};
- enum RenderMainThreadMode {
- RENDER_MAIN_THREAD_ONLY,
- RENDER_ANY_THREAD,
- };
-
protected:
friend class Main;
// Needed by tests to setup command-line args.
@@ -94,7 +89,6 @@ protected:
HasServerFeatureCallback has_server_feature_callback = nullptr;
RenderThreadMode _render_thread_mode = RENDER_THREAD_SAFE;
- RenderMainThreadMode _render_main_thread_mode = RENDER_ANY_THREAD;
// Functions used by Main to initialize/deinitialize the OS.
void add_logger(Logger *p_logger);
@@ -258,8 +252,6 @@ public:
virtual uint64_t get_free_static_memory() const;
RenderThreadMode get_render_thread_mode() const { return _render_thread_mode; }
- RenderMainThreadMode get_render_main_thread_mode() const { return _render_main_thread_mode; }
- void set_render_main_thread_mode(RenderMainThreadMode p_thread_mode) { _render_main_thread_mode = p_thread_mode; }
virtual String get_locale() const;
String get_locale_language() const;