MCPcopy Create free account
hub / github.com/ImageEngine/cortex / asLittleEndian

Function asLittleEndian

include/IECore/ByteOrder.h:168–178  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

166/// otherwise returns x unchanged.
167template<typename T>
168inline T asLittleEndian( const T &x )
169{
170 if( bigEndian() )
171 {
172 return reverseBytes( x );
173 }
174 else
175 {
176 return x;
177 }
178}
179
180/// If running on a little endian platform,
181/// returns a copy of x with reversed bytes,

Callers

nothing calls this directly

Calls 2

bigEndianFunction · 0.85
reverseBytesFunction · 0.85

Tested by

no test coverage detected