summaryrefslogtreecommitdiff
path: root/core/templates
diff options
context:
space:
mode:
Diffstat (limited to 'core/templates')
-rw-r--r--core/templates/cowdata.h2
-rw-r--r--core/templates/hash_map.h2
-rw-r--r--core/templates/list.h2
-rw-r--r--core/templates/local_vector.h2
-rw-r--r--core/templates/map.h2
-rw-r--r--core/templates/oa_hash_map.h2
-rw-r--r--core/templates/ordered_hash_map.h2
-rw-r--r--core/templates/set.h2
-rw-r--r--core/templates/vector.h2
-rw-r--r--core/templates/vmap.h6
-rw-r--r--core/templates/vset.h6
11 files changed, 15 insertions, 15 deletions
diff --git a/core/templates/cowdata.h b/core/templates/cowdata.h
index d5eb08286d..705eae8f9f 100644
--- a/core/templates/cowdata.h
+++ b/core/templates/cowdata.h
@@ -135,7 +135,7 @@ public:
}
_FORCE_INLINE_ void clear() { resize(0); }
- _FORCE_INLINE_ bool empty() const { return _ptr == nullptr; }
+ _FORCE_INLINE_ bool is_empty() const { return _ptr == nullptr; }
_FORCE_INLINE_ void set(int p_index, const T &p_elem) {
CRASH_BAD_INDEX(p_index, size());
diff --git a/core/templates/hash_map.h b/core/templates/hash_map.h
index e1ba381595..2e98302809 100644
--- a/core/templates/hash_map.h
+++ b/core/templates/hash_map.h
@@ -497,7 +497,7 @@ public:
return elements;
}
- inline bool empty() const {
+ inline bool is_empty() const {
return elements == 0;
}
diff --git a/core/templates/list.h b/core/templates/list.h
index 8e14aaa90d..bab5198380 100644
--- a/core/templates/list.h
+++ b/core/templates/list.h
@@ -373,7 +373,7 @@ public:
/**
* return whether the list is empty
*/
- _FORCE_INLINE_ bool empty() const {
+ _FORCE_INLINE_ bool is_empty() const {
return (!_data || !_data->size_cache);
}
diff --git a/core/templates/local_vector.h b/core/templates/local_vector.h
index 4ef040dc77..1bf4161f87 100644
--- a/core/templates/local_vector.h
+++ b/core/templates/local_vector.h
@@ -104,7 +104,7 @@ public:
capacity = 0;
}
}
- _FORCE_INLINE_ bool empty() const { return count == 0; }
+ _FORCE_INLINE_ bool is_empty() const { return count == 0; }
_FORCE_INLINE_ void reserve(U p_size) {
p_size = nearest_power_of_2_templated(p_size);
if (p_size > capacity) {
diff --git a/core/templates/map.h b/core/templates/map.h
index c454d69256..4e002b67f8 100644
--- a/core/templates/map.h
+++ b/core/templates/map.h
@@ -625,7 +625,7 @@ public:
return e;
}
- inline bool empty() const { return _data.size_cache == 0; }
+ inline bool is_empty() const { return _data.size_cache == 0; }
inline int size() const { return _data.size_cache; }
int calculate_depth() const {
diff --git a/core/templates/oa_hash_map.h b/core/templates/oa_hash_map.h
index d9d632b4ce..49551ffc2d 100644
--- a/core/templates/oa_hash_map.h
+++ b/core/templates/oa_hash_map.h
@@ -190,7 +190,7 @@ public:
_FORCE_INLINE_ uint32_t get_capacity() const { return capacity; }
_FORCE_INLINE_ uint32_t get_num_elements() const { return num_elements; }
- bool empty() const {
+ bool is_empty() const {
return num_elements == 0;
}
diff --git a/core/templates/ordered_hash_map.h b/core/templates/ordered_hash_map.h
index 9398868b01..fce9bcfbfc 100644
--- a/core/templates/ordered_hash_map.h
+++ b/core/templates/ordered_hash_map.h
@@ -265,7 +265,7 @@ public:
return ConstElement(list.back());
}
- inline bool empty() const { return list.empty(); }
+ inline bool is_empty() const { return list.is_empty(); }
inline int size() const { return list.size(); }
const void *id() const {
diff --git a/core/templates/set.h b/core/templates/set.h
index d0ac71a710..c323618062 100644
--- a/core/templates/set.h
+++ b/core/templates/set.h
@@ -576,7 +576,7 @@ public:
return e;
}
- inline bool empty() const { return _data.size_cache == 0; }
+ inline bool is_empty() const { return _data.size_cache == 0; }
inline int size() const { return _data.size_cache; }
int calculate_depth() const {
diff --git a/core/templates/vector.h b/core/templates/vector.h
index 7420384bf7..1c06e7e3ab 100644
--- a/core/templates/vector.h
+++ b/core/templates/vector.h
@@ -79,7 +79,7 @@ public:
_FORCE_INLINE_ T *ptrw() { return _cowdata.ptrw(); }
_FORCE_INLINE_ const T *ptr() const { return _cowdata.ptr(); }
_FORCE_INLINE_ void clear() { resize(0); }
- _FORCE_INLINE_ bool empty() const { return _cowdata.empty(); }
+ _FORCE_INLINE_ bool is_empty() const { return _cowdata.is_empty(); }
_FORCE_INLINE_ T get(int p_index) { return _cowdata.get(p_index); }
_FORCE_INLINE_ const T &get(int p_index) const { return _cowdata.get(p_index); }
diff --git a/core/templates/vmap.h b/core/templates/vmap.h
index 8d2a3d2a9c..5fdfa1a7b5 100644
--- a/core/templates/vmap.h
+++ b/core/templates/vmap.h
@@ -54,7 +54,7 @@ private:
_FORCE_INLINE_ int _find(const T &p_val, bool &r_exact) const {
r_exact = false;
- if (_cowdata.empty()) {
+ if (_cowdata.is_empty()) {
return 0;
}
@@ -89,7 +89,7 @@ private:
}
_FORCE_INLINE_ int _find_exact(const T &p_val) const {
- if (_cowdata.empty()) {
+ if (_cowdata.is_empty()) {
return -1;
}
@@ -147,7 +147,7 @@ public:
}
_FORCE_INLINE_ int size() const { return _cowdata.size(); }
- _FORCE_INLINE_ bool empty() const { return _cowdata.empty(); }
+ _FORCE_INLINE_ bool is_empty() const { return _cowdata.is_empty(); }
const Pair *get_array() const {
return _cowdata.ptr();
diff --git a/core/templates/vset.h b/core/templates/vset.h
index 4c0b8717b6..f2ea5c814b 100644
--- a/core/templates/vset.h
+++ b/core/templates/vset.h
@@ -40,7 +40,7 @@ class VSet {
_FORCE_INLINE_ int _find(const T &p_val, bool &r_exact) const {
r_exact = false;
- if (_data.empty()) {
+ if (_data.is_empty()) {
return 0;
}
@@ -76,7 +76,7 @@ class VSet {
}
_FORCE_INLINE_ int _find_exact(const T &p_val) const {
- if (_data.empty()) {
+ if (_data.is_empty()) {
return -1;
}
@@ -126,7 +126,7 @@ public:
return _find_exact(p_val);
}
- _FORCE_INLINE_ bool empty() const { return _data.empty(); }
+ _FORCE_INLINE_ bool is_empty() const { return _data.is_empty(); }
_FORCE_INLINE_ int size() const { return _data.size(); }