From c86864976cfa59049b6ca9ee3dc0ad02a0c130f5 Mon Sep 17 00:00:00 2001 From: Patrick Niklaus Date: Wed, 23 Mar 2016 22:36:20 +0100 Subject: [PATCH] Fix hint size --- include/engine/hint.hpp | 4 +++- include/engine/phantom_node.hpp | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/include/engine/hint.hpp b/include/engine/hint.hpp index 9409ba361..4d6eb93a1 100644 --- a/include/engine/hint.hpp +++ b/include/engine/hint.hpp @@ -58,12 +58,14 @@ struct Hint }; #ifndef _MSC_VER +static_assert(sizeof(Hint) == 60 + 4, "Hint is bigger than expected"); constexpr std::size_t ENCODED_HINT_SIZE = 88; static_assert(ENCODED_HINT_SIZE / 4 * 3 >= sizeof(Hint), "ENCODED_HINT_SIZE does not match size of Hint"); #else // PhantomNode is bigger under windows because MSVC does not support bit packing -constexpr std::size_t ENCODED_HINT_SIZE = 84; +static_assert(sizeof(Hint) == 64 + 4, "Hint is bigger than expected"); +constexpr std::size_t ENCODED_HINT_SIZE = 92; static_assert(ENCODED_HINT_SIZE / 4 * 3 >= sizeof(Hint), "ENCODED_HINT_SIZE does not match size of Hint"); #endif diff --git a/include/engine/phantom_node.hpp b/include/engine/phantom_node.hpp index 6d5ab409e..57c5bddc3 100644 --- a/include/engine/phantom_node.hpp +++ b/include/engine/phantom_node.hpp @@ -187,6 +187,8 @@ struct PhantomNode #ifndef _MSC_VER static_assert(sizeof(PhantomNode) == 60, "PhantomNode has more padding then expected"); +#else +static_assert(sizeof(PhantomNode) == 64, "PhantomNode has more padding then expected"); #endif using PhantomNodePair = std::pair;