Navigation: Fix GCC 12.3 -Wtype-limits
warnings
This commit is contained in:
parent
63f3de3aad
commit
84692c6252
2 changed files with 3 additions and 3 deletions
|
@ -816,7 +816,7 @@ Vector3 NavMap::get_random_point(uint32_t p_navigation_layers, bool p_uniformly)
|
|||
RBMap<real_t, uint32_t>::Iterator E = accessible_regions_area_map.find_closest(random_accessible_regions_area_map);
|
||||
ERR_FAIL_COND_V(!E, Vector3());
|
||||
uint32_t random_region_index = E->value;
|
||||
ERR_FAIL_INDEX_V(random_region_index, accessible_regions.size(), Vector3());
|
||||
ERR_FAIL_UNSIGNED_INDEX_V(random_region_index, accessible_regions.size(), Vector3());
|
||||
|
||||
const NavRegion *random_region = accessible_regions[random_region_index];
|
||||
ERR_FAIL_NULL_V(random_region, Vector3());
|
||||
|
|
|
@ -135,7 +135,7 @@ Vector3 NavRegion::get_random_point(uint32_t p_navigation_layers, bool p_uniform
|
|||
RBMap<real_t, uint32_t>::Iterator region_E = region_area_map.find_closest(region_area_map_pos);
|
||||
ERR_FAIL_COND_V(!region_E, Vector3());
|
||||
uint32_t rrp_polygon_index = region_E->value;
|
||||
ERR_FAIL_INDEX_V(rrp_polygon_index, region_polygons.size(), Vector3());
|
||||
ERR_FAIL_UNSIGNED_INDEX_V(rrp_polygon_index, region_polygons.size(), Vector3());
|
||||
|
||||
const gd::Polygon &rr_polygon = region_polygons[rrp_polygon_index];
|
||||
|
||||
|
@ -161,7 +161,7 @@ Vector3 NavRegion::get_random_point(uint32_t p_navigation_layers, bool p_uniform
|
|||
RBMap<real_t, uint32_t>::Iterator polygon_E = polygon_area_map.find_closest(polygon_area_map_pos);
|
||||
ERR_FAIL_COND_V(!polygon_E, Vector3());
|
||||
uint32_t rrp_face_index = polygon_E->value;
|
||||
ERR_FAIL_INDEX_V(rrp_face_index, rr_polygon.points.size(), Vector3());
|
||||
ERR_FAIL_UNSIGNED_INDEX_V(rrp_face_index, rr_polygon.points.size(), Vector3());
|
||||
|
||||
const Face3 face(rr_polygon.points[0].pos, rr_polygon.points[rrp_face_index - 1].pos, rr_polygon.points[rrp_face_index].pos);
|
||||
|
||||
|
|
Loading…
Reference in a new issue