summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Kling <andreas.kling@nokia.com>2010-03-01 14:20:24 (GMT)
committerAndreas Kling <andreas.kling@nokia.com>2010-03-01 14:27:18 (GMT)
commit52c486156287bdfb67ed3765952f5c5a2cd0c318 (patch)
tree0fc44220b53b62e642aca0e96c44fa45b1f1192f
parent72da039e54a62bf3a481fefc753e0e50ba75df57 (diff)
downloadQt-52c486156287bdfb67ed3765952f5c5a2cd0c318.zip
Qt-52c486156287bdfb67ed3765952f5c5a2cd0c318.tar.gz
Qt-52c486156287bdfb67ed3765952f5c5a2cd0c318.tar.bz2
Use QList::reserve() in QDataStream>>QList
Reviewed-by: Denis Dzyubenko
-rw-r--r--src/corelib/io/qdatastream.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/corelib/io/qdatastream.h b/src/corelib/io/qdatastream.h
index ec4ba2f..222ba8f 100644
--- a/src/corelib/io/qdatastream.h
+++ b/src/corelib/io/qdatastream.h
@@ -243,6 +243,7 @@ QDataStream& operator>>(QDataStream& s, QList<T>& l)
l.clear();
quint32 c;
s >> c;
+ l.reserve(c);
for(quint32 i = 0; i < c; ++i)
{
T t;