summaryrefslogtreecommitdiff
path: root/src/common/hex_util.cpp
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2019-06-12 17:27:06 -0400
committerLioncash <mathew1800@gmail.com>2019-06-12 17:54:05 -0400
commita62088539ed02a8569814601b3b99b713c5d8a34 (patch)
tree03fe279e7651c55291f702f5a8b518cb07e35812 /src/common/hex_util.cpp
parent7e2bcf04b471579054424fd26746826747c0d335 (diff)
common/hex_util: Combine HexVectorToString() and HexArrayToString()
These can be generified together by using a concept type to designate them. This also has the benefit of not making copies of potentially very large arrays.
Diffstat (limited to 'src/common/hex_util.cpp')
-rw-r--r--src/common/hex_util.cpp7
1 files changed, 0 insertions, 7 deletions
diff --git a/src/common/hex_util.cpp b/src/common/hex_util.cpp
index 5b63f9e81..c2f6cf0f6 100644
--- a/src/common/hex_util.cpp
+++ b/src/common/hex_util.cpp
@@ -30,13 +30,6 @@ std::vector<u8> HexStringToVector(std::string_view str, bool little_endian) {
return out;
}
-std::string HexVectorToString(const std::vector<u8>& vector, bool upper) {
- std::string out;
- for (u8 c : vector)
- out += fmt::format(upper ? "{:02X}" : "{:02x}", c);
- return out;
-}
-
std::array<u8, 16> operator""_array16(const char* str, std::size_t len) {
if (len != 32) {
LOG_ERROR(Common,