summaryrefslogtreecommitdiffstats
path: root/modules/mono/mono_gd/gd_mono.h
diff options
context:
space:
mode:
authorIgnacio Etcheverry <ignalfonsore@gmail.com>2019-01-29 00:02:35 +0100
committerIgnacio Etcheverry <ignalfonsore@gmail.com>2019-02-03 05:38:40 +0100
commitd3c51a5dfb5fb26081d64e16b198ee9ae1beb481 (patch)
treeb5729265b5ae40acb8f89e8403350db338f36bdc /modules/mono/mono_gd/gd_mono.h
parenteb1e3ee2328c05f40652021cea0db01f8e83d307 (diff)
downloadredot-engine-d3c51a5dfb5fb26081d64e16b198ee9ae1beb481.tar.gz
Mono: Cleanup
Diffstat (limited to 'modules/mono/mono_gd/gd_mono.h')
-rw-r--r--modules/mono/mono_gd/gd_mono.h22
1 files changed, 10 insertions, 12 deletions
diff --git a/modules/mono/mono_gd/gd_mono.h b/modules/mono/mono_gd/gd_mono.h
index 13de3061b3..06904cfb34 100644
--- a/modules/mono/mono_gd/gd_mono.h
+++ b/modules/mono/mono_gd/gd_mono.h
@@ -134,13 +134,11 @@ class GDMono {
Error _load_tools_domain();
#endif
-#ifdef DEBUG_METHODS_ENABLED
uint64_t api_core_hash;
#ifdef TOOLS_ENABLED
uint64_t api_editor_hash;
#endif
void _initialize_and_check_api_hashes();
-#endif
GDMonoLog *gdmono_log;
@@ -152,11 +150,17 @@ protected:
static GDMono *singleton;
public:
-#ifdef DEBUG_METHODS_ENABLED
- uint64_t get_api_core_hash() { return api_core_hash; }
+ uint64_t get_api_core_hash() {
+ if (api_core_hash == 0)
+ api_core_hash = ClassDB::get_api_hash(ClassDB::API_CORE);
+ return api_core_hash;
+ }
#ifdef TOOLS_ENABLED
- uint64_t get_api_editor_hash() { return api_editor_hash; }
-#endif
+ uint64_t get_api_editor_hash() {
+ if (api_editor_hash == 0)
+ api_editor_hash = ClassDB::get_api_hash(ClassDB::API_EDITOR);
+ return api_editor_hash;
+ }
#endif
#ifdef TOOLS_ENABLED
@@ -268,12 +272,6 @@ class _GodotSharp : public Object {
List<NodePath *> np_delete_queue;
List<RID *> rid_delete_queue;
- bool queue_empty;
-
-#ifndef NO_THREADS
- Mutex *queue_mutex;
-#endif
-
protected:
static _GodotSharp *singleton;
static void _bind_methods();