diff options
author | Anilforextra <anilforextra@gmail.com> | 2022-02-02 00:04:13 +0545 |
---|---|---|
committer | Anilforextra <anilforextra@gmail.com> | 2022-02-02 00:11:09 +0545 |
commit | fc27636999a15f88b1f3b1d7101d84a67968ba06 (patch) | |
tree | e3b66fce3dfd70ef1e7d5a4d1543446af2deae47 /core/templates | |
parent | ea12094f19b028c1dcf6d402b8cbb3296b2065a8 (diff) |
Vectors: Use clear() and has().
Use clear() instead of resize(0).
Use has() instead of "find(p_val) != -1".
Diffstat (limited to 'core/templates')
-rw-r--r-- | core/templates/vector.h | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/core/templates/vector.h b/core/templates/vector.h index bd4c6ade86..0877e04e01 100644 --- a/core/templates/vector.h +++ b/core/templates/vector.h @@ -95,9 +95,7 @@ public: void append_array(Vector<T> p_other); - bool has(const T &p_val) const { - return find(p_val, 0) != -1; - } + _FORCE_INLINE_ bool has(const T &p_val) const { return find(p_val) != -1; } template <class C> void sort_custom() { |