diff options
author | Lightning_A <aaronjrecord@gmail.com> | 2021-07-03 16:17:03 -0600 |
---|---|---|
committer | Aaron Record <aaronjrecord@gmail.com> | 2021-11-23 18:58:57 -0700 |
commit | e078f970db0e72bcc665d714416e6fc74e8434a6 (patch) | |
tree | 21fb39b40de2674a99018d88e142e6f0196c68b0 /core/string | |
parent | 5efe80f3085c8c6451363fe4c743bf3d7fc20b6c (diff) |
Rename `remove()` to `remove_at()` when removing by index
Diffstat (limited to 'core/string')
-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 |
3 files changed, 8 insertions, 8 deletions
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); } |