MCPcopy Create free account
hub / github.com/bailey27/cppcryptfs / swapBytesVal

Function swapBytesVal

libcppcryptfs/util/util.cpp:52–60  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

50
51template<typename T>
52T swapBytesVal(T x)
53{
54 T y;
55 char* px = (char*)&x;
56 char* py = (char*)&y;
57 for (int i = 0; i<sizeof(T); i++)
58 py[i] = px[sizeof(T) - 1 - i];
59 return y;
60}
61
62template<typename T>
63T MakeBigEndian(T n)

Callers 1

MakeBigEndianFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected