summaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
authorGravatar bunnei2018-08-16 11:54:42 -0400
committerGravatar GitHub2018-08-16 11:54:42 -0400
commit3fd78f4d24118091d6e75e950a78d5b24d50dc53 (patch)
tree837ef068281d70eb9b5d9b1d760a59794d5f1672 /src/common
parentMerge pull request #1075 from lioncash/include (diff)
parentcommon: Namespace hex_util.h/.cpp (diff)
downloadyuzu-3fd78f4d24118091d6e75e950a78d5b24d50dc53.tar.gz
yuzu-3fd78f4d24118091d6e75e950a78d5b24d50dc53.tar.xz
yuzu-3fd78f4d24118091d6e75e950a78d5b24d50dc53.zip
Merge pull request #1085 from lioncash/namespace
common: Namespace hex_util.h/.cpp
Diffstat (limited to 'src/common')
-rw-r--r--src/common/hex_util.cpp4
-rw-r--r--src/common/hex_util.h4
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 @@
4 4
5#include "common/hex_util.h" 5#include "common/hex_util.h"
6 6
7namespace Common {
8
7u8 ToHexNibble(char c1) { 9u8 ToHexNibble(char c1) {
8 if (c1 >= 65 && c1 <= 70) 10 if (c1 >= 65 && c1 <= 70)
9 return c1 - 55; 11 return c1 - 55;
@@ -25,3 +27,5 @@ std::array<u8, 32> operator""_array32(const char* str, size_t len) {
25 throw std::logic_error("Not of correct size."); 27 throw std::logic_error("Not of correct size.");
26 return HexStringToArray<32>(str); 28 return HexStringToArray<32>(str);
27} 29}
30
31} // 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 @@
10#include <fmt/format.h> 10#include <fmt/format.h>
11#include "common/common_types.h" 11#include "common/common_types.h"
12 12
13namespace Common {
14
13u8 ToHexNibble(char c1); 15u8 ToHexNibble(char c1);
14 16
15template <size_t Size, bool le = false> 17template <size_t Size, bool le = false>
@@ -35,3 +37,5 @@ std::string HexArrayToString(std::array<u8, Size> array, bool upper = true) {
35 37
36std::array<u8, 0x10> operator"" _array16(const char* str, size_t len); 38std::array<u8, 0x10> operator"" _array16(const char* str, size_t len);
37std::array<u8, 0x20> operator"" _array32(const char* str, size_t len); 39std::array<u8, 0x20> operator"" _array32(const char* str, size_t len);
40
41} // namespace Common