summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGunnar Mills <gmills@us.ibm.com>2017-09-20 15:25:26 -0500
committerBrad Bishop <bradleyb@fuzziesquirrel.com>2017-09-29 14:49:56 +0000
commit61010b23c6852ee4409fc56a532b4b519e203839 (patch)
tree2c1f3bbf4533f57f7ed87191934f958aaff99a08
parent2badd7a655605734bda5199f1631ff11f18e58e2 (diff)
downloadopenpower-pnor-code-mgmt-61010b23c6852ee4409fc56a532b4b519e203839.tar.gz
openpower-pnor-code-mgmt-61010b23c6852ee4409fc56a532b4b519e203839.zip
Change to pass by reference
removeActiveAssociation and createActiveAssociation should be pass by reference. Change-Id: I5d4bb8a15714dcae5f2b71c5151262940cc91f49 Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
-rw-r--r--item_updater.cpp4
-rwxr-xr-xitem_updater.hpp4
2 files changed, 4 insertions, 4 deletions
diff --git a/item_updater.cpp b/item_updater.cpp
index b45193236..101489050 100644
--- a/item_updater.cpp
+++ b/item_updater.cpp
@@ -521,7 +521,7 @@ void ItemUpdater::freeSpace()
}
}
-void ItemUpdater::createActiveAssociation(std::string path)
+void ItemUpdater::createActiveAssociation(const std::string& path)
{
assocs.emplace_back(std::make_tuple(ACTIVE_FWD_ASSOCIATION,
ACTIVE_REV_ASSOCIATION,
@@ -549,7 +549,7 @@ void ItemUpdater::updateFunctionalAssociation(const std::string& path)
associations(assocs);
}
-void ItemUpdater::removeActiveAssociation(std::string path)
+void ItemUpdater::removeActiveAssociation(const std::string& path)
{
for (auto iter = assocs.begin(); iter != assocs.end();)
{
diff --git a/item_updater.hpp b/item_updater.hpp
index 1c65a1c06..3c8698f7e 100755
--- a/item_updater.hpp
+++ b/item_updater.hpp
@@ -104,7 +104,7 @@ class ItemUpdater : public ItemUpdaterInherit
*
* @param[in] path - The path to create the association to.
*/
- void createActiveAssociation(std::string path);
+ void createActiveAssociation(const std::string& path);
/** @brief Updates the functional association to the
* new "running" PNOR image
@@ -117,7 +117,7 @@ class ItemUpdater : public ItemUpdaterInherit
*
* @param[in] path - The path to remove the association from.
*/
- void removeActiveAssociation(std::string path);
+ void removeActiveAssociation(const std::string& path);
private:
/** @brief Callback function for Software.Version match.
OpenPOWER on IntegriCloud