Skip to content

Commit 505076c

Browse files
[Core] Add LocalVector::has for convenience
1 parent 54fe2f9 commit 505076c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

include/godot_cpp/templates/local_vector.hpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,10 @@ class LocalVector {
257257
return -1;
258258
}
259259

260+
bool has(const T &p_val) const {
261+
return find(p_val) != -1;
262+
}
263+
260264
template <typename C>
261265
void sort_custom() {
262266
U len = count;

0 commit comments

Comments
 (0)