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

@ -147,7 +147,7 @@ void ImmediateMesh::surface_add_vertex_2d(const Vector2 &p_vertex) {
void ImmediateMesh::surface_end() {
ERR_FAIL_COND_MSG(!surface_active, "Not creating any surface. Use surface_begin() to do it.");
ERR_FAIL_COND_MSG(!vertices.size(), "No vertices were added, surface can't be created.");
ERR_FAIL_COND_MSG(vertices.is_empty(), "No vertices were added, surface can't be created.");
uint64_t format = ARRAY_FORMAT_VERTEX | ARRAY_FLAG_FORMAT_CURRENT_VERSION;