diff options
| -rw-r--r-- | zencore/include/zencore/string.h | 2 | ||||
| -rw-r--r-- | zencore/string.cpp | 2 | ||||
| -rw-r--r-- | zenstore/compactcas.cpp | 12 |
3 files changed, 8 insertions, 8 deletions
diff --git a/zencore/include/zencore/string.h b/zencore/include/zencore/string.h index bbbb09004..013f2f568 100644 --- a/zencore/include/zencore/string.h +++ b/zencore/include/zencore/string.h @@ -553,7 +553,7 @@ ToHexBytes(const uint8_t* InputData, size_t ByteCount, char* OutString) } } -ZENCORE_API void FormatHex(uint32_t Value, char OutBlockHexString[9]); +ZENCORE_API void ToHex(uint32_t Value, char OutBlockHexString[9]); ZENCORE_API bool ParseHex(const std::string HexString, uint32_t& OutValue); ////////////////////////////////////////////////////////////////////////// diff --git a/zencore/string.cpp b/zencore/string.cpp index f116ac477..933d210e7 100644 --- a/zencore/string.cpp +++ b/zencore/string.cpp @@ -349,7 +349,7 @@ ParseHex(const std::string HexString, uint32_t& OutValue) static const char HexLUT[] = "0123456789abcdef"; void -FormatHex(uint32_t Value, char OutBlockHexString[9]) +ToHex(uint32_t Value, char OutBlockHexString[9]) { OutBlockHexString[0] = HexLUT[(Value >> 28) & 0xf]; OutBlockHexString[1] = HexLUT[(Value >> 24) & 0xf]; diff --git a/zenstore/compactcas.cpp b/zenstore/compactcas.cpp index 053d441b0..65b9bc969 100644 --- a/zenstore/compactcas.cpp +++ b/zenstore/compactcas.cpp @@ -46,7 +46,7 @@ namespace { ExtendablePathBuilder<256> Path; char BlockHexString[9]; - FormatHex(BlockIndex, BlockHexString); + ToHex(BlockIndex, BlockHexString); Path.Append(BlocksBasePath); Path.AppendSeparator(); @@ -1222,30 +1222,30 @@ TEST_CASE("compactcas.hex") CHECK(!ParseHex("", Value)); char Hex[9]; - FormatHex(0, Hex); + ToHex(0, Hex); HexString = std::string(Hex); CHECK(ParseHex(HexString, Value)); CHECK(Value == 0); - FormatHex(std::numeric_limits<std::uint32_t>::max(), Hex); + ToHex(std::numeric_limits<std::uint32_t>::max(), Hex); HexString = std::string(Hex); CHECK(HexString == "ffffffff"); CHECK(ParseHex(HexString, Value)); CHECK(Value == std::numeric_limits<std::uint32_t>::max()); - FormatHex(0xadf14711, Hex); + ToHex(0xadf14711, Hex); HexString = std::string(Hex); CHECK(HexString == "adf14711"); CHECK(ParseHex(HexString, Value)); CHECK(Value == 0xadf14711); - FormatHex(0x80000000, Hex); + ToHex(0x80000000, Hex); HexString = std::string(Hex); CHECK(HexString == "80000000"); CHECK(ParseHex(HexString, Value)); CHECK(Value == 0x80000000); - FormatHex(0x718293a4, Hex); + ToHex(0x718293a4, Hex); HexString = std::string(Hex); CHECK(HexString == "718293a4"); CHECK(ParseHex(HexString, Value)); |