diff --git a/Src/Util/Format.cpp b/Src/Util/Format.cpp index da16f74..df55349 100644 --- a/Src/Util/Format.cpp +++ b/Src/Util/Format.cpp @@ -41,7 +41,7 @@ namespace Util static const char hex_digits[] = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f' }; - std::string Hex(uint32_t n, size_t num_digits) + std::string Hex(uint64_t n, size_t num_digits) { Util::Format f; f << "0x"; @@ -53,6 +53,11 @@ namespace Util return f; } + std::string Hex(uint64_t n) + { + return Hex(n, 16); + } + std::string Hex(uint32_t n) { return Hex(n, 8); diff --git a/Src/Util/Format.h b/Src/Util/Format.h index 91aa308..e434205 100644 --- a/Src/Util/Format.h +++ b/Src/Util/Format.h @@ -95,7 +95,8 @@ namespace Util std::ostream &operator<<(std::ostream &os, const Format &format); std::string ToLower(const std::string &str); std::string TrimWhiteSpace(const std::string &str); - std::string Hex(uint32_t n, size_t num_digits); + std::string Hex(uint64_t n, size_t num_digits); + std::string Hex(uint64_t n); std::string Hex(uint32_t n); std::string Hex(uint16_t n); std::string Hex(uint8_t n);