Fix typo. Use reserve instead of resize.

--HG--
branch : develop
This commit is contained in:
Roman Telezhynskyi 2019-01-20 13:18:50 +02:00
parent 2ce17d5bee
commit 13b37ffd32

View File

@ -833,17 +833,17 @@ QVector<VLayoutPiece> MainWindowsNoGUI::PrepareDetailsForLayout(const QVector<De
futureWatcher.waitForFinished(); futureWatcher.waitForFinished();
QVector<VLayoutPiece> layautDetails; QVector<VLayoutPiece> layoutDetails;
layautDetails.resize(details.size()); layoutDetails.reserve(details.size());
const QFuture<VLayoutPiece> future = futureWatcher.future(); const QFuture<VLayoutPiece> future = futureWatcher.future();
QFuture<VLayoutPiece>::const_iterator i; QFuture<VLayoutPiece>::const_iterator i;
for (i = future.constBegin(); i != future.constEnd(); ++i) for (i = future.constBegin(); i != future.constEnd(); ++i)
{ {
layautDetails.append(*i); layoutDetails.append(*i);
} }
return layautDetails; return layoutDetails;
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------