summaryrefslogtreecommitdiff
path: root/xsd/xsd.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'xsd/xsd.hxx')
-rw-r--r--xsd/xsd.hxx17
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_;
};