Just as a side node: With toVector() you won't save so much, because it also expands to a loop. It's only a little bit more sophisticated:
Q_OUTOFLINE_TEMPLATE QVector<T> QList<T>::toVector() const
{
QVector<T> result(size());
for (int i = 0; i < size(); ++i)
result[i] = at(i);
return result;
}
Q_OUTOFLINE_TEMPLATE QVector<T> QList<T>::toVector() const
{
QVector<T> result(size());
for (int i = 0; i < size(); ++i)
result[i] = at(i);
return result;
}
To copy to clipboard, switch view to plain text mode
Bookmarks