Skip to content

Commit

Permalink
Merge pull request #109 from bitshares/jmj_1548
Browse files Browse the repository at this point in the history
Removal of smart_ref
  • Loading branch information
jmjatlanta authored Feb 18, 2019
2 parents 1a411b8 + 19590fd commit 063be69
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 182 deletions.
14 changes: 0 additions & 14 deletions include/fc/io/raw.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
#include <fc/io/varint.hpp>
#include <fc/optional.hpp>
#include <fc/fwd.hpp>
#include <fc/smart_ref_fwd.hpp>
#include <fc/array.hpp>
#include <fc/time.hpp>
#include <fc/filesystem.hpp>
Expand Down Expand Up @@ -219,19 +218,6 @@ namespace fc {
FC_ASSERT( _max_depth > 0 );
fc::raw::unpack( *v, _max_depth - 1 ); // TODO not sure about this
}
template<typename Stream, typename T>
void pack( Stream& s, const fc::smart_ref<T>& v, uint32_t _max_depth )
{
FC_ASSERT( _max_depth > 0 );
fc::raw::pack( s, *v, _max_depth - 1 );
}

template<typename Stream, typename T>
void unpack( Stream& s, fc::smart_ref<T>& v, uint32_t _max_depth )
{
FC_ASSERT( _max_depth > 0 );
fc::raw::unpack( s, *v, _max_depth - 1 );
}

// optional
template<typename Stream, typename T>
Expand Down
9 changes: 0 additions & 9 deletions include/fc/reflect/typename.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

#include <fc/string.hpp>
#include <fc/optional.hpp>
#include <fc/smart_ref_fwd.hpp>

#include <fc/container/flat_fwd.hpp>
#include <fc/container/deque_fwd.hpp>
Expand Down Expand Up @@ -87,14 +86,6 @@ namespace fc {
return n.c_str();
}
};
template<typename T> struct get_typename< fc::smart_ref<T> >
{
static const char* name()
{
static std::string n = std::string("fc::smart_ref<") + get_typename<T>::name() + std::string(">");
return n.c_str();
}
};

struct unsigned_int;
class variant_object;
Expand Down
41 changes: 0 additions & 41 deletions include/fc/smart_ref_fwd.hpp

This file was deleted.

105 changes: 0 additions & 105 deletions include/fc/smart_ref_impl.hpp

This file was deleted.

13 changes: 0 additions & 13 deletions include/fc/variant.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
#include <fc/string.hpp>
#include <fc/container/deque_fwd.hpp>
#include <fc/container/flat_fwd.hpp>
#include <fc/smart_ref_fwd.hpp>
#include <boost/multi_index_container_fwd.hpp>

#ifdef FC_ASSERT
Expand Down Expand Up @@ -62,8 +61,6 @@ namespace fc
template<typename T, typename... Args> void to_variant( const boost::multi_index_container<T,Args...>& s, variant& v, uint32_t max_depth );
template<typename T, typename... Args> void from_variant( const variant& v, boost::multi_index_container<T,Args...>& s, uint32_t max_depth );

template<typename T> void to_variant( const smart_ref<T>& s, variant& v, uint32_t max_depth );
template<typename T> void from_variant( const variant& v, smart_ref<T>& s, uint32_t max_depth );
template<typename T> void to_variant( const safe<T>& s, variant& v, uint32_t max_depth );
template<typename T> void from_variant( const variant& v, safe<T>& s, uint32_t max_depth );
template<typename T> void to_variant( const std::unique_ptr<T>& s, variant& v, uint32_t max_depth );
Expand Down Expand Up @@ -624,16 +621,6 @@ namespace fc
s.value = v.as<T>( max_depth );
}

template<typename T>
void to_variant( const smart_ref<T>& s, variant& v, uint32_t max_depth ) {
to_variant( *s, v, max_depth );
}

template<typename T>
void from_variant( const variant& v, smart_ref<T>& s, uint32_t max_depth ) {
from_variant( v, *s, max_depth );
}

template<typename T, typename... Args>
void to_variant( const boost::multi_index_container<T,Args...>& c, variant& v, uint32_t max_depth )
{
Expand Down

0 comments on commit 063be69

Please sign in to comment.