diff options
author | Lioncash <mathew1800@gmail.com> | 2018-08-16 05:16:11 +0200 |
---|---|---|
committer | Lioncash <mathew1800@gmail.com> | 2018-08-16 05:24:00 +0200 |
commit | b39cd70cd4a78903506d987080fe5e4a0e990f2d (patch) | |
tree | 64b90ace1c02e926a94d4b6dfa37377503dbca26 /src/common | |
parent | Merge pull request #1005 from DarkLordZach/registered-fmt (diff) | |
download | yuzu-b39cd70cd4a78903506d987080fe5e4a0e990f2d.tar yuzu-b39cd70cd4a78903506d987080fe5e4a0e990f2d.tar.gz yuzu-b39cd70cd4a78903506d987080fe5e4a0e990f2d.tar.bz2 yuzu-b39cd70cd4a78903506d987080fe5e4a0e990f2d.tar.lz yuzu-b39cd70cd4a78903506d987080fe5e4a0e990f2d.tar.xz yuzu-b39cd70cd4a78903506d987080fe5e4a0e990f2d.tar.zst yuzu-b39cd70cd4a78903506d987080fe5e4a0e990f2d.zip |
Diffstat (limited to 'src/common')
-rw-r--r-- | src/common/hex_util.cpp | 4 | ||||
-rw-r--r-- | src/common/hex_util.h | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/src/common/hex_util.cpp b/src/common/hex_util.cpp index ae17c89d4..609144def 100644 --- a/src/common/hex_util.cpp +++ b/src/common/hex_util.cpp @@ -4,6 +4,8 @@ #include "common/hex_util.h" +namespace Common { + u8 ToHexNibble(char c1) { if (c1 >= 65 && c1 <= 70) return c1 - 55; @@ -25,3 +27,5 @@ std::array<u8, 32> operator""_array32(const char* str, size_t len) { throw std::logic_error("Not of correct size."); return HexStringToArray<32>(str); } + +} // namespace Common diff --git a/src/common/hex_util.h b/src/common/hex_util.h index 13d586015..5fb79bb72 100644 --- a/src/common/hex_util.h +++ b/src/common/hex_util.h @@ -10,6 +10,8 @@ #include <fmt/format.h> #include "common/common_types.h" +namespace Common { + u8 ToHexNibble(char c1); template <size_t Size, bool le = false> @@ -35,3 +37,5 @@ std::string HexArrayToString(std::array<u8, Size> array, bool upper = true) { std::array<u8, 0x10> operator"" _array16(const char* str, size_t len); std::array<u8, 0x20> operator"" _array32(const char* str, size_t len); + +} // namespace Common |