diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2012-06-21 16:11:47 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2012-06-21 16:11:47 +0200 |
commit | b2efa0d81f7e28017789082138cb547e6bea4028 (patch) | |
tree | d2a5c849c386d8781532a145cc789a452d206c28 | |
parent | c34158508eafb020fbb7bbb7c0b2479982c426cd (diff) |
Get rid of dependencies on libcult smart pointers
-rw-r--r-- | xsde/xsde.hxx | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/xsde/xsde.hxx b/xsde/xsde.hxx index 53e4d1a..efc4c06 100644 --- a/xsde/xsde.hxx +++ b/xsde/xsde.hxx @@ -6,14 +6,16 @@ #ifndef XSDE_HXX #define XSDE_HXX +#include <cstdio> // std::remove + +#include <cutl/shared-ptr.hxx> + #include <xsd-frontend/semantic-graph/elements.hxx> // Path #include <cult/types.hxx> #include <cult/containers/set.hxx> #include <cult/containers/vector.hxx> -#include <cstdio> // std::remove - using namespace Cult::Types; // @@ -36,9 +38,7 @@ struct AutoUnlink ~AutoUnlink () { if (!canceled_) - { std::remove (file_.native_file_string ().c_str ()); - } } void @@ -59,20 +59,20 @@ struct AutoUnlinks Void add (XSDFrontend::SemanticGraph::Path const& file) { - unlinks_.push_back (Evptr<AutoUnlink> (new AutoUnlink (file))); + unlinks_.push_back( + cutl::shared_ptr<AutoUnlink> ( + new (shared) AutoUnlink (file))); } Void cancel () { for (Unlinks::Iterator i (unlinks_.begin ()); i != unlinks_.end (); ++i) - { (*i)->cancel (); - } } private: - typedef Cult::Containers::Vector<Evptr<AutoUnlink> > Unlinks; + typedef Cult::Containers::Vector<cutl::shared_ptr<AutoUnlink> > Unlinks; Unlinks unlinks_; }; |