Eliminate use of boost::shared_ptr
This commit is contained in:
@@ -151,7 +151,7 @@ namespace chaiscript
|
||||
std::shared_ptr<typename boost::remove_const<Type>::type>
|
||||
shared_ptr_unconst_clone(const std::shared_ptr<typename boost::add_const<Type>::type> &p)
|
||||
{
|
||||
return boost::const_pointer_cast<typename boost::remove_const<Type>::type>(p);
|
||||
return std::const_pointer_cast<typename boost::remove_const<Type>::type>(p);
|
||||
}
|
||||
|
||||
|
||||
@@ -286,7 +286,7 @@ namespace chaiscript
|
||||
std::shared_ptr<const dispatch::Dynamic_Proxy_Function> pf = std::dynamic_pointer_cast<const dispatch::Dynamic_Proxy_Function>(t_pf);
|
||||
if (pf)
|
||||
{
|
||||
return pf->get_guard();
|
||||
return bool(pf->get_guard());
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
|
@@ -156,7 +156,7 @@ namespace chaiscript
|
||||
{
|
||||
if (!ob.get_type_info().is_const())
|
||||
{
|
||||
return boost::const_pointer_cast<const Result>(boost::any_cast<std::shared_ptr<Result> >(ob.get()));
|
||||
return std::const_pointer_cast<const Result>(boost::any_cast<std::shared_ptr<Result> >(ob.get()));
|
||||
} else {
|
||||
return boost::any_cast<std::shared_ptr<const Result> >(ob.get());
|
||||
}
|
||||
|
@@ -323,7 +323,7 @@ namespace chaiscript
|
||||
template<typename T>
|
||||
Boxed_Value const_var_impl(const std::shared_ptr<T> &t)
|
||||
{
|
||||
return Boxed_Value( boost::const_pointer_cast<typename boost::add_const<T>::type>(t) );
|
||||
return Boxed_Value( std::const_pointer_cast<typename boost::add_const<T>::type>(t) );
|
||||
}
|
||||
|
||||
/// \brief Takes a boost::reference_wrapper value, adds const to the referenced type and returns an immutable Boxed_Value.
|
||||
|
@@ -102,7 +102,7 @@ namespace chaiscript
|
||||
|
||||
|
||||
/// \brief Struct that doubles as both a parser ast_node and an AST node.
|
||||
struct AST_Node : boost::enable_shared_from_this<AST_Node> {
|
||||
struct AST_Node : std::enable_shared_from_this<AST_Node> {
|
||||
public:
|
||||
const std::string text;
|
||||
const int identifier;
|
||||
|
@@ -18,7 +18,7 @@ bool has_parse_tree(const chaiscript::Const_Proxy_Function &t_pf)
|
||||
= std::dynamic_pointer_cast<const chaiscript::dispatch::Dynamic_Proxy_Function>(t_pf);
|
||||
if (pf)
|
||||
{
|
||||
return pf->get_parse_tree();
|
||||
return bool(pf->get_parse_tree());
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
|
Reference in New Issue
Block a user