Commit b8397d5a authored by Laurent Montel's avatar Laurent Montel 😁

Reserve memory

parent 4e0005a9
......@@ -147,6 +147,7 @@ QString GrantleeViewFormatter::formatArticles(const QVector<Article> &article, A
const int nbArticles(article.count());
articlesList.reserve(nbArticles);
QList<ArticleGrantleeObject *> lstObj;
lstObj.reserve(nbArticles);
for (int i = 0; i < nbArticles; ++i) {
ArticleGrantleeObject *articleObj = new ArticleGrantleeObject(mImageDir, article.at(i), icon);
articlesList << QVariant::fromValue(static_cast<QObject *>(articleObj));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment