1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 06:37:43 +00:00

AK: Make Vector use size_t for its size and capacity

This commit is contained in:
Andreas Kling 2020-02-25 14:49:47 +01:00
parent 9c6f7d3e7d
commit ceec1a7d38
94 changed files with 323 additions and 317 deletions

View file

@ -101,7 +101,7 @@ private:
ViewMode m_view_mode { Invalid };
NonnullRefPtr<GUI::FileSystemModel> m_model;
int m_path_history_position { 0 };
size_t m_path_history_position { 0 };
Vector<String> m_path_history;
void add_path_to_history(const StringView& path);

View file

@ -182,7 +182,7 @@ String get_duplicate_name(const String& path, int duplicate_count)
FileSystemPath fsp(path);
StringBuilder duplicated_name;
duplicated_name.append('/');
for (int i = 0; i < fsp.parts().size() - 1; ++i) {
for (size_t i = 0; i < fsp.parts().size() - 1; ++i) {
duplicated_name.appendf("%s/", fsp.parts()[i].characters());
}
auto prev_duplicate_tag = String::format("(%d)", duplicate_count);