MCPcopy Create free account
hub / github.com/deathkiller/jazz2-native / toHex16Bit

Function toHex16Bit

Sources/Dependencies/jsoncpp/writer.cpp:200–209  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

198 "f0f1f2f3f4f5f6f7f8f9fafbfcfdfeff";
199
200 static StringContainer toHex16Bit(unsigned int x) {
201 const unsigned int hi = (x >> 8) & 0xff;
202 const unsigned int lo = x & 0xff;
203 StringContainer result(4, ' ');
204 result[0] = hex2[2 * hi];
205 result[1] = hex2[2 * hi + 1];
206 result[2] = hex2[2 * lo];
207 result[3] = hex2[2 * lo + 1];
208 return result;
209 }
210
211 static void appendRaw(StringContainer& result, unsigned ch) {
212 result += static_cast<char>(ch);

Callers 1

appendHexFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected