Commit 9ae2d64b authored by Sergio Martins's avatar Sergio Martins
Browse files

Use QList::reserve(), reduces reallocations.

parent 42963c2b
......@@ -3690,7 +3690,9 @@ void KAEventPrivate::endChanges()
KAEvent::List KAEvent::ptrList(QVector<KAEvent> &objList)
{
KAEvent::List ptrs;
for (int i = 0, count = objList.count(); i < count; ++i) {
const int count = objList.count();
ptrs.reserve(count);
for (int i = 0; i < count; ++i) {
ptrs += &objList[i];
}
return ptrs;
......
Supports Markdown
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