diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2012-06-21 16:12:30 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2012-06-21 16:12:30 +0200 |
commit | 3f4a7a6b2a3b708ea69b980494f6e49eb0c02ebc (patch) | |
tree | 35fe390eebb3dbe7bd3b1af8c82fe19fe6e6925a /xsd/xsd.hxx | |
parent | 36867e7887a71986a8b717da4ac95d50326322ea (diff) |
Get rid of dependencies on libcult smart pointers
Diffstat (limited to 'xsd/xsd.hxx')
-rw-r--r-- | xsd/xsd.hxx | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/xsd/xsd.hxx b/xsd/xsd.hxx index 80d5894..1af00a0 100644 --- a/xsd/xsd.hxx +++ b/xsd/xsd.hxx @@ -6,15 +6,16 @@ #ifndef XSD_HXX #define XSD_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; // @@ -37,9 +38,7 @@ struct AutoUnlink ~AutoUnlink () { if (!canceled_) - { std::remove (file_.native_file_string ().c_str ()); - } } void @@ -60,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_; }; |