From a94148ca4c34460b3255e7a830839a312b630b84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gilles=20Roudi=C3=A8re?= Date: Mon, 28 Feb 2022 15:44:54 +0100 Subject: [PATCH] Reorder native extension initialization steps --- include/godot_cpp/godot.hpp | 4 ++-- src/godot.cpp | 16 ++++++++-------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/include/godot_cpp/godot.hpp b/include/godot_cpp/godot.hpp index 5ece787d..c816358d 100644 --- a/include/godot_cpp/godot.hpp +++ b/include/godot_cpp/godot.hpp @@ -68,14 +68,14 @@ public: void register_core_initializer(Callback p_core_init) const; void register_server_initializer(Callback p_server_init) const; + void register_driver_initializer(Callback p_driver_init) const; void register_scene_initializer(Callback p_scene_init) const; void register_editor_initializer(Callback p_editor_init) const; - void register_driver_initializer(Callback p_driver_init) const; void register_core_terminator(Callback p_core_terminate) const; void register_server_terminator(Callback p_server_terminate) const; void register_scene_terminator(Callback p_scene_terminate) const; - void register_editor_terminator(Callback p_editor_terminate) const; void register_driver_terminator(Callback p_driver_terminate) const; + void register_editor_terminator(Callback p_editor_terminate) const; GDNativeBool init() const; }; diff --git a/src/godot.cpp b/src/godot.cpp index 74906f39..94288d4c 100644 --- a/src/godot.cpp +++ b/src/godot.cpp @@ -103,14 +103,14 @@ void GDExtensionBinding::InitObject::register_scene_initializer(Callback p_scene GDExtensionBinding::init_callbacks[GDNATIVE_INITIALIZATION_SCENE] = p_scene_init; } -void GDExtensionBinding::InitObject::register_editor_initializer(Callback p_editor_init) const { - GDExtensionBinding::init_callbacks[GDNATIVE_INITIALIZATION_EDITOR] = p_editor_init; -} - void GDExtensionBinding::InitObject::register_driver_initializer(Callback p_driver_init) const { GDExtensionBinding::init_callbacks[GDNATIVE_INITIALIZATION_DRIVER] = p_driver_init; } +void GDExtensionBinding::InitObject::register_editor_initializer(Callback p_editor_init) const { + GDExtensionBinding::init_callbacks[GDNATIVE_INITIALIZATION_EDITOR] = p_editor_init; +} + void GDExtensionBinding::InitObject::register_core_terminator(Callback p_core_terminate) const { GDExtensionBinding::terminate_callbacks[GDNATIVE_INITIALIZATION_CORE] = p_core_terminate; } @@ -123,14 +123,14 @@ void GDExtensionBinding::InitObject::register_scene_terminator(Callback p_scene_ GDExtensionBinding::terminate_callbacks[GDNATIVE_INITIALIZATION_SCENE] = p_scene_terminate; } -void GDExtensionBinding::InitObject::register_editor_terminator(Callback p_editor_terminate) const { - GDExtensionBinding::terminate_callbacks[GDNATIVE_INITIALIZATION_EDITOR] = p_editor_terminate; -} - void GDExtensionBinding::InitObject::register_driver_terminator(Callback p_driver_terminate) const { GDExtensionBinding::terminate_callbacks[GDNATIVE_INITIALIZATION_DRIVER] = p_driver_terminate; } +void GDExtensionBinding::InitObject::register_editor_terminator(Callback p_editor_terminate) const { + GDExtensionBinding::terminate_callbacks[GDNATIVE_INITIALIZATION_EDITOR] = p_editor_terminate; +} + GDNativeBool GDExtensionBinding::InitObject::init() const { return GDExtensionBinding::init(gdn_interface, library, initialization); }