Skip to content

Commit ea81a4a

Browse files
committed
LibJS: Avoid an unnecessary Vector copy in IndexedProperties::indices()
1 parent ee1b58b commit ea81a4a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Userland/Libraries/LibJS/Runtime/IndexedProperties.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,7 @@ Vector<u32> IndexedProperties::indices() const
374374
}
375375
} else {
376376
const auto& storage = static_cast<const GenericIndexedPropertyStorage&>(*m_storage);
377-
const auto packed_elements = storage.packed_elements();
377+
const auto& packed_elements = storage.packed_elements();
378378
indices.ensure_capacity(storage.array_like_size());
379379
for (size_t i = 0; i < packed_elements.size(); ++i) {
380380
if (!packed_elements.at(i).value.is_empty())

0 commit comments

Comments
 (0)