From 319ddd9bcdeab13b07c992e05bef5698af090ee0 Mon Sep 17 00:00:00 2001 From: Treeston Date: Tue, 11 Aug 2020 18:04:36 +0200 Subject: Core/Warden: Warden refactors (PR #25235) (cherry picked from commit 6116e5b38522ccfb00f6c941c75482e05b4c0799) --- src/common/Utilities/Util.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/common/Utilities') diff --git a/src/common/Utilities/Util.h b/src/common/Utilities/Util.h index 18a380ea9b4..a7f6619838a 100644 --- a/src/common/Utilities/Util.h +++ b/src/common/Utilities/Util.h @@ -365,6 +365,15 @@ std::array HexStrToByteArray(std::string const& str, bool reverse = return arr; } +inline std::vector HexStrToByteVector(std::string const& str, bool reverse = false) +{ + std::vector buf; + size_t const sz = (str.size() / 2); + buf.resize(sz); + Trinity::Impl::HexStrToByteArray(str, buf.data(), sz, reverse); + return buf; +} + TC_COMMON_API bool StringToBool(std::string const& str); TC_COMMON_API float DegToRad(float degrees); -- cgit v1.2.3