From e2da56f19979a25cea8d884b6604dadac078e625 Mon Sep 17 00:00:00 2001 From: Jason Turner Date: Sat, 10 Sep 2011 07:24:46 -0600 Subject: [PATCH] Eliminate use of boost::shared_ptr --- include/chaiscript/dispatchkit/bootstrap.hpp | 4 ++-- include/chaiscript/dispatchkit/boxed_cast_helper.hpp | 2 +- include/chaiscript/dispatchkit/boxed_value.hpp | 2 +- include/chaiscript/language/chaiscript_common.hpp | 2 +- src/reflection.cpp | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/include/chaiscript/dispatchkit/bootstrap.hpp b/include/chaiscript/dispatchkit/bootstrap.hpp index 5427ac8..0129471 100644 --- a/include/chaiscript/dispatchkit/bootstrap.hpp +++ b/include/chaiscript/dispatchkit/bootstrap.hpp @@ -151,7 +151,7 @@ namespace chaiscript std::shared_ptr::type> shared_ptr_unconst_clone(const std::shared_ptr::type> &p) { - return boost::const_pointer_cast::type>(p); + return std::const_pointer_cast::type>(p); } @@ -286,7 +286,7 @@ namespace chaiscript std::shared_ptr pf = std::dynamic_pointer_cast(t_pf); if (pf) { - return pf->get_guard(); + return bool(pf->get_guard()); } else { return false; } diff --git a/include/chaiscript/dispatchkit/boxed_cast_helper.hpp b/include/chaiscript/dispatchkit/boxed_cast_helper.hpp index c6e8338..3a61862 100644 --- a/include/chaiscript/dispatchkit/boxed_cast_helper.hpp +++ b/include/chaiscript/dispatchkit/boxed_cast_helper.hpp @@ -156,7 +156,7 @@ namespace chaiscript { if (!ob.get_type_info().is_const()) { - return boost::const_pointer_cast(boost::any_cast >(ob.get())); + return std::const_pointer_cast(boost::any_cast >(ob.get())); } else { return boost::any_cast >(ob.get()); } diff --git a/include/chaiscript/dispatchkit/boxed_value.hpp b/include/chaiscript/dispatchkit/boxed_value.hpp index 6eb1eac..087ecf5 100644 --- a/include/chaiscript/dispatchkit/boxed_value.hpp +++ b/include/chaiscript/dispatchkit/boxed_value.hpp @@ -323,7 +323,7 @@ namespace chaiscript template Boxed_Value const_var_impl(const std::shared_ptr &t) { - return Boxed_Value( boost::const_pointer_cast::type>(t) ); + return Boxed_Value( std::const_pointer_cast::type>(t) ); } /// \brief Takes a boost::reference_wrapper value, adds const to the referenced type and returns an immutable Boxed_Value. diff --git a/include/chaiscript/language/chaiscript_common.hpp b/include/chaiscript/language/chaiscript_common.hpp index 40c4e8e..727c242 100644 --- a/include/chaiscript/language/chaiscript_common.hpp +++ b/include/chaiscript/language/chaiscript_common.hpp @@ -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 { + struct AST_Node : std::enable_shared_from_this { public: const std::string text; const int identifier; diff --git a/src/reflection.cpp b/src/reflection.cpp index d465787..d38c0b0 100644 --- a/src/reflection.cpp +++ b/src/reflection.cpp @@ -18,7 +18,7 @@ bool has_parse_tree(const chaiscript::Const_Proxy_Function &t_pf) = std::dynamic_pointer_cast(t_pf); if (pf) { - return pf->get_parse_tree(); + return bool(pf->get_parse_tree()); } else { return false; }