summaryrefslogtreecommitdiffstats
path: root/include/godot_cpp/variant
diff options
context:
space:
mode:
authorThaddeus Crews <repiteo@outlook.com>2024-03-10 16:02:43 -0500
committerThaddeus Crews <repiteo@outlook.com>2024-03-10 16:02:43 -0500
commit87f5fb06912d19b3ff3ba80b747fcea3023a1ed5 (patch)
treec081d3e0b7703194c8162125ee7b138bb2c557d3 /include/godot_cpp/variant
parentcc1217a43cab5ff8377c2f5e53301fda67def95e (diff)
downloadredot-cpp-87f5fb06912d19b3ff3ba80b747fcea3023a1ed5.tar.gz
Enforce template syntax `typename` over `class`
Diffstat (limited to 'include/godot_cpp/variant')
-rw-r--r--include/godot_cpp/variant/callable_method_pointer.hpp20
-rw-r--r--include/godot_cpp/variant/char_string.hpp8
-rw-r--r--include/godot_cpp/variant/typed_array.hpp2
-rw-r--r--include/godot_cpp/variant/variant.hpp4
4 files changed, 17 insertions, 17 deletions
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 <class T, class... P>
+template <typename T, typename... P>
class CallableCustomMethodPointer : public CallableCustomMethodPointerBase {
struct Data {
T *instance;
@@ -85,7 +85,7 @@ public:
}
};
-template <class T, class... P>
+template <typename T, typename... P>
Callable create_custom_callable_function_pointer(T *p_instance, void (T::*p_method)(P...)) {
typedef CallableCustomMethodPointer<T, P...> 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 <class T, class R, class... P>
+template <typename T, typename R, typename... P>
class CallableCustomMethodPointerRet : public CallableCustomMethodPointerBase {
struct Data {
T *instance;
@@ -122,7 +122,7 @@ public:
}
};
-template <class T, class R, class... P>
+template <typename T, typename R, typename... P>
Callable create_custom_callable_function_pointer(T *p_instance, R (T::*p_method)(P...)) {
typedef CallableCustomMethodPointerRet<T, R, P...> 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 <class T, class R, class... P>
+template <typename T, typename R, typename... P>
class CallableCustomMethodPointerRetC : public CallableCustomMethodPointerBase {
struct Data {
T *instance;
@@ -159,7 +159,7 @@ public:
}
};
-template <class T, class R, class... P>
+template <typename T, typename R, typename... P>
Callable create_custom_callable_function_pointer(const T *p_instance, R (T::*p_method)(P...) const) {
typedef CallableCustomMethodPointerRetC<T, R, P...> 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 <class... P>
+template <typename... P>
class CallableCustomStaticMethodPointer : public CallableCustomMethodPointerBase {
struct Data {
void (*method)(P...);
@@ -194,7 +194,7 @@ public:
}
};
-template <class... P>
+template <typename... P>
Callable create_custom_callable_static_function_pointer(void (*p_method)(P...)) {
typedef CallableCustomStaticMethodPointer<P...> 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 <class R, class... P>
+template <typename R, typename... P>
class CallableCustomStaticMethodPointerRet : public CallableCustomMethodPointerBase {
struct Data {
R(*method)
@@ -229,7 +229,7 @@ public:
}
};
-template <class R, class... P>
+template <typename R, typename... P>
Callable create_custom_callable_static_function_pointer(R (*p_method)(P...)) {
typedef CallableCustomStaticMethodPointerRet<R, P...> 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 <class T>
+template <typename T>
class CharStringT;
-template <class T>
+template <typename T>
class CharProxy {
- template <class TS>
+ template <typename TS>
friend class CharStringT;
const int64_t _index;
@@ -80,7 +80,7 @@ public:
}
};
-template <class T>
+template <typename T>
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 <class T>
+template <typename T>
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 <class... Args>
+ template <typename... Args>
Variant call(const StringName &method, Args... args) {
std::array<Variant, sizeof...(args)> vargs = { args... };
std::array<const Variant *, sizeof...(args)> 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 <class... Args>
+ template <typename... Args>
static Variant call_static(Variant::Type type, const StringName &method, Args... args) {
std::array<Variant, sizeof...(args)> vargs = { args... };
std::array<const Variant *, sizeof...(args)> argptrs;