diff --git a/gdnative/string_name.cpp b/gdnative/string_name.cpp index 105b8b7..624de0f 100644 --- a/gdnative/string_name.cpp +++ b/gdnative/string_name.cpp @@ -41,17 +41,6 @@ extern "C" { static_assert(sizeof(pandemonium_string_name) == sizeof(StringName), "StringName size mismatch"); -void GDAPI pandemonium_string_name_new(pandemonium_string_name *r_dest, const pandemonium_string *p_name) { - StringName *dest = (StringName *)r_dest; - const String *name = (const String *)p_name; - memnew_placement(dest, StringName(*name)); -} - -void GDAPI pandemonium_string_name_new_data(pandemonium_string_name *r_dest, const char *p_name) { - StringName *dest = (StringName *)r_dest; - memnew_placement(dest, StringName(p_name)); -} - pandemonium_string GDAPI pandemonium_string_name_get_name(const pandemonium_string_name *p_self) { pandemonium_string ret; const StringName *self = (const StringName *)p_self; @@ -81,6 +70,17 @@ pandemonium_bool GDAPI pandemonium_string_name_operator_less(const pandemonium_s return *self < *other; } +void GDAPI pandemonium_string_name_new(pandemonium_string_name *r_dest, const pandemonium_string *p_name) { + StringName *dest = (StringName *)r_dest; + const String *name = (const String *)p_name; + memnew_placement(dest, StringName(*name)); +} + +void GDAPI pandemonium_string_name_new_data(pandemonium_string_name *r_dest, const char *p_name) { + StringName *dest = (StringName *)r_dest; + memnew_placement(dest, StringName(p_name)); +} + void GDAPI pandemonium_string_name_destroy(pandemonium_string_name *p_self) { StringName *self = (StringName *)p_self; self->~StringName(); diff --git a/include/gdn/string_name.h b/include/gdn/string_name.h index 01b0e3f..154ead1 100644 --- a/include/gdn/string_name.h +++ b/include/gdn/string_name.h @@ -58,9 +58,6 @@ typedef struct { extern "C" { #endif -void GDAPI pandemonium_string_name_new(pandemonium_string_name *r_dest, const pandemonium_string *p_name); -void GDAPI pandemonium_string_name_new_data(pandemonium_string_name *r_dest, const char *p_name); - pandemonium_string GDAPI pandemonium_string_name_get_name(const pandemonium_string_name *p_self); uint32_t GDAPI pandemonium_string_name_get_hash(const pandemonium_string_name *p_self); @@ -69,6 +66,10 @@ const void GDAPI *pandemonium_string_name_get_data_unique_pointer(const pandemon pandemonium_bool GDAPI pandemonium_string_name_operator_equal(const pandemonium_string_name *p_self, const pandemonium_string_name *p_other); pandemonium_bool GDAPI pandemonium_string_name_operator_less(const pandemonium_string_name *p_self, const pandemonium_string_name *p_other); +void GDAPI pandemonium_string_name_new(pandemonium_string_name *r_dest, const pandemonium_string *p_name); +void GDAPI pandemonium_string_name_new_data(pandemonium_string_name *r_dest, const char *p_name); +//static variant + void GDAPI pandemonium_string_name_destroy(pandemonium_string_name *p_self); #ifdef __cplusplus