Move many loops over glcr::Vector to range-based loops.
This commit is contained in:
parent
c06d1741f3
commit
b2354ae341
7 changed files with 18 additions and 19 deletions
|
|
@ -37,6 +37,7 @@ class Vector {
|
|||
|
||||
// Setters.
|
||||
// FIXME: Handle downsizing.
|
||||
// TODO: Rename this so it is clear that this only affects capacity.
|
||||
void Resize(uint64_t capacity);
|
||||
|
||||
void PushBack(const T& item);
|
||||
|
|
|
|||
|
|
@ -72,8 +72,8 @@ glcr::ErrorOr<glcr::Vector<glcr::String>> ListDirectory(glcr::StringView path) {
|
|||
|
||||
auto file_views = glcr::StrSplit(dir.filenames(), ',');
|
||||
glcr::Vector<glcr::String> files;
|
||||
for (uint64_t i = 0; i < file_views.size(); i++) {
|
||||
files.PushBack(file_views[i]);
|
||||
for (const auto& view : glcr::StrSplit(dir.filenames(), ',')) {
|
||||
files.PushBack(view);
|
||||
}
|
||||
return files;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue