diff --git a/src/utils.cpp b/src/utils.cpp index f6d6bdc..de6241f 100644 --- a/src/utils.cpp +++ b/src/utils.cpp @@ -62,6 +62,7 @@ std::vector utils::fromHexString(std::string_view hexStr) { assert(hexStr.size() % 2 == 0); std::vector result; + result.reserve(hexStr.length() / 2); for (size_t i = 0; i < hexStr.length(); i += 2) { std::string_view byteString = hexStr.substr(i, 2); HexToU8Result hi = hexToU8(byteString[0]);