chore: change some for loops to range-based (#26182)

This commit is contained in:
David Sanders 2020-10-27 10:22:24 -07:00 committed by GitHub
parent d8167ce138
commit 422190e1ff
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 11 additions and 16 deletions

View file

@ -122,9 +122,9 @@ void ClearWeaklyTrackedValues() {
std::vector<v8::Local<v8::Value>> GetWeaklyTrackedValues(v8::Isolate* isolate) {
std::vector<v8::Local<v8::Value>> locals;
for (size_t i = 0; i < weakly_tracked_values.size(); i++) {
if (!weakly_tracked_values[i].IsEmpty())
locals.push_back(weakly_tracked_values[i].Get(isolate));
for (const auto& value : weakly_tracked_values) {
if (!value.IsEmpty())
locals.push_back(value.Get(isolate));
}
return locals;
}