Reserve size of some containers we are filling
This commit is contained in:
parent
812e3b5f03
commit
19dc6cadea
31 changed files with 317 additions and 209 deletions
|
|
@ -15,6 +15,7 @@ ImagePackListModel::ImagePackListModel(const std::string &roomId, QObject *paren
|
|||
{
|
||||
auto packs_ = cache::client()->getImagePacks(room_id, std::nullopt);
|
||||
|
||||
packs.reserve(packs_.size());
|
||||
for (const auto &pack : packs_) {
|
||||
packs.push_back(QSharedPointer<SingleImagePackModel>(new SingleImagePackModel(pack)));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue