summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick Venture <venture@google.com>2018-10-14 14:11:30 -0700
committerPatrick Venture <venture@google.com>2018-10-14 14:12:50 -0700
commitf287059d29d5307309ff2a84f487b9f9b56b5160 (patch)
tree08ec25ed9649a4b58c3642060a1eb9cf4422c988
parent6425ab76f5bdde1ea098645acc3b578414406f4f (diff)
downloadphosphor-state-manager-f287059d29d5307309ff2a84f487b9f9b56b5160.tar.gz
phosphor-state-manager-f287059d29d5307309ff2a84f487b9f9b56b5160.zip
discover_system_state: const reference for params
[discover_system_state.cpp:93]: (performance) Function parameter 'value' should be passed by const reference. Change-Id: I25fd43f7993d4d2d94731dbd8d9f490623933d6b Signed-off-by: Patrick Venture <venture@google.com>
-rw-r--r--discover_system_state.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/discover_system_state.cpp b/discover_system_state.cpp
index dfbf876..5ce94b4 100644
--- a/discover_system_state.cpp
+++ b/discover_system_state.cpp
@@ -89,8 +89,9 @@ std::string getProperty(sdbusplus::bus::bus& bus, std::string path,
return sdbusplus::message::variant_ns::get<std::string>(property);
}
-void setProperty(sdbusplus::bus::bus& bus, std::string path,
- std::string interface, std::string property, std::string value)
+void setProperty(sdbusplus::bus::bus& bus, const std::string& path,
+ const std::string& interface, const std::string& property,
+ const std::string& value)
{
sdbusplus::message::variant<std::string> variantValue = value;
std::string service = getService(bus, path, interface);
OpenPOWER on IntegriCloud