Updates from BitShares FC #22
2 changed files with 11 additions and 1 deletions
|
|
@ -170,7 +170,7 @@ namespace fc {
|
|||
FC_ASSERT( _max_depth > 0 );
|
||||
T tmp;
|
||||
fc::raw::unpack( s, tmp, _max_depth - 1 );
|
||||
v = std::make_shared<const T>(tmp);
|
||||
v = std::make_shared<const T>(std::move(tmp));
|
||||
} FC_RETHROW_EXCEPTIONS( warn, "std::shared_ptr<const T>", ("type",fc::get_typename<T>::name()) ) }
|
||||
|
||||
template<typename Stream> inline void pack( Stream& s, const unsigned_int& v, uint32_t _max_depth ) {
|
||||
|
|
|
|||
|
|
@ -126,6 +126,16 @@ namespace fc {
|
|||
template<typename Stream, typename T, size_t N> inline void pack( Stream& s, const fc::array<T,N>& v, uint32_t _max_depth=FC_PACK_MAX_DEPTH );
|
||||
template<typename Stream, typename T, size_t N> inline void unpack( Stream& s, fc::array<T,N>& v, uint32_t _max_depth=FC_PACK_MAX_DEPTH);
|
||||
|
||||
template<typename Stream, typename T> inline void pack( Stream& s, const shared_ptr<T>& v,
|
||||
uint32_t _max_depth=FC_PACK_MAX_DEPTH );
|
||||
template<typename Stream, typename T> inline void unpack( Stream& s, shared_ptr<T>& v,
|
||||
uint32_t _max_depth=FC_PACK_MAX_DEPTH );
|
||||
|
||||
template<typename Stream, typename T> inline void pack( Stream& s, const shared_ptr<const T>& v,
|
||||
uint32_t _max_depth=FC_PACK_MAX_DEPTH );
|
||||
template<typename Stream, typename T> inline void unpack( Stream& s, shared_ptr<const T>& v,
|
||||
uint32_t _max_depth=FC_PACK_MAX_DEPTH );
|
||||
|
||||
template<typename Stream> inline void pack( Stream& s, const bool& v, uint32_t _max_depth=FC_PACK_MAX_DEPTH );
|
||||
template<typename Stream> inline void unpack( Stream& s, bool& v, uint32_t _max_depth=FC_PACK_MAX_DEPTH );
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue