Replace error checks against size with is_empty

This commit is contained in:
A Thousand Ships
2024-01-19 13:21:39 +01:00
parent 94dbf69f5d
commit 684752e75b
58 changed files with 116 additions and 116 deletions

View File

@ -584,7 +584,7 @@ void GodotConvexPolygonShape2D::set_data(const Variant &p_data) {
if (p_data.get_type() == Variant::PACKED_VECTOR2_ARRAY) {
Vector<Vector2> arr = p_data;
ERR_FAIL_COND(arr.size() == 0);
ERR_FAIL_COND(arr.is_empty());
point_count = arr.size();
points = memnew_arr(Point, point_count);
const Vector2 *r = arr.ptr();