From c6ecc04114c17b60840fa12d45e2c9ce14fe9f56 Mon Sep 17 00:00:00 2001 From: Raul Santos Date: Fri, 22 Oct 2021 19:25:01 +0200 Subject: Keep order for C# exported members --- modules/mono/csharp_script.cpp | 16 ++++++++-------- modules/mono/csharp_script.h | 4 ++-- 2 files changed, 10 insertions(+), 10 deletions(-) (limited to 'modules') diff --git a/modules/mono/csharp_script.cpp b/modules/mono/csharp_script.cpp index 26a04a358d..531f600c3f 100644 --- a/modules/mono/csharp_script.cpp +++ b/modules/mono/csharp_script.cpp @@ -1813,8 +1813,8 @@ void CSharpInstance::get_event_signals_state_for_reloading(List *p_properties) const { - for (const KeyValue &E : script->member_info) { - p_properties->push_back(E.value); + for (OrderedHashMap::ConstElement E = script->member_info.front(); E; E = E.next()) { + p_properties->push_front(E.value()); } // Call _get_property_list @@ -1839,10 +1839,9 @@ void CSharpInstance::get_property_list(List *p_properties) const { for (int i = 0, size = array.size(); i < size; i++) { p_properties->push_back(PropertyInfo::from_dict(array.get(i))); } - return; } - break; + return; } top = top->get_parent_class(); @@ -1865,8 +1864,9 @@ Variant::Type CSharpInstance::get_property_type(const StringName &p_name, bool * } void CSharpInstance::get_method_list(List *p_list) const { - if (!script->is_valid() || !script->script_class) + if (!script->is_valid() || !script->script_class) { return; + } GD_MONO_SCOPE_THREAD_ATTACH; @@ -3499,9 +3499,9 @@ Ref