From a0dbdcc3abbd3e6307c6e68d0e60f8c0fa31d576 Mon Sep 17 00:00:00 2001 From: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com> Date: Mon, 6 May 2024 16:20:20 +0200 Subject: Replace `find` with `contains/has` where applicable * Replaces `find(...) != -1` with `contains` for `String` * Replaces `find(...) == -1` with `!contains` for `String` * Replaces `find(...) != -1` with `has` for containers * Replaces `find(...) == -1` with `!has` for containers --- modules/csg/csg.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules/csg/csg.cpp') diff --git a/modules/csg/csg.cpp b/modules/csg/csg.cpp index cec03b7246..a4a3c768e9 100644 --- a/modules/csg/csg.cpp +++ b/modules/csg/csg.cpp @@ -852,7 +852,7 @@ int CSGBrushOperation::Build2DFaces::_add_vertex(const Vertex2D &p_vertex) { } void CSGBrushOperation::Build2DFaces::_add_vertex_idx_sorted(Vector &r_vertex_indices, int p_new_vertex_index) { - if (p_new_vertex_index >= 0 && r_vertex_indices.find(p_new_vertex_index) == -1) { + if (p_new_vertex_index >= 0 && !r_vertex_indices.has(p_new_vertex_index)) { ERR_FAIL_COND_MSG(p_new_vertex_index >= vertices.size(), "Invalid vertex index."); // The first vertex. -- cgit v1.2.3