19 #ifndef TRINITY_BYTECONVERTER_H
20 #define TRINITY_BYTECONVERTER_H
34 std::swap(*val, *(val + T - 1));
41 template<
typename T>
inline void apply(T *val)
43 convert<sizeof(T)>((
char *)(val));
47 #if TRINITY_ENDIAN == TRINITY_BIGENDIAN
48 template<
typename T>
inline void EndianConvert(T& val) { ByteConverter::apply<T>(&val); }
50 template<
typename T>
inline void EndianConvertPtr(
void* val) { ByteConverter::apply<T>(val); }
int8_t int8
Definition: Define.h:148
void EndianConvertPtrReverse(void *)
Definition: ByteConverter.h:51
void EndianConvert(T &val)
Definition: ByteConverter.h:48
void apply(T *val)
Definition: ByteConverter.h:41
void EndianConvertReverse(T &)
Definition: ByteConverter.h:49
Definition: ByteConverter.h:29
void EndianConvertPtr(void *val)
Definition: ByteConverter.h:50
void convert(char *val)
Definition: ByteConverter.h:32
uint8_t uint8
Definition: Define.h:152
void convert< 0 >(char *)
Definition: ByteConverter.h:38
void convert< 1 >(char *)
Definition: ByteConverter.h:39