diff options
author | Patrick Ohly <patrick.ohly@intel.com> | 2016-08-29 04:58:24 -0700 |
---|---|---|
committer | Patrick Ohly <patrick.ohly@intel.com> | 2016-08-29 04:58:24 -0700 |
commit | a53e5289bd0bdb3ab88169f94d9ebf0fb68d3bb1 (patch) | |
tree | d84eefa3a225fd150d56611240cf2b891983cd21 | |
parent | 16e6e854c30023badb94fe093d41dc8e45de488d (diff) |
dbus-sync.cpp: fix cppcheck performance warning
cppcheck correctly warned that initializing a reference is enough,
no need to copy the string:
dbus-sync.cpp:97: cppcheck performance: passedByValue - Function parameter
'source' should be passed by reference.
-rw-r--r-- | src/dbus/server/dbus-sync.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/dbus/server/dbus-sync.cpp b/src/dbus/server/dbus-sync.cpp index bd63d450..68994872 100644 --- a/src/dbus/server/dbus-sync.cpp +++ b/src/dbus/server/dbus-sync.cpp @@ -94,7 +94,7 @@ DBusSync::DBusSync(const SessionCommon::SyncParams ¶ms, // Create source status and progress entries for each source in // the parent. See Session::sourceProgress(). - BOOST_FOREACH(const std::string source, + BOOST_FOREACH(const std::string &source, getSyncSources()) { m_helper.emitSourceProgress(sysync::PEV_PREPARING, source, |