Rename remove() to remove_at() when removing by index
This commit is contained in:
parent
5efe80f308
commit
e078f970db
134 changed files with 323 additions and 323 deletions
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue