From 70bd2bb1d3aec23fc052c9612f9e530c1a2de72d Mon Sep 17 00:00:00 2001 From: Zach Hilman Date: Mon, 1 Oct 2018 17:17:08 -0400 Subject: ips_layer: Deduplicate resource usage --- src/common/hex_util.cpp | 2 +- src/common/hex_util.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/common') diff --git a/src/common/hex_util.cpp b/src/common/hex_util.cpp index e516e5bbd..5b63f9e81 100644 --- a/src/common/hex_util.cpp +++ b/src/common/hex_util.cpp @@ -30,7 +30,7 @@ std::vector HexStringToVector(std::string_view str, bool little_endian) { return out; } -std::string HexVectorToString(std::vector vector, bool upper) { +std::string HexVectorToString(const std::vector& vector, bool upper) { std::string out; for (u8 c : vector) out += fmt::format(upper ? "{:02X}" : "{:02x}", c); diff --git a/src/common/hex_util.h b/src/common/hex_util.h index 0b7d3592a..68f003cb6 100644 --- a/src/common/hex_util.h +++ b/src/common/hex_util.h @@ -30,7 +30,7 @@ std::array HexStringToArray(std::string_view str) { return out; } -std::string HexVectorToString(std::vector vector, bool upper = true); +std::string HexVectorToString(const std::vector& vector, bool upper = true); template std::string HexArrayToString(std::array array, bool upper = true) { -- cgit v1.2.3