[Core] Add LocalVector::has for convenience
This commit is contained in:
parent
d8aa2c65a9
commit
86de59d60a
12 changed files with 27 additions and 14 deletions
|
|
@ -1098,7 +1098,7 @@ void CSGBrushOperation::Build2DFaces::_find_edge_intersections(const Vector2 p_s
|
|||
};
|
||||
|
||||
// Check if edge has already been processed.
|
||||
if (processed_edges.find(edge_points_and_uvs) != -1) {
|
||||
if (processed_edges.has(edge_points_and_uvs)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue