MCPcopy Create free account
hub / github.com/HaxeFoundation/hxcpp / reverse

Function reverse

include/cpp/marshal/Marshal.hpp:11–18  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9{
10 template <class T>
11 T reverse(T val)
12 {
13 auto view = cpp::marshal::View<uint8_t>(reinterpret_cast<uint8_t*>(&val), sizeof(T));
14
15 std::reverse(view.ptr.ptr, view.ptr.ptr + view.length);
16
17 return val;
18 }
19}
20
21inline cpp::marshal::View<char> cpp::marshal::Marshal::asCharView(const ::String& string)

Callers 15

readBigEndianPointerMethod · 0.70
readBigEndianInt16Method · 0.70
readBigEndianInt32Method · 0.70
readBigEndianInt64Method · 0.70
readBigEndianUInt16Method · 0.70
readBigEndianUInt32Method · 0.70
readBigEndianUInt64Method · 0.70
readBigEndianFloat32Method · 0.70
readBigEndianFloat64Method · 0.70
readLittleEndianInt16Method · 0.70
readLittleEndianInt32Method · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected