MCPcopy Create free account
hub / github.com/Kitware/CMake / toHex16Bit

Function toHex16Bit

Utilities/cmjsoncpp/src/lib_json/json_writer.cpp:257–266  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

255 "f0f1f2f3f4f5f6f7f8f9fafbfcfdfeff";
256
257static String toHex16Bit(unsigned int x) {
258 const unsigned int hi = (x >> 8) & 0xff;
259 const unsigned int lo = x & 0xff;
260 String result(4, ' ');
261 result[0] = hex2[2 * hi];
262 result[1] = hex2[2 * hi + 1];
263 result[2] = hex2[2 * lo];
264 result[3] = hex2[2 * lo + 1];
265 return result;
266}
267
268static void appendRaw(String& result, unsigned ch) {
269 result += static_cast<char>(ch);

Callers 1

appendHexFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…