mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-30 03:20:28 +00:00
LibJS: Avoid an unnecessary Vector copy in IndexedProperties::indices()
This commit is contained in:
parent
ee1b58bf41
commit
ea81a4a529
Notes:
sideshowbarker
2024-07-18 22:11:53 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/ea81a4a529b
1 changed files with 1 additions and 1 deletions
|
@ -374,7 +374,7 @@ Vector<u32> IndexedProperties::indices() const
|
|||
}
|
||||
} else {
|
||||
const auto& storage = static_cast<const GenericIndexedPropertyStorage&>(*m_storage);
|
||||
const auto packed_elements = storage.packed_elements();
|
||||
const auto& packed_elements = storage.packed_elements();
|
||||
indices.ensure_capacity(storage.array_like_size());
|
||||
for (size_t i = 0; i < packed_elements.size(); ++i) {
|
||||
if (!packed_elements.at(i).value.is_empty())
|
||||
|
|
Loading…
Reference in a new issue