From 66e6af89ce413ed7bb9f427d64250c6cc4bc3120 Mon Sep 17 00:00:00 2001 From: kenshi84 Date: Fri, 16 Dec 2016 18:10:03 +0900 Subject: added experimental boost::archive::portable_binary_{i|o}archive --- src/cryptonote_core/cryptonote_boost_serialization.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/cryptonote_core') diff --git a/src/cryptonote_core/cryptonote_boost_serialization.h b/src/cryptonote_core/cryptonote_boost_serialization.h index 663ef5070..9a81ac307 100644 --- a/src/cryptonote_core/cryptonote_boost_serialization.h +++ b/src/cryptonote_core/cryptonote_boost_serialization.h @@ -39,6 +39,8 @@ #include #include #include +#include +#include #include "cryptonote_basic.h" #include "common/unordered_containers_boost_serialization.h" #include "crypto/crypto.h" @@ -230,7 +232,8 @@ namespace boost // a & x.senderPk; // not serialized, as we do not use it in monero currently } - inline void serializeOutPk(boost::archive::binary_iarchive &a, rct::ctkeyV &outPk_, const boost::serialization::version_type ver) + template + inline typename std::enable_if::type serializeOutPk(Archive &a, rct::ctkeyV &outPk_, const boost::serialization::version_type ver) { rct::keyV outPk; a & outPk; @@ -242,7 +245,8 @@ namespace boost } } - inline void serializeOutPk(boost::archive::binary_oarchive &a, rct::ctkeyV &outPk_, const boost::serialization::version_type ver) + template + inline typename std::enable_if::type serializeOutPk(Archive &a, rct::ctkeyV &outPk_, const boost::serialization::version_type ver) { rct::keyV outPk(outPk_.size()); for (size_t n = 0; n < outPk_.size(); ++n) -- cgit v1.2.3 From 2ac80075444ebac2feef59f98c912342a708606d Mon Sep 17 00:00:00 2001 From: kenshi84 Date: Tue, 20 Dec 2016 13:04:19 +0900 Subject: also use portable serializer for boost_serialization_helper.h and net_node.inl, completely adandon boost/archive/binary_oarchive.hpp --- src/cryptonote_core/account.cpp | 2 -- src/cryptonote_core/blockchain.cpp | 2 -- src/cryptonote_core/cryptonote_boost_serialization.h | 1 - 3 files changed, 5 deletions(-) (limited to 'src/cryptonote_core') diff --git a/src/cryptonote_core/account.cpp b/src/cryptonote_core/account.cpp index c3f2b4446..89ad4184c 100644 --- a/src/cryptonote_core/account.cpp +++ b/src/cryptonote_core/account.cpp @@ -28,8 +28,6 @@ // // Parts of this file are originally copyright (c) 2012-2013 The Cryptonote developers -#include -#include #include #include "include_base_utils.h" diff --git a/src/cryptonote_core/blockchain.cpp b/src/cryptonote_core/blockchain.cpp index 70b2ccc79..ba369afbd 100644 --- a/src/cryptonote_core/blockchain.cpp +++ b/src/cryptonote_core/blockchain.cpp @@ -30,8 +30,6 @@ #include #include -#include -#include #include #include "include_base_utils.h" diff --git a/src/cryptonote_core/cryptonote_boost_serialization.h b/src/cryptonote_core/cryptonote_boost_serialization.h index 9a81ac307..7423b222a 100644 --- a/src/cryptonote_core/cryptonote_boost_serialization.h +++ b/src/cryptonote_core/cryptonote_boost_serialization.h @@ -38,7 +38,6 @@ #include #include #include -#include #include #include #include "cryptonote_basic.h" -- cgit v1.2.3