diff options
author | Vegard Storheil Eriksen <zyp@jvnv.net> | 2010-11-27 11:59:58 +0100 |
---|---|---|
committer | Vegard Storheil Eriksen <zyp@jvnv.net> | 2010-11-30 21:36:41 +0100 |
commit | 0599d5beb9d6d37394441fec55a592767a143be0 (patch) | |
tree | 5e4f61eb6f0957bd71f5c14404950667b16ec3b9 /common | |
parent | b01701370dafbc85fdbb50f8ba35b61b4d7db3d7 (diff) |
Changed from text to binary archive.
Diffstat (limited to 'common')
-rw-r--r-- | common/message.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/common/message.cpp b/common/message.cpp index 1429736..5c5ab50 100644 --- a/common/message.cpp +++ b/common/message.cpp @@ -3,8 +3,8 @@ #include <boost/serialization/vector.hpp> #include <boost/serialization/string.hpp> #include <boost/serialization/shared_ptr.hpp> -#include <boost/archive/text_oarchive.hpp> -#include <boost/archive/text_iarchive.hpp> +#include <boost/archive/binary_oarchive.hpp> +#include <boost/archive/binary_iarchive.hpp> #include <cstring> #include <sstream> @@ -33,7 +33,7 @@ Message::BoostBase<Sub>::BoostBase(Type t) : Base(t) { template<class Sub> std::pair<uint8_t*, std::size_t> Message::BoostBase<Sub>::serialize() { std::ostringstream os; - boost::archive::text_oarchive oa(os); + boost::archive::binary_oarchive oa(os); oa & *this; @@ -48,7 +48,7 @@ std::pair<uint8_t*, std::size_t> Message::BoostBase<Sub>::serialize() { template<class Sub> void Message::BoostBase<Sub>::deserialize(uint8_t* data, std::size_t bytes) { std::istringstream is(std::string((char*)data, bytes)); - boost::archive::text_iarchive ia(is); + boost::archive::binary_iarchive ia(is); ia & *this; } |