summaryrefslogtreecommitdiff
path: root/redfish-core/include/utils
diff options
context:
space:
mode:
authorEd Tanous <ed@tanous.net>2020-09-30 02:16:58 +0300
committerEd Tanous <ed@tanous.net>2020-10-15 18:52:46 +0300
commitb5a76932eab7d40487ffb305cd745ec155813c4e (patch)
tree193d0ba4e679be07880d661130930cd4adcb38b9 /redfish-core/include/utils
parentc370fad0ae67480fac19a2fe6a08be3401f48ae7 (diff)
downloadbmcweb-b5a76932eab7d40487ffb305cd745ec155813c4e.tar.xz
Lots of performance improvements
(In the voice of the kid from sixth sense) I see string copies... Apparently there are a lot of places we make unnecessary copies. This fixes all of them. Not sure how to split this up into smaller patches, or if it even needs split up. It seems pretty easy to review to me, because basically every diff is identical. Change-Id: I22b4ae4f96f7e4082d2bc701098a04f7bed95369 Signed-off-by: Ed Tanous <ed@tanous.net> Signed-off-by: Wludzik, Jozef <jozef.wludzik@intel.com>
Diffstat (limited to 'redfish-core/include/utils')
-rw-r--r--redfish-core/include/utils/fw_utils.hpp16
1 files changed, 9 insertions, 7 deletions
diff --git a/redfish-core/include/utils/fw_utils.hpp b/redfish-core/include/utils/fw_utils.hpp
index 5554d3bcf2..6a2ca14ed9 100644
--- a/redfish-core/include/utils/fw_utils.hpp
+++ b/redfish-core/include/utils/fw_utils.hpp
@@ -31,9 +31,11 @@ constexpr const char* bmcPurpose =
*
* @return void
*/
-inline void populateFirmwareInformation(
- std::shared_ptr<AsyncResp> aResp, const std::string& fwVersionPurpose,
- const std::string& activeVersionPropName, const bool populateLinkToImages)
+inline void
+ populateFirmwareInformation(const std::shared_ptr<AsyncResp>& aResp,
+ const std::string& fwVersionPurpose,
+ const std::string& activeVersionPropName,
+ const bool populateLinkToImages)
{
// Used later to determine running (known on Redfish as active) FW images
crow::connections::systemBus->async_method_call(
@@ -334,8 +336,8 @@ inline std::string getRedfishFWHealth(const std::string& fwState)
*
* @return void
*/
-inline void getFwStatus(std::shared_ptr<AsyncResp> asyncResp,
- const std::shared_ptr<std::string> swId,
+inline void getFwStatus(const std::shared_ptr<AsyncResp>& asyncResp,
+ const std::shared_ptr<std::string>& swId,
const std::string& dbusSvc)
{
BMCWEB_LOG_DEBUG << "getFwStatus: swId " << *swId << " svc " << dbusSvc;
@@ -392,8 +394,8 @@ inline void getFwStatus(std::shared_ptr<AsyncResp> asyncResp,
* @param[i,o] asyncResp Async response object
* @param[i] fwId The firmware ID
*/
-inline void getFwUpdateableStatus(std::shared_ptr<AsyncResp> asyncResp,
- const std::shared_ptr<std::string> fwId)
+inline void getFwUpdateableStatus(const std::shared_ptr<AsyncResp>& asyncResp,
+ const std::shared_ptr<std::string>& fwId)
{
crow::connections::systemBus->async_method_call(
[asyncResp, fwId](const boost::system::error_code ec,