MCPcopy Create free account
hub / github.com/Tencent/libpag / HexCharToInt

Function HexCharToInt

exporter/src/utils/PsdTextAttribute.cpp:28–37  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

26namespace exporter {
27
28inline int HexCharToInt(const char c) {
29 int result;
30 auto [ptr, ec] = std::from_chars(&c, &c + 1, result, 16);
31 if (ec != std::errc() || ptr != &c + 1) {
32 LOGE("HexCharToInt error: %d (%s)", static_cast<int>(ec),
33 std::make_error_code(ec).message().c_str());
34 return -1;
35 }
36 return result;
37}
38
39size_t PsdTextAttribute::stringFormatTransform(std::vector<char>& dst, const uint8_t* src,
40 const int len) {

Callers 1

getKeyMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected