version_handlers_builder: Use string references
Change-Id: Iefa4b09c2952eb5f6e7da4509c1a7a39dead9ed7
Signed-off-by: William A. Kennington III <wak@google.com>
diff --git a/bmc/version-handler/version_handlers_builder.cpp b/bmc/version-handler/version_handlers_builder.cpp
index d386128..d6ed016 100644
--- a/bmc/version-handler/version_handlers_builder.cpp
+++ b/bmc/version-handler/version_handlers_builder.cpp
@@ -61,7 +61,7 @@
/* version must have handler */
const auto& h = v.at("handler");
- const std::string handlerType = h.at("type");
+ const std::string& handlerType = h.at("type");
if (handlerType == "file")
{
const auto& path = h.at("path");
@@ -80,7 +80,7 @@
/* to make an action optional, assign type "skip" */
const auto& onOpen = a.at("open");
- const std::string onOpenType = onOpen.at("type");
+ const std::string& onOpenType = onOpen.at("type");
if (onOpenType == "systemd")
{
pack->onOpen = std::move(buildSystemd(onOpen));