From 87f5fb06912d19b3ff3ba80b747fcea3023a1ed5 Mon Sep 17 00:00:00 2001 From: Thaddeus Crews Date: Sun, 10 Mar 2024 16:02:43 -0500 Subject: Enforce template syntax `typename` over `class` --- .../godot_cpp/variant/callable_method_pointer.hpp | 20 ++++++++++---------- include/godot_cpp/variant/char_string.hpp | 8 ++++---- include/godot_cpp/variant/typed_array.hpp | 2 +- include/godot_cpp/variant/variant.hpp | 4 ++-- 4 files changed, 17 insertions(+), 17 deletions(-) (limited to 'include/godot_cpp/variant') diff --git a/include/godot_cpp/variant/callable_method_pointer.hpp b/include/godot_cpp/variant/callable_method_pointer.hpp index 159f976..f9e7d73 100644 --- a/include/godot_cpp/variant/callable_method_pointer.hpp +++ b/include/godot_cpp/variant/callable_method_pointer.hpp @@ -60,7 +60,7 @@ Callable create_callable_from_ccmp(CallableCustomMethodPointerBase *p_callable_m // No return value. // -template +template class CallableCustomMethodPointer : public CallableCustomMethodPointerBase { struct Data { T *instance; @@ -85,7 +85,7 @@ public: } }; -template +template Callable create_custom_callable_function_pointer(T *p_instance, void (T::*p_method)(P...)) { typedef CallableCustomMethodPointer CCMP; CCMP *ccmp = memnew(CCMP(p_instance, p_method)); @@ -96,7 +96,7 @@ Callable create_custom_callable_function_pointer(T *p_instance, void (T::*p_meth // With return value. // -template +template class CallableCustomMethodPointerRet : public CallableCustomMethodPointerBase { struct Data { T *instance; @@ -122,7 +122,7 @@ public: } }; -template +template Callable create_custom_callable_function_pointer(T *p_instance, R (T::*p_method)(P...)) { typedef CallableCustomMethodPointerRet CCMP; // Messes with memnew otherwise. CCMP *ccmp = memnew(CCMP(p_instance, p_method)); @@ -133,7 +133,7 @@ Callable create_custom_callable_function_pointer(T *p_instance, R (T::*p_method) // Const with return value. // -template +template class CallableCustomMethodPointerRetC : public CallableCustomMethodPointerBase { struct Data { T *instance; @@ -159,7 +159,7 @@ public: } }; -template +template Callable create_custom_callable_function_pointer(const T *p_instance, R (T::*p_method)(P...) const) { typedef CallableCustomMethodPointerRetC CCMP; // Messes with memnew otherwise. CCMP *ccmp = memnew(CCMP(p_instance, p_method)); @@ -170,7 +170,7 @@ Callable create_custom_callable_function_pointer(const T *p_instance, R (T::*p_m // Static method with no return value. // -template +template class CallableCustomStaticMethodPointer : public CallableCustomMethodPointerBase { struct Data { void (*method)(P...); @@ -194,7 +194,7 @@ public: } }; -template +template Callable create_custom_callable_static_function_pointer(void (*p_method)(P...)) { typedef CallableCustomStaticMethodPointer CCMP; CCMP *ccmp = memnew(CCMP(p_method)); @@ -205,7 +205,7 @@ Callable create_custom_callable_static_function_pointer(void (*p_method)(P...)) // Static method with return value. // -template +template class CallableCustomStaticMethodPointerRet : public CallableCustomMethodPointerBase { struct Data { R(*method) @@ -229,7 +229,7 @@ public: } }; -template +template Callable create_custom_callable_static_function_pointer(R (*p_method)(P...)) { typedef CallableCustomStaticMethodPointerRet CCMP; CCMP *ccmp = memnew(CCMP(p_method)); diff --git a/include/godot_cpp/variant/char_string.hpp b/include/godot_cpp/variant/char_string.hpp index 993d046..991c039 100644 --- a/include/godot_cpp/variant/char_string.hpp +++ b/include/godot_cpp/variant/char_string.hpp @@ -38,12 +38,12 @@ namespace godot { -template +template class CharStringT; -template +template class CharProxy { - template + template friend class CharStringT; const int64_t _index; @@ -80,7 +80,7 @@ public: } }; -template +template class CharStringT { friend class String; diff --git a/include/godot_cpp/variant/typed_array.hpp b/include/godot_cpp/variant/typed_array.hpp index 2261509..47b7410 100644 --- a/include/godot_cpp/variant/typed_array.hpp +++ b/include/godot_cpp/variant/typed_array.hpp @@ -36,7 +36,7 @@ namespace godot { -template +template class TypedArray : public Array { public: _FORCE_INLINE_ void operator=(const Array &p_array) { diff --git a/include/godot_cpp/variant/variant.hpp b/include/godot_cpp/variant/variant.hpp index 3c64791..7435738 100644 --- a/include/godot_cpp/variant/variant.hpp +++ b/include/godot_cpp/variant/variant.hpp @@ -270,7 +270,7 @@ public: void callp(const StringName &method, const Variant **args, int argcount, Variant &r_ret, GDExtensionCallError &r_error); - template + template Variant call(const StringName &method, Args... args) { std::array vargs = { args... }; std::array argptrs; @@ -285,7 +285,7 @@ public: static void callp_static(Variant::Type type, const StringName &method, const Variant **args, int argcount, Variant &r_ret, GDExtensionCallError &r_error); - template + template static Variant call_static(Variant::Type type, const StringName &method, Args... args) { std::array vargs = { args... }; std::array argptrs; -- cgit v1.2.3