浏览代码

Remove now useless `_alloc_and_copy_cstr`

Emmanuel Leblond 2 年之前
父节点
当前提交
a706a9ceb9

+ 0 - 7
include/godot_cpp/classes/wrapped.hpp

@@ -87,13 +87,6 @@ public:
 		return 0;
 		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<char *>(memalloc(size));
-		memcpy(ret, p_str, size);
-		return ret;
-	}
-
 	// Must be public but you should not touch this.
 	// Must be public but you should not touch this.
 	GodotObject *_owner = nullptr;
 	GodotObject *_owner = nullptr;
 };
 };

+ 0 - 7
include/godot_cpp/core/class_db.hpp

@@ -109,13 +109,6 @@ private:
 	static void initialize_class(const ClassInfo &cl);
 	static void initialize_class(const ClassInfo &cl);
 	static void bind_method_godot(const StringName &p_class_name, MethodBind *p_method);
 	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<char *>(memalloc(size));
-		memcpy(ret, p_str, size);
-		return ret;
-	}
-
 	template <class T, bool is_abstract>
 	template <class T, bool is_abstract>
 	static void _register_class(bool p_virtual = false);
 	static void _register_class(bool p_virtual = false);
 
 

+ 0 - 7
include/godot_cpp/core/method_bind.hpp

@@ -175,13 +175,6 @@ public:
 		ERR_FAIL(); // Can't call.
 		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<char *>(memalloc(size));
-		memcpy(ret, p_str, size);
-		return ret;
-	}
-
 	MethodBindVarArgBase(
 	MethodBindVarArgBase(
 			R (T::*p_method)(const Variant **, GDNativeInt, GDNativeCallError &),
 			R (T::*p_method)(const Variant **, GDNativeInt, GDNativeCallError &),
 			const MethodInfo &p_method_info,
 			const MethodInfo &p_method_info,