diff options
author | Sérgio Martins <sergio.martins@kdab.com> | 2015-07-01 17:23:10 +0100 |
---|---|---|
committer | Marc Mutz <marc.mutz@kdab.com> | 2015-07-04 06:03:21 +0000 |
commit | ebe4ab04ca156c64a5c56a6fca877654b451fe3d (patch) | |
tree | 83cf0a47657c2d3deadca672661358fb34d9cd77 /src/plugins/bearer/linux_common | |
parent | 0698f876ca02b85c1e584b72cac3444796f6a355 (diff) |
Use const-ref in foreach if T is big or non-trivial
Criteria: Linux x86_64, sizeof(T) > 8
Change-Id: I78c2b776ff219fa1ff6632fde17ae25fae66c54e
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Diffstat (limited to 'src/plugins/bearer/linux_common')
-rw-r--r-- | src/plugins/bearer/linux_common/qofonoservice_linux.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/bearer/linux_common/qofonoservice_linux.cpp b/src/plugins/bearer/linux_common/qofonoservice_linux.cpp index 9b83386abb..e9e91f9855 100644 --- a/src/plugins/bearer/linux_common/qofonoservice_linux.cpp +++ b/src/plugins/bearer/linux_common/qofonoservice_linux.cpp @@ -97,7 +97,7 @@ QStringList QOfonoManagerInterface::getModems() QDBusPendingReply<PathPropertiesList> reply = callWithArgumentList(QDBus::Block, QLatin1String("GetModems"), argumentList); reply.waitForFinished(); if (!reply.isError()) { - foreach (ObjectPathProperties modem, reply.value()) { + foreach (const ObjectPathProperties &modem, reply.value()) { modemList << modem.path.path(); } } @@ -260,7 +260,7 @@ QStringList QOfonoDataConnectionManagerInterface::contexts() QDBusPendingReply<PathPropertiesList > reply = call(QLatin1String("GetContexts")); reply.waitForFinished(); if (!reply.isError()) { - foreach (ObjectPathProperties context, reply.value()) { + foreach (const ObjectPathProperties &context, reply.value()) { contextList << context.path.path(); } } |