Rename remove() to remove_at() when removing by index
This commit is contained in:
committed by
Aaron Record
parent
5efe80f308
commit
e078f970db
@@ -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(".");
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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); }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user