diff options
| author | paybee <dev@payb.ee> | 2014-05-29 17:53:49 +0200 |
|---|---|---|
| committer | paybee <dev@payb.ee> | 2014-05-29 17:53:49 +0200 |
| commit | 0e5223321258d8fa6bbb7190ecb2b230a801aac2 (patch) | |
| tree | acbd51dac3256b47bab6c1b98d21a3434b7158b7 /src/serialization/serialization.h | |
| parent | feacdded6b48fcfe18bc3218b05b27e94db2fc92 (diff) | |
| parent | 5c1b7c72249a114b1c30945fc8a9116c07573a48 (diff) | |
| download | monzero-core-0e5223321258d8fa6bbb7190ecb2b230a801aac2.tar.gz monzero-core-0e5223321258d8fa6bbb7190ecb2b230a801aac2.tar.xz monzero-core-0e5223321258d8fa6bbb7190ecb2b230a801aac2.zip | |
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'src/serialization/serialization.h')
| -rw-r--r-- | src/serialization/serialization.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/serialization/serialization.h b/src/serialization/serialization.h index 2e69ea0a3..7024fdc03 100644 --- a/src/serialization/serialization.h +++ b/src/serialization/serialization.h @@ -10,6 +10,7 @@ #include <vector> #include <string> #include <boost/type_traits/is_integral.hpp> +#include <boost/type_traits/integral_constant.hpp> template <class T> struct is_blob_type { typedef boost::false_type type; }; @@ -79,8 +80,10 @@ inline bool do_serialize(Archive &ar, T &v) if (!r || !ar.stream().good()) return false; \ } while(0); #define FIELDS(f) \ + do { \ bool r = ::do_serialize(ar, f); \ - if (!r || !ar.stream().good()) return false; + if (!r || !ar.stream().good()) return false; \ + } while(0); #define FIELD(f) \ do { \ ar.tag(#f); \ @@ -99,6 +102,7 @@ inline bool do_serialize(Archive &ar, T &v) ar.serialize_varint(f); \ if (!ar.stream().good()) return false; \ } while(0); + namespace serialization { namespace detail { |
