From de46823a991d554f7ec93df447a4d8d8c4bb0d76 Mon Sep 17 00:00:00 2001 From: Peter Conrad Date: Mon, 13 May 2019 10:29:19 +0200 Subject: [PATCH] Dont inline generic pack/unpack to enable externalized serialization --- include/fc/io/raw.hpp | 4 ++-- include/fc/io/raw_fwd.hpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/fc/io/raw.hpp b/include/fc/io/raw.hpp index 696f398..6a68c8f 100644 --- a/include/fc/io/raw.hpp +++ b/include/fc/io/raw.hpp @@ -694,12 +694,12 @@ namespace fc { template - inline void pack( Stream& s, const T& v, uint32_t _max_depth ) { + void pack( Stream& s, const T& v, uint32_t _max_depth ) { FC_ASSERT( _max_depth > 0 ); fc::raw::detail::if_reflected< typename fc::reflector::is_defined >::pack( s, v, _max_depth - 1 ); } template - inline void unpack( Stream& s, T& v, uint32_t _max_depth ) + void unpack( Stream& s, T& v, uint32_t _max_depth ) { try { FC_ASSERT( _max_depth > 0 ); fc::raw::detail::if_reflected< typename fc::reflector::is_defined >::unpack( s, v, _max_depth - 1 ); diff --git a/include/fc/io/raw_fwd.hpp b/include/fc/io/raw_fwd.hpp index 30c67db..54f91b0 100644 --- a/include/fc/io/raw_fwd.hpp +++ b/include/fc/io/raw_fwd.hpp @@ -106,8 +106,8 @@ namespace fc { template inline void unpack( Stream& s, fc::ripemd160&, uint32_t _max_depth=FC_PACK_MAX_DEPTH ); template inline void pack( Stream& s, const fc::ripemd160&, uint32_t _max_depth=FC_PACK_MAX_DEPTH ); - template inline void pack( Stream& s, const T& v, uint32_t _max_depth=FC_PACK_MAX_DEPTH ); - template inline void unpack( Stream& s, T& v, uint32_t _max_depth=FC_PACK_MAX_DEPTH ); + template void pack( Stream& s, const T& v, uint32_t _max_depth=FC_PACK_MAX_DEPTH ); + template void unpack( Stream& s, T& v, uint32_t _max_depth=FC_PACK_MAX_DEPTH ); template inline void pack( Stream& s, const std::vector& v, uint32_t _max_depth=FC_PACK_MAX_DEPTH ); template inline void unpack( Stream& s, std::vector& v, uint32_t _max_depth=FC_PACK_MAX_DEPTH );