Files
@ r8122:b60b03677b3f
Branch filter:
Location: cpp/openttd-patchpack/source/src/core/endian_func.hpp - annotation
r8122:b60b03677b3f
397 B
text/x-c++hdr
(svn r11683) -Fix(r11682): win32.cpp still requires gfx.h inclusion, at least for now.
r8113:7815c26d7612 r8113:7815c26d7612 r8113:7815c26d7612 r8113:7815c26d7612 r8113:7815c26d7612 r8113:7815c26d7612 r8113:7815c26d7612 r8113:7815c26d7612 r8113:7815c26d7612 r8113:7815c26d7612 r8113:7815c26d7612 r8113:7815c26d7612 r8113:7815c26d7612 r8113:7815c26d7612 r8113:7815c26d7612 r8113:7815c26d7612 r8113:7815c26d7612 r8113:7815c26d7612 r8113:7815c26d7612 r8113:7815c26d7612 r8113:7815c26d7612 r8113:7815c26d7612 | /* $Id$ */
/** @file endian_func.hpp */
#ifndef ENDIAN_FUNC_H
#define ENDIAN_FUNC_H
static inline uint16 ReadLE16Aligned(const void *x)
{
return FROM_LE16(*(const uint16*)x);
}
static inline uint16 ReadLE16Unaligned(const void *x)
{
#ifdef OTTD_ALIGNMENT
return ((const byte*)x)[0] | ((const byte*)x)[1] << 8;
#else
return FROM_LE16(*(const uint16*)x);
#endif
}
#endif /* ENDIAN_FUNC_H */
|