summaryrefslogtreecommitdiffstats
path: root/include/godot_cpp/templates/hashfuncs.hpp
diff options
context:
space:
mode:
authorDavid Snopek <dsnopek@gmail.com>2024-04-02 14:30:01 -0500
committerGitHub <noreply@github.com>2024-04-02 14:30:01 -0500
commit44d78ec8816e57fdd0c06812d31c09a25b97d6e8 (patch)
tree502a26499fd129c80619ed290cd0125b327055f1 /include/godot_cpp/templates/hashfuncs.hpp
parenta62f633cebee4b36356dc903d00670733cd28fb1 (diff)
parent87f5fb06912d19b3ff3ba80b747fcea3023a1ed5 (diff)
downloadredot-cpp-44d78ec8816e57fdd0c06812d31c09a25b97d6e8.tar.gz
Merge pull request #1409 from Repiteo/class-to-typename
Enforce template syntax `typename` over `class`
Diffstat (limited to 'include/godot_cpp/templates/hashfuncs.hpp')
-rw-r--r--include/godot_cpp/templates/hashfuncs.hpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/include/godot_cpp/templates/hashfuncs.hpp b/include/godot_cpp/templates/hashfuncs.hpp
index d6f3400..40b10a9 100644
--- a/include/godot_cpp/templates/hashfuncs.hpp
+++ b/include/godot_cpp/templates/hashfuncs.hpp
@@ -253,7 +253,7 @@ static _FORCE_INLINE_ uint32_t hash_djb2_one_float(double p_in, uint32_t p_prev
return ((p_prev << 5) + p_prev) + hash_one_uint64(u.i);
}
-template <class T>
+template <typename T>
static _FORCE_INLINE_ uint32_t hash_make_uint32_t(T p_in) {
union {
T t;
@@ -286,7 +286,7 @@ static _FORCE_INLINE_ uint64_t hash_djb2_one_64(uint64_t p_in, uint64_t p_prev =
return ((p_prev << 5) + p_prev) ^ p_in;
}
-template <class T>
+template <typename T>
static _FORCE_INLINE_ uint64_t hash_make_uint64_t(T p_in) {
union {
T t;
@@ -298,15 +298,15 @@ static _FORCE_INLINE_ uint64_t hash_make_uint64_t(T p_in) {
return _u._u64;
}
-template <class T>
+template <typename T>
class Ref;
struct HashMapHasherDefault {
// Generic hash function for any type.
- template <class T>
+ template <typename T>
static _FORCE_INLINE_ uint32_t hash(const T *p_pointer) { return hash_one_uint64((uint64_t)p_pointer); }
- template <class T>
+ template <typename T>
static _FORCE_INLINE_ uint32_t hash(const Ref<T> &p_ref) { return hash_one_uint64((uint64_t)p_ref.operator->()); }
static _FORCE_INLINE_ uint32_t hash(const String &p_string) { return p_string.hash(); }