diff options
author | Treeston <treeston.mmoc@gmail.com> | 2020-08-11 18:04:36 +0200 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2022-01-26 19:42:11 +0100 |
commit | 319ddd9bcdeab13b07c992e05bef5698af090ee0 (patch) | |
tree | 1d4ebb9e0fadefbd6effdf1c10769e3488c94840 /src/common/Utilities/Util.h | |
parent | cf369301c42773d104121820a8d131bb502e81d8 (diff) |
Core/Warden: Warden refactors (PR #25235)
(cherry picked from commit 6116e5b38522ccfb00f6c941c75482e05b4c0799)
Diffstat (limited to 'src/common/Utilities/Util.h')
-rw-r--r-- | src/common/Utilities/Util.h | 9 |
1 files changed, 9 insertions, 0 deletions
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<uint8, Size> HexStrToByteArray(std::string const& str, bool reverse = return arr; } +inline std::vector<uint8> HexStrToByteVector(std::string const& str, bool reverse = false) +{ + std::vector<uint8> 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); |