Fix serial endian_access -fno-inline build

This commit is contained in:
Kp 2015-06-11 03:06:58 +00:00
parent 75b72dc8e9
commit 5124c510f8
2 changed files with 14 additions and 4 deletions

View file

@ -107,10 +107,15 @@ public:
* - native_endian: assume buffered data is native endian
* Copy regardless of host byte order
*/
static constexpr auto foreign_endian= tt::integral_constant<uint16_t, 0>{};
static constexpr auto little_endian = tt::integral_constant<uint16_t, 255>{};
static constexpr auto big_endian = tt::integral_constant<uint16_t, 256>{};
static constexpr auto native_endian = tt::integral_constant<uint16_t, 257>{};
typedef tt::integral_constant<uint16_t, 0> foreign_endian_type;
typedef tt::integral_constant<uint16_t, 255> little_endian_type;
typedef tt::integral_constant<uint16_t, 256> big_endian_type;
typedef tt::integral_constant<uint16_t, 257> native_endian_type;
static constexpr auto foreign_endian = foreign_endian_type{};
static constexpr auto little_endian = little_endian_type{};
static constexpr auto big_endian = big_endian_type{};
static constexpr auto native_endian = native_endian_type{};
};
/* Implementation details - avoid namespace pollution */

View file

@ -64,6 +64,11 @@ static void multi_send_robot_position_sub(const vobjptridx_t objnum, int now);
static void multi_send_release_robot(const vobjptridx_t objnum);
static void multi_delete_controlled_robot(const vobjptridx_t objnum);
constexpr serial::endian_access::foreign_endian_type serial::endian_access::foreign_endian;
constexpr serial::endian_access::little_endian_type serial::endian_access::little_endian;
constexpr serial::endian_access::big_endian_type serial::endian_access::big_endian;
constexpr serial::endian_access::native_endian_type serial::endian_access::native_endian;
//
// Code for controlling robots in multiplayer games
//