Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removal of smart_ref #109

Merged
merged 1 commit into from
Feb 18, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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