MCPcopy Create free account
hub / github.com/SakuraEngine/SakuraEngine / parse_hex

Function parse_hex

modules/core/base/src/SkrBase/build.md5.cpp:19–31  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

17
18template <class T>
19bool parse_hex(const char8_t* ptr, T& value)
20{
21 constexpr size_t digits = sizeof(T) * 2;
22 value = 0;
23 for (size_t i = 0; i < digits; ++i)
24 {
25 int result = parse_hex_digit(ptr[i]);
26 if (result < 0)
27 return false;
28 value |= result << (4 * (digits - i - 1));
29 }
30 return true;
31}
32
33bool make_md5(const std::u8string_view& str, skr_md5_t& value)
34{

Callers 1

make_md5Function · 0.70

Calls 1

parse_hex_digitFunction · 0.70

Tested by

no test coverage detected