summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/openwfd/qopenwfdintegration.cpp
diff options
context:
space:
mode:
authorAnton Kudryavtsev <a.kudryavtsev@netris.ru>2016-10-19 12:20:10 +0300
committerAnton Kudryavtsev <a.kudryavtsev@netris.ru>2016-10-21 09:13:09 +0000
commit016b5bc949b6dfb2f76db2e8b40a40e7eaee6828 (patch)
tree042b786f9ff437c79a492e927e2396268aa1697c /src/plugins/platforms/openwfd/qopenwfdintegration.cpp
parent1e701cf0622fa7a5f194519b6afc7ef659f75cd7 (diff)
Plugins: use reserve() to optimize memory allocations
Change-Id: Id78ce43137e352292a9933222fe2f92d4ff4d69b Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/plugins/platforms/openwfd/qopenwfdintegration.cpp')
-rw-r--r--src/plugins/platforms/openwfd/qopenwfdintegration.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/plugins/platforms/openwfd/qopenwfdintegration.cpp b/src/plugins/platforms/openwfd/qopenwfdintegration.cpp
index 9ed61f7b2e..4850ca2e45 100644
--- a/src/plugins/platforms/openwfd/qopenwfdintegration.cpp
+++ b/src/plugins/platforms/openwfd/qopenwfdintegration.cpp
@@ -68,6 +68,7 @@ QOpenWFDIntegration::QOpenWFDIntegration()
int actualNumberOfDevices = wfdEnumerateDevices(devices,numberOfDevices,0);
Q_ASSERT(actualNumberOfDevices == numberOfDevices);
+ mDevices.reserve(actualNumberOfDevices);
for (int i = 0; i < actualNumberOfDevices; i++) {
mDevices.append(new QOpenWFDDevice(this,devices[i]));
}