MCPcopy Index your code
hub / github.com/Vectorized/function-selector-miner / normalizeEndianess

Function normalizeEndianess

cpp/main.cpp:157–166  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

155#endif
156
157FORCE_INLINE uint32_t normalizeEndianess(uint32_t x)
158{
159 union {
160 uint32_t i;
161 char c[4];
162 } bint = {0x01020304};
163 if (bint.c[0] == 1) return x;
164 x = ((x >> 8) & 0x00FF00FF) | ((x & 0x00FF00FF) << 8);
165 return (x >> 16) | (x << 16);
166}
167
168struct SmallString
169{

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected