Enforce template syntax typename over class

(cherry picked from commit 87f5fb0691)
This commit is contained in:
Thaddeus Crews
2024-03-10 16:02:43 -05:00
committed by David Snopek
parent 98ad839827
commit 7473b984cb
38 changed files with 224 additions and 224 deletions

View File

@@ -47,7 +47,7 @@
namespace godot {
template <class T>
template <typename T>
class VectorWriteProxy {
public:
_FORCE_INLINE_ T &operator[](typename CowData<T>::Size p_index) {
@@ -57,7 +57,7 @@ public:
}
};
template <class T>
template <typename T>
class Vector {
friend class VectorWriteProxy<T>;
@@ -110,7 +110,7 @@ public:
sort_custom<_DefaultComparator<T>>();
}
template <class Comparator, bool Validate = SORT_ARRAY_VALIDATE_ENABLED, class... Args>
template <typename Comparator, bool Validate = SORT_ARRAY_VALIDATE_ENABLED, typename... Args>
void sort_custom(Args &&...args) {
Size len = _cowdata.size();
if (len == 0) {
@@ -126,7 +126,7 @@ public:
return bsearch_custom<_DefaultComparator<T>>(p_value, p_before);
}
template <class Comparator, class Value, class... Args>
template <typename Comparator, typename Value, typename... Args>
Size bsearch_custom(const Value &p_value, bool p_before, Args &&...args) {
SearchArray<T, Comparator> search{ args... };
return search.bisect(ptrw(), size(), p_value, p_before);
@@ -293,7 +293,7 @@ public:
_FORCE_INLINE_ ~Vector() {}
};
template <class T>
template <typename T>
void Vector<T>::reverse() {
for (Size i = 0; i < size() / 2; i++) {
T *p = ptrw();
@@ -301,7 +301,7 @@ void Vector<T>::reverse() {
}
}
template <class T>
template <typename T>
void Vector<T>::append_array(Vector<T> p_other) {
const Size ds = p_other.size();
if (ds == 0) {
@@ -314,7 +314,7 @@ void Vector<T>::append_array(Vector<T> p_other) {
}
}
template <class T>
template <typename T>
bool Vector<T>::push_back(T p_elem) {
Error err = resize(size() + 1);
ERR_FAIL_COND_V(err, true);
@@ -323,7 +323,7 @@ bool Vector<T>::push_back(T p_elem) {
return false;
}
template <class T>
template <typename T>
void Vector<T>::fill(T p_elem) {
T *p = ptrw();
for (Size i = 0; i < size(); i++) {