diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/input/input.cpp | 2 | ||||
-rw-r--r-- | core/math/a_star.cpp | 4 | ||||
-rw-r--r-- | core/math/bvh.h | 2 | ||||
-rw-r--r-- | core/math/bvh_pair.inc | 2 | ||||
-rw-r--r-- | core/math/convex_hull.cpp | 2 | ||||
-rw-r--r-- | core/math/delaunay_2d.h | 4 | ||||
-rw-r--r-- | core/math/expression.cpp | 6 | ||||
-rw-r--r-- | core/object/undo_redo.cpp | 2 | ||||
-rw-r--r-- | core/string/node_path.cpp | 6 | ||||
-rw-r--r-- | core/string/ustring.cpp | 8 | ||||
-rw-r--r-- | core/string/ustring.h | 2 | ||||
-rw-r--r-- | core/templates/bin_sorted_array.h | 2 | ||||
-rw-r--r-- | core/templates/cowdata.h | 2 | ||||
-rw-r--r-- | core/templates/local_vector.h | 6 | ||||
-rw-r--r-- | core/templates/vector.h | 4 | ||||
-rw-r--r-- | core/templates/vmap.h | 2 | ||||
-rw-r--r-- | core/templates/vset.h | 2 | ||||
-rw-r--r-- | core/variant/array.cpp | 8 | ||||
-rw-r--r-- | core/variant/array.h | 2 | ||||
-rw-r--r-- | core/variant/variant_call.cpp | 20 | ||||
-rw-r--r-- | core/variant/variant_setget.cpp | 6 |
21 files changed, 47 insertions, 47 deletions
diff --git a/core/input/input.cpp b/core/input/input.cpp index d0144ca47f..342ab3b704 100644 --- a/core/input/input.cpp +++ b/core/input/input.cpp @@ -1351,7 +1351,7 @@ void Input::add_joy_mapping(String p_mapping, bool p_update_existing) { void Input::remove_joy_mapping(String p_guid) { for (int i = map_db.size() - 1; i >= 0; i--) { if (p_guid == map_db[i].uid) { - map_db.remove(i); + map_db.remove_at(i); } } for (KeyValue<int, Joypad> &E : joy_names) { diff --git a/core/math/a_star.cpp b/core/math/a_star.cpp index 1079da75ef..8a44646ef9 100644 --- a/core/math/a_star.cpp +++ b/core/math/a_star.cpp @@ -344,7 +344,7 @@ bool AStar::_solve(Point *begin_point, Point *end_point) { } sorter.pop_heap(0, open_list.size(), open_list.ptrw()); // Remove the current point from the open list - open_list.remove(open_list.size() - 1); + open_list.remove_at(open_list.size() - 1); p->closed_pass = pass; // Mark the point as closed for (OAHashMap<int, Point *>::Iterator it = p->neighbours.iter(); it.valid; it = p->neighbours.next_iter(it)) { @@ -812,7 +812,7 @@ bool AStar2D::_solve(AStar::Point *begin_point, AStar::Point *end_point) { } sorter.pop_heap(0, open_list.size(), open_list.ptrw()); // Remove the current point from the open list - open_list.remove(open_list.size() - 1); + open_list.remove_at(open_list.size() - 1); p->closed_pass = astar.pass; // Mark the point as closed for (OAHashMap<int, AStar::Point *>::Iterator it = p->neighbours.iter(); it.valid; it = p->neighbours.next_iter(it)) { diff --git a/core/math/bvh.h b/core/math/bvh.h index 65b8b102a3..c1eff02178 100644 --- a/core/math/bvh.h +++ b/core/math/bvh.h @@ -654,7 +654,7 @@ private: // remove from changed items (not very efficient yet) for (int n = 0; n < (int)changed_items.size(); n++) { if (changed_items[n] == p_handle) { - changed_items.remove_unordered(n); + changed_items.remove_at_unordered(n); // because we are using an unordered remove, // the last changed item will now be at spot 'n', diff --git a/core/math/bvh_pair.inc b/core/math/bvh_pair.inc index 839db59a3a..a12acec2b6 100644 --- a/core/math/bvh_pair.inc +++ b/core/math/bvh_pair.inc @@ -51,7 +51,7 @@ struct ItemPairs { for (int n = 0; n < num_pairs; n++) { if (extended_pairs[n].handle == h) { userdata = extended_pairs[n].userdata; - extended_pairs.remove_unordered(n); + extended_pairs.remove_at_unordered(n); num_pairs--; break; } diff --git a/core/math/convex_hull.cpp b/core/math/convex_hull.cpp index f6560f1bea..2956e0cf09 100644 --- a/core/math/convex_hull.cpp +++ b/core/math/convex_hull.cpp @@ -1688,7 +1688,7 @@ real_t ConvexHullInternal::shrink(real_t p_amount, real_t p_clamp_amount) { while (stack.size() > 0) { Vertex *v = stack[stack.size() - 1]; - stack.remove(stack.size() - 1); + stack.remove_at(stack.size() - 1); Edge *e = v->edges; if (e) { do { diff --git a/core/math/delaunay_2d.h b/core/math/delaunay_2d.h index 2f80cb5634..779ac96b79 100644 --- a/core/math/delaunay_2d.h +++ b/core/math/delaunay_2d.h @@ -123,7 +123,7 @@ public: for (int j = 0; j < triangles.size(); j++) { if (triangles[j].bad) { - triangles.remove(j); + triangles.remove_at(j); j--; } } @@ -154,7 +154,7 @@ public: } } if (invalid) { - triangles.remove(i); + triangles.remove_at(i); i--; } } diff --git a/core/math/expression.cpp b/core/math/expression.cpp index 05f2c8dac9..f366fd0499 100644 --- a/core/math/expression.cpp +++ b/core/math/expression.cpp @@ -1087,7 +1087,7 @@ Expression::ENode *Expression::_parse_expression() { op->nodes[1] = nullptr; expression.write[i].is_op = false; expression.write[i].node = op; - expression.remove(i + 1); + expression.remove_at(i + 1); } } else { @@ -1119,8 +1119,8 @@ Expression::ENode *Expression::_parse_expression() { //replace all 3 nodes by this operator and make it an expression expression.write[next_op - 1].node = op; - expression.remove(next_op); - expression.remove(next_op); + expression.remove_at(next_op); + expression.remove_at(next_op); } } diff --git a/core/object/undo_redo.cpp b/core/object/undo_redo.cpp index 07006e7968..3459506860 100644 --- a/core/object/undo_redo.cpp +++ b/core/object/undo_redo.cpp @@ -282,7 +282,7 @@ void UndoRedo::_pop_history_tail() { } } - actions.remove(0); + actions.remove_at(0); if (current_action >= 0) { current_action--; } diff --git a/core/string/node_path.cpp b/core/string/node_path.cpp index 5fae13779e..7ab85ac9d0 100644 --- a/core/string/node_path.cpp +++ b/core/string/node_path.cpp @@ -293,12 +293,12 @@ void NodePath::simplify() { break; } if (data->path[i].operator String() == ".") { - data->path.remove(i); + data->path.remove_at(i); i--; } else if (i > 0 && data->path[i].operator String() == ".." && data->path[i - 1].operator String() != "." && data->path[i - 1].operator String() != "..") { //remove both - data->path.remove(i - 1); - data->path.remove(i - 1); + data->path.remove_at(i - 1); + data->path.remove_at(i - 1); i -= 2; if (data->path.size() == 0) { data->path.push_back("."); diff --git a/core/string/ustring.cpp b/core/string/ustring.cpp index 70236231a2..320aae2ba4 100644 --- a/core/string/ustring.cpp +++ b/core/string/ustring.cpp @@ -3670,15 +3670,15 @@ String String::simplify_path() const { for (int i = 0; i < dirs.size(); i++) { String d = dirs[i]; if (d == ".") { - dirs.remove(i); + dirs.remove_at(i); i--; } else if (d == "..") { if (i == 0) { - dirs.remove(i); + dirs.remove_at(i); i--; } else { - dirs.remove(i); - dirs.remove(i - 1); + dirs.remove_at(i); + dirs.remove_at(i - 1); i -= 2; } } diff --git a/core/string/ustring.h b/core/string/ustring.h index 1d80ccf58d..f25c36f66c 100644 --- a/core/string/ustring.h +++ b/core/string/ustring.h @@ -209,7 +209,7 @@ public: _FORCE_INLINE_ char32_t *ptrw() { return _cowdata.ptrw(); } _FORCE_INLINE_ const char32_t *ptr() const { return _cowdata.ptr(); } - void remove(int p_index) { _cowdata.remove(p_index); } + void remove_at(int p_index) { _cowdata.remove_at(p_index); } _FORCE_INLINE_ void clear() { resize(0); } diff --git a/core/templates/bin_sorted_array.h b/core/templates/bin_sorted_array.h index be9d0b5475..8db3e7aeb8 100644 --- a/core/templates/bin_sorted_array.h +++ b/core/templates/bin_sorted_array.h @@ -112,7 +112,7 @@ public: return current_idx; } - void remove(uint64_t p_idx) { + void remove_at(uint64_t p_idx) { ERR_FAIL_COND(p_idx >= array.size()); uint64_t new_idx = move(p_idx, 0); uint64_t swap_idx = array.size() - 1; diff --git a/core/templates/cowdata.h b/core/templates/cowdata.h index 9b8c0eb528..e79ca037db 100644 --- a/core/templates/cowdata.h +++ b/core/templates/cowdata.h @@ -167,7 +167,7 @@ public: Error resize(int p_size); - _FORCE_INLINE_ void remove(int p_index) { + _FORCE_INLINE_ void remove_at(int p_index) { ERR_FAIL_INDEX(p_index, size()); T *p = ptrw(); int len = size(); diff --git a/core/templates/local_vector.h b/core/templates/local_vector.h index 5704b8f230..3854e1e94c 100644 --- a/core/templates/local_vector.h +++ b/core/templates/local_vector.h @@ -70,7 +70,7 @@ public: } } - void remove(U p_index) { + void remove_at(U p_index) { ERR_FAIL_UNSIGNED_INDEX(p_index, count); count--; for (U i = p_index; i < count; i++) { @@ -83,7 +83,7 @@ public: /// Removes the item copying the last value into the position of the one to /// remove. It's generally faster than `remove`. - void remove_unordered(U p_index) { + void remove_at_unordered(U p_index) { ERR_FAIL_INDEX(p_index, count); count--; if (count > p_index) { @@ -97,7 +97,7 @@ public: void erase(const T &p_val) { int64_t idx = find(p_val); if (idx >= 0) { - remove(idx); + remove_at(idx); } } diff --git a/core/templates/vector.h b/core/templates/vector.h index 98982c80d3..a955d49101 100644 --- a/core/templates/vector.h +++ b/core/templates/vector.h @@ -68,11 +68,11 @@ public: _FORCE_INLINE_ bool append(const T &p_elem) { return push_back(p_elem); } //alias void fill(T p_elem); - void remove(int p_index) { _cowdata.remove(p_index); } + void remove_at(int p_index) { _cowdata.remove_at(p_index); } void erase(const T &p_val) { int idx = find(p_val); if (idx >= 0) { - remove(idx); + remove_at(idx); } } void reverse(); diff --git a/core/templates/vmap.h b/core/templates/vmap.h index 520e0b3720..2aa22f97cf 100644 --- a/core/templates/vmap.h +++ b/core/templates/vmap.h @@ -134,7 +134,7 @@ public: if (pos < 0) { return; } - _cowdata.remove(pos); + _cowdata.remove_at(pos); } int find(const T &p_val) const { diff --git a/core/templates/vset.h b/core/templates/vset.h index 6665651d42..94e7a17061 100644 --- a/core/templates/vset.h +++ b/core/templates/vset.h @@ -119,7 +119,7 @@ public: if (pos < 0) { return; } - _data.remove(pos); + _data.remove_at(pos); } int find(const T &p_val) const { diff --git a/core/variant/array.cpp b/core/variant/array.cpp index 69a0fff1a1..b049c29688 100644 --- a/core/variant/array.cpp +++ b/core/variant/array.cpp @@ -322,8 +322,8 @@ bool Array::has(const Variant &p_value) const { return _p->array.find(p_value, 0) != -1; } -void Array::remove(int p_pos) { - _p->array.remove(p_pos); +void Array::remove_at(int p_pos) { + _p->array.remove_at(p_pos); } void Array::set(int p_idx, const Variant &p_value) { @@ -576,7 +576,7 @@ Variant Array::pop_back() { Variant Array::pop_front() { if (!_p->array.is_empty()) { const Variant ret = _p->array.get(0); - _p->array.remove(0); + _p->array.remove_at(0); return ret; } return Variant(); @@ -603,7 +603,7 @@ Variant Array::pop_at(int p_pos) { _p->array.size())); const Variant ret = _p->array.get(p_pos); - _p->array.remove(p_pos); + _p->array.remove_at(p_pos); return ret; } diff --git a/core/variant/array.h b/core/variant/array.h index bd39b8e0b1..5d2839dda7 100644 --- a/core/variant/array.h +++ b/core/variant/array.h @@ -75,7 +75,7 @@ public: Error resize(int p_new_size); Error insert(int p_pos, const Variant &p_value); - void remove(int p_pos); + void remove_at(int p_pos); void fill(const Variant &p_value); Variant front() const; diff --git a/core/variant/variant_call.cpp b/core/variant/variant_call.cpp index 65ea969146..34b8b782d2 100644 --- a/core/variant/variant_call.cpp +++ b/core/variant/variant_call.cpp @@ -1808,7 +1808,7 @@ static void _register_variant_builtin_methods() { bind_method(Array, append_array, sarray("array"), varray()); bind_method(Array, resize, sarray("size"), varray()); bind_method(Array, insert, sarray("position", "value"), varray()); - bind_method(Array, remove, sarray("position"), varray()); + bind_method(Array, remove_at, sarray("position"), varray()); bind_method(Array, fill, sarray("value"), varray()); bind_method(Array, erase, sarray("value"), varray()); bind_method(Array, front, sarray(), varray()); @@ -1842,7 +1842,7 @@ static void _register_variant_builtin_methods() { bind_method(PackedByteArray, push_back, sarray("value"), varray()); bind_method(PackedByteArray, append, sarray("value"), varray()); bind_method(PackedByteArray, append_array, sarray("array"), varray()); - bind_method(PackedByteArray, remove, sarray("index"), varray()); + bind_method(PackedByteArray, remove_at, sarray("index"), varray()); bind_method(PackedByteArray, insert, sarray("at_index", "value"), varray()); bind_method(PackedByteArray, fill, sarray("value"), varray()); bind_method(PackedByteArray, resize, sarray("new_size"), varray()); @@ -1903,7 +1903,7 @@ static void _register_variant_builtin_methods() { bind_method(PackedInt32Array, push_back, sarray("value"), varray()); bind_method(PackedInt32Array, append, sarray("value"), varray()); bind_method(PackedInt32Array, append_array, sarray("array"), varray()); - bind_method(PackedInt32Array, remove, sarray("index"), varray()); + bind_method(PackedInt32Array, remove_at, sarray("index"), varray()); bind_method(PackedInt32Array, insert, sarray("at_index", "value"), varray()); bind_method(PackedInt32Array, fill, sarray("value"), varray()); bind_method(PackedInt32Array, resize, sarray("new_size"), varray()); @@ -1923,7 +1923,7 @@ static void _register_variant_builtin_methods() { bind_method(PackedInt64Array, push_back, sarray("value"), varray()); bind_method(PackedInt64Array, append, sarray("value"), varray()); bind_method(PackedInt64Array, append_array, sarray("array"), varray()); - bind_method(PackedInt64Array, remove, sarray("index"), varray()); + bind_method(PackedInt64Array, remove_at, sarray("index"), varray()); bind_method(PackedInt64Array, insert, sarray("at_index", "value"), varray()); bind_method(PackedInt64Array, fill, sarray("value"), varray()); bind_method(PackedInt64Array, resize, sarray("new_size"), varray()); @@ -1943,7 +1943,7 @@ static void _register_variant_builtin_methods() { bind_method(PackedFloat32Array, push_back, sarray("value"), varray()); bind_method(PackedFloat32Array, append, sarray("value"), varray()); bind_method(PackedFloat32Array, append_array, sarray("array"), varray()); - bind_method(PackedFloat32Array, remove, sarray("index"), varray()); + bind_method(PackedFloat32Array, remove_at, sarray("index"), varray()); bind_method(PackedFloat32Array, insert, sarray("at_index", "value"), varray()); bind_method(PackedFloat32Array, fill, sarray("value"), varray()); bind_method(PackedFloat32Array, resize, sarray("new_size"), varray()); @@ -1963,7 +1963,7 @@ static void _register_variant_builtin_methods() { bind_method(PackedFloat64Array, push_back, sarray("value"), varray()); bind_method(PackedFloat64Array, append, sarray("value"), varray()); bind_method(PackedFloat64Array, append_array, sarray("array"), varray()); - bind_method(PackedFloat64Array, remove, sarray("index"), varray()); + bind_method(PackedFloat64Array, remove_at, sarray("index"), varray()); bind_method(PackedFloat64Array, insert, sarray("at_index", "value"), varray()); bind_method(PackedFloat64Array, fill, sarray("value"), varray()); bind_method(PackedFloat64Array, resize, sarray("new_size"), varray()); @@ -1983,7 +1983,7 @@ static void _register_variant_builtin_methods() { bind_method(PackedStringArray, push_back, sarray("value"), varray()); bind_method(PackedStringArray, append, sarray("value"), varray()); bind_method(PackedStringArray, append_array, sarray("array"), varray()); - bind_method(PackedStringArray, remove, sarray("index"), varray()); + bind_method(PackedStringArray, remove_at, sarray("index"), varray()); bind_method(PackedStringArray, insert, sarray("at_index", "value"), varray()); bind_method(PackedStringArray, fill, sarray("value"), varray()); bind_method(PackedStringArray, resize, sarray("new_size"), varray()); @@ -2003,7 +2003,7 @@ static void _register_variant_builtin_methods() { bind_method(PackedVector2Array, push_back, sarray("value"), varray()); bind_method(PackedVector2Array, append, sarray("value"), varray()); bind_method(PackedVector2Array, append_array, sarray("array"), varray()); - bind_method(PackedVector2Array, remove, sarray("index"), varray()); + bind_method(PackedVector2Array, remove_at, sarray("index"), varray()); bind_method(PackedVector2Array, insert, sarray("at_index", "value"), varray()); bind_method(PackedVector2Array, fill, sarray("value"), varray()); bind_method(PackedVector2Array, resize, sarray("new_size"), varray()); @@ -2023,7 +2023,7 @@ static void _register_variant_builtin_methods() { bind_method(PackedVector3Array, push_back, sarray("value"), varray()); bind_method(PackedVector3Array, append, sarray("value"), varray()); bind_method(PackedVector3Array, append_array, sarray("array"), varray()); - bind_method(PackedVector3Array, remove, sarray("index"), varray()); + bind_method(PackedVector3Array, remove_at, sarray("index"), varray()); bind_method(PackedVector3Array, insert, sarray("at_index", "value"), varray()); bind_method(PackedVector3Array, fill, sarray("value"), varray()); bind_method(PackedVector3Array, resize, sarray("new_size"), varray()); @@ -2043,7 +2043,7 @@ static void _register_variant_builtin_methods() { bind_method(PackedColorArray, push_back, sarray("value"), varray()); bind_method(PackedColorArray, append, sarray("value"), varray()); bind_method(PackedColorArray, append_array, sarray("array"), varray()); - bind_method(PackedColorArray, remove, sarray("index"), varray()); + bind_method(PackedColorArray, remove_at, sarray("index"), varray()); bind_method(PackedColorArray, insert, sarray("at_index", "value"), varray()); bind_method(PackedColorArray, fill, sarray("value"), varray()); bind_method(PackedColorArray, resize, sarray("new_size"), varray()); diff --git a/core/variant/variant_setget.cpp b/core/variant/variant_setget.cpp index 2530d77c62..b6ad2d870e 100644 --- a/core/variant/variant_setget.cpp +++ b/core/variant/variant_setget.cpp @@ -704,7 +704,7 @@ struct VariantIndexedSetGet_String { String *b = VariantGetInternalPtr<String>::get_ptr(base); const String *v = VariantInternal::get_string(value); if (v->length() == 0) { - b->remove(index); + b->remove_at(index); } else { b->set(index, v->get(0)); } @@ -723,7 +723,7 @@ struct VariantIndexedSetGet_String { String *b = VariantGetInternalPtr<String>::get_ptr(base); const String *v = VariantInternal::get_string(value); if (v->length() == 0) { - b->remove(index); + b->remove_at(index); } else { b->set(index, v->get(0)); } @@ -738,7 +738,7 @@ struct VariantIndexedSetGet_String { OOB_TEST(index, v.length()); const String &m = *reinterpret_cast<const String *>(member); if (unlikely(m.length() == 0)) { - v.remove(index); + v.remove_at(index); } else { v.set(index, m.unicode_at(0)); } |