summaryrefslogtreecommitdiffstats
path: root/core/templates/vector.h
diff options
context:
space:
mode:
Diffstat (limited to 'core/templates/vector.h')
-rw-r--r--core/templates/vector.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/core/templates/vector.h b/core/templates/vector.h
index 0de6a34ced..52c10eea68 100644
--- a/core/templates/vector.h
+++ b/core/templates/vector.h
@@ -45,7 +45,7 @@
#include <climits>
#include <initializer_list>
-template <class T>
+template <typename T>
class VectorWriteProxy {
public:
_FORCE_INLINE_ T &operator[](typename CowData<T>::Size p_index) {
@@ -55,7 +55,7 @@ public:
}
};
-template <class T>
+template <typename T>
class Vector {
friend class VectorWriteProxy<T>;
@@ -108,7 +108,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) {
@@ -124,7 +124,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);
@@ -291,7 +291,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();
@@ -299,7 +299,7 @@ void Vector<T>::reverse() {
}
}
-template <class T>
+template <typename T>
void Vector<T>::append_array(const Vector<T> &p_other) {
const Size ds = p_other.size();
if (ds == 0) {
@@ -312,7 +312,7 @@ void Vector<T>::append_array(const 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);
@@ -321,7 +321,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++) {