summaryrefslogtreecommitdiffstats
path: root/modules/navigation
diff options
context:
space:
mode:
authorA Thousand Ships <96648715+AThousandShips@users.noreply.github.com>2024-05-06 16:43:04 +0200
committerA Thousand Ships <96648715+AThousandShips@users.noreply.github.com>2024-05-06 18:03:37 +0200
commit86de59d60a72e91d135450cccae4e220088a8a4b (patch)
treeacae9333fcc64c6bc6802090ba18a9113e2874ae /modules/navigation
parentd8aa2c65a9f857e86d0c1fc1cc6b95b8ccf23099 (diff)
downloadredot-engine-86de59d60a72e91d135450cccae4e220088a8a4b.tar.gz
[Core] Add `LocalVector::has` for convenience
Diffstat (limited to 'modules/navigation')
-rw-r--r--modules/navigation/3d/godot_navigation_server_3d.cpp2
-rw-r--r--modules/navigation/nav_map.cpp4
2 files changed, 3 insertions, 3 deletions
diff --git a/modules/navigation/3d/godot_navigation_server_3d.cpp b/modules/navigation/3d/godot_navigation_server_3d.cpp
index 61a128e004..6cbfd93088 100644
--- a/modules/navigation/3d/godot_navigation_server_3d.cpp
+++ b/modules/navigation/3d/godot_navigation_server_3d.cpp
@@ -136,7 +136,7 @@ bool GodotNavigationServer3D::map_is_active(RID p_map) const {
NavMap *map = map_owner.get_or_null(p_map);
ERR_FAIL_NULL_V(map, false);
- return active_maps.find(map) >= 0;
+ return active_maps.has(map);
}
COMMAND_2(map_set_up, RID, p_map, Vector3, p_up) {
diff --git a/modules/navigation/nav_map.cpp b/modules/navigation/nav_map.cpp
index a3f2ee2e61..dfbc92a919 100644
--- a/modules/navigation/nav_map.cpp
+++ b/modules/navigation/nav_map.cpp
@@ -734,7 +734,7 @@ void NavMap::remove_link(NavLink *p_link) {
}
bool NavMap::has_agent(NavAgent *agent) const {
- return (agents.find(agent) >= 0);
+ return agents.has(agent);
}
void NavMap::add_agent(NavAgent *agent) {
@@ -754,7 +754,7 @@ void NavMap::remove_agent(NavAgent *agent) {
}
bool NavMap::has_obstacle(NavObstacle *obstacle) const {
- return (obstacles.find(obstacle) >= 0);
+ return obstacles.has(obstacle);
}
void NavMap::add_obstacle(NavObstacle *obstacle) {