From a706a9ceb91116aa20895df3b422c164378dc353 Mon Sep 17 00:00:00 2001 From: Emmanuel Leblond Date: Sun, 23 Oct 2022 14:38:29 +0200 Subject: [PATCH] Remove now useless `_alloc_and_copy_cstr` --- include/godot_cpp/classes/wrapped.hpp | 7 ------- include/godot_cpp/core/class_db.hpp | 7 ------- include/godot_cpp/core/method_bind.hpp | 7 ------- 3 files changed, 21 deletions(-) diff --git a/include/godot_cpp/classes/wrapped.hpp b/include/godot_cpp/classes/wrapped.hpp index 83c4cc30..58da7712 100644 --- a/include/godot_cpp/classes/wrapped.hpp +++ b/include/godot_cpp/classes/wrapped.hpp @@ -87,13 +87,6 @@ public: return 0; } - static _FORCE_INLINE_ char *_alloc_and_copy_cstr(const char *p_str) { - size_t size = strlen(p_str) + 1; - char *ret = reinterpret_cast(memalloc(size)); - memcpy(ret, p_str, size); - return ret; - } - // Must be public but you should not touch this. GodotObject *_owner = nullptr; }; diff --git a/include/godot_cpp/core/class_db.hpp b/include/godot_cpp/core/class_db.hpp index f6fbd39f..0353621e 100644 --- a/include/godot_cpp/core/class_db.hpp +++ b/include/godot_cpp/core/class_db.hpp @@ -109,13 +109,6 @@ private: static void initialize_class(const ClassInfo &cl); static void bind_method_godot(const StringName &p_class_name, MethodBind *p_method); - static _FORCE_INLINE_ char *_alloc_and_copy_cstr(const char *p_str) { - size_t size = strlen(p_str) + 1; - char *ret = reinterpret_cast(memalloc(size)); - memcpy(ret, p_str, size); - return ret; - } - template static void _register_class(bool p_virtual = false); diff --git a/include/godot_cpp/core/method_bind.hpp b/include/godot_cpp/core/method_bind.hpp index 812409e9..c80c0408 100644 --- a/include/godot_cpp/core/method_bind.hpp +++ b/include/godot_cpp/core/method_bind.hpp @@ -175,13 +175,6 @@ public: ERR_FAIL(); // Can't call. } - static _FORCE_INLINE_ char *_alloc_and_copy_cstr(const char *p_str) { - size_t size = strlen(p_str) + 1; - char *ret = reinterpret_cast(memalloc(size)); - memcpy(ret, p_str, size); - return ret; - } - MethodBindVarArgBase( R (T::*p_method)(const Variant **, GDNativeInt, GDNativeCallError &), const MethodInfo &p_method_info,