From 89144a3a2f411d66727858d677cbd4b7aa8d14ba Mon Sep 17 00:00:00 2001 From: Ed Tanous Date: Mon, 8 Apr 2024 17:27:04 -0700 Subject: Remove a copy Capturing by auto here causes a copy. Found using static analysis. Change-Id: Ifbb08f9af0cd6eeec1e611c610e7adf53e17665c Signed-off-by: Ed Tanous --- redfish-core/lib/chassis.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/redfish-core/lib/chassis.hpp b/redfish-core/lib/chassis.hpp index 4a79783fb4..9ee10b5c62 100644 --- a/redfish-core/lib/chassis.hpp +++ b/redfish-core/lib/chassis.hpp @@ -152,7 +152,7 @@ inline void handlePhysicalSecurityGetSubTree( { if (!object.second.empty()) { - const auto service = object.second.front(); + const auto& service = object.second.front(); BMCWEB_LOG_DEBUG("Get intrusion status by service "); -- cgit v1.2.3