From 3bf3b0c9b4c51ac6a8ec5c17598242fccd6e444e Mon Sep 17 00:00:00 2001 From: theoreticalbts Date: Tue, 5 May 2015 18:40:31 -0400 Subject: [PATCH] uint128.hpp: Reflect uint128 --- include/fc/uint128.hpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/include/fc/uint128.hpp b/include/fc/uint128.hpp index 6071f64..41e6925 100644 --- a/include/fc/uint128.hpp +++ b/include/fc/uint128.hpp @@ -102,10 +102,9 @@ namespace fc static void full_product( const uint128& a, const uint128& b, uint128& result_hi, uint128& result_lo ); - private: - uint64_t hi; - uint64_t lo; - + // fields must be public for serialization + uint64_t hi; + uint64_t lo; }; static_assert( sizeof(uint128) == 2*sizeof(uint64_t), "validate packing assumptions" ); @@ -139,6 +138,8 @@ namespace std }; } +FC_REFLECT( fc::uint128_t, (hi)(lo) ) + #ifdef _MSC_VER #pragma warning (pop) #endif ///_MSC_VER