aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPetteri Räty <petsku@petteriraty.eu>2012-06-11 00:39:18 +0300
committerPetteri Räty <petsku@petteriraty.eu>2012-07-08 12:41:25 +0300
commit29b377c53e8b0785400167d6dc62f29667f046ab (patch)
treec2b3c18e3ee0a0b91465477092e97c9b332035ed
parentParser&Walker: Support for loop without list (diff)
downloadlibbash-29b377c53e8b0785400167d6dc62f29667f046ab.tar.gz
libbash-29b377c53e8b0785400167d6dc62f29667f046ab.tar.bz2
libbash-29b377c53e8b0785400167d6dc62f29667f046ab.zip
Replace boost::scoped_ptr with std::unique_ptr
const std::unique_ptr provides everything that boost::scoped_ptr does so no need to rely on it.
-rw-r--r--src/cppbash_builtin.cpp2
-rw-r--r--src/cppbash_builtin.h3
2 files changed, 2 insertions, 3 deletions
diff --git a/src/cppbash_builtin.cpp b/src/cppbash_builtin.cpp
index 51cd15c..7c9cb84 100644
--- a/src/cppbash_builtin.cpp
+++ b/src/cppbash_builtin.cpp
@@ -57,7 +57,7 @@ cppbash_builtin::cppbash_builtin(BUILTIN_ARGS): _out_stream(&out), _err_stream(&
}
cppbash_builtin::builtins_type& cppbash_builtin::builtins() {
- static boost::scoped_ptr<builtins_type> p(new builtins_type {
+ static const std::unique_ptr<builtins_type> p(new builtins_type {
{"break", boost::factory<break_builtin*>()},
{"continue", boost::factory<continue_builtin*>()},
{"echo", boost::factory<echo_builtin*>()},
diff --git a/src/cppbash_builtin.h b/src/cppbash_builtin.h
index 5b27fad..c6feb65 100644
--- a/src/cppbash_builtin.h
+++ b/src/cppbash_builtin.h
@@ -31,7 +31,6 @@
#include <boost/functional/factory.hpp>
#include <boost/function.hpp>
-#include <boost/scoped_ptr.hpp>
#include <boost/utility.hpp>
/// shortcut for the arguments of the constructor
@@ -89,7 +88,7 @@ class cppbash_builtin: public boost::noncopyable
const std::vector<std::string>& args,
BUILTIN_ARGS)
{
- boost::scoped_ptr<cppbash_builtin> p(builtins()[builtin](out,err,in,walker));
+ const std::unique_ptr<cppbash_builtin> p(builtins()[builtin](out,err,in,walker));
return p->exec(args);
}