# Copyright 2009  Peter De Wachter <pdewacht@gmail.com>
# Distributed under the same license as the original software.
# See debian/copyright.

# Replace boost::shared_ptr with std::tr1::shared_ptr, so we no longer
# need to depend on boost.

--- a/src/bulletmlrunner.cpp
+++ b/src/bulletmlrunner.cpp
@@ -11,7 +11,7 @@
 		act.push_back(acts[i]);
 		BulletMLState* state =
 			new BulletMLState(bulletml, act,
-							  boost::shared_ptr<BulletMLParameter>());
+							  std::tr1::shared_ptr<BulletMLParameter>());
 		impl_.push_back(makeImpl(state));
 	}
 }
--- a/src/bulletmlrunner.h
+++ b/src/bulletmlrunner.h
@@ -11,7 +11,7 @@
 #include "bulletmlcommon.h"
 
 #include <vector>
-#include <boost/smart_ptr.hpp>
+#include <tr1/memory>
 
 class BulletMLParser;
 class BulletMLNode;
@@ -24,17 +24,17 @@
 public:
 	DECLSPEC BulletMLState(BulletMLParser* bulletml,
 						   const std::vector<BulletMLNode*>& node,
-						   boost::shared_ptr<BulletMLParameter> para)
+						   std::tr1::shared_ptr<BulletMLParameter> para)
 		: bulletml_(bulletml), node_(node.begin(), node.end()), para_(para) {}
 
 	DECLSPEC BulletMLParser* getBulletML() { return bulletml_; }
 	DECLSPEC const std::vector<BulletMLNode*>& getNode() const { return node_; }
-	DECLSPEC boost::shared_ptr<BulletMLParameter> getParameter() { return para_; }
+	DECLSPEC std::tr1::shared_ptr<BulletMLParameter> getParameter() { return para_; }
 
 private:
 	BulletMLParser* bulletml_;
 	std::vector<BulletMLNode*> node_;
-	boost::shared_ptr<BulletMLParameter> para_;
+	std::tr1::shared_ptr<BulletMLParameter> para_;
 
 };
 
--- a/src/bulletmlrunnerimpl.cpp
+++ b/src/bulletmlrunnerimpl.cpp
@@ -368,7 +368,7 @@
 }
 
 void BulletMLRunnerImpl::runFireRef() {
-	boost::shared_ptr<Parameters> prevPara = parameters_;
+	std::tr1::shared_ptr<Parameters> prevPara = parameters_;
 	parameters_.reset(getParameters());
 
 	refStack_.push(std::make_pair(act_, prevPara));
@@ -376,7 +376,7 @@
 }
 
 void BulletMLRunnerImpl::runActionRef() {
-	boost::shared_ptr<Parameters> prevPara = parameters_;
+	std::tr1::shared_ptr<Parameters> prevPara = parameters_;
 	parameters_.reset(getParameters());
 
 	refStack_.push(std::make_pair(act_, prevPara));
@@ -384,7 +384,7 @@
 }
 
 void BulletMLRunnerImpl::runBulletRef() {
-	boost::shared_ptr<Parameters> prevPara = parameters_;
+	std::tr1::shared_ptr<Parameters> prevPara = parameters_;
 	parameters_.reset(getParameters());
 
 	refStack_.push(std::make_pair(act_, prevPara));
--- a/src/bulletmlrunnerimpl.h
+++ b/src/bulletmlrunnerimpl.h
@@ -6,7 +6,7 @@
 #include <vector>
 #include <memory>
 #include <stack>
-#include <boost/smart_ptr.hpp>
+#include <tr1/memory>
 
 class BulletMLRunner;
 class BulletMLState;
@@ -149,7 +149,7 @@
     Validatable<double> spd_, dir_, prevSpd_, prevDir_;
 
     typedef BulletMLParameter Parameters;
-    boost::shared_ptr<Parameters> parameters_;
+    std::tr1::shared_ptr<Parameters> parameters_;
 
 protected:
     BulletMLParser* bulletml_;
@@ -171,7 +171,7 @@
     typedef std::stack<RepeatElem*> RepeatStack;
     RepeatStack repeatStack_;
     typedef std::stack<std::pair<BulletMLNode*,
-								 boost::shared_ptr<Parameters> > > RefStack;
+								 std::tr1::shared_ptr<Parameters> > > RefStack;
     RefStack refStack_;
 
     typedef void (BulletMLRunnerImpl::*Method)();
