commit: cb0f51bc5186995d025ec5aa41c694366e38172a
parent b0c7dde79a5fb9c5d514ed54904de72137c9709a
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date: Fri, 22 Mar 2024 19:44:47 +0100
std::tr1::shared_ptr -> std::shared_ptr
Fixes compatibility with clang
Diffstat:
4 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/src/bulletmlrunner.cpp b/src/bulletmlrunner.cpp
@@ -11,7 +11,7 @@ BulletMLRunner::BulletMLRunner(BulletMLParser* bulletml) {
act.push_back(acts[i]);
BulletMLState* state =
new BulletMLState(bulletml, act,
- std::tr1::shared_ptr<BulletMLParameter>());
+ std::shared_ptr<BulletMLParameter>());
impl_.push_back(makeImpl(state));
}
}
diff --git a/src/bulletmlrunner.h b/src/bulletmlrunner.h
@@ -11,7 +11,7 @@
#include "bulletmlcommon.h"
#include <vector>
-#include <tr1/memory>
+#include <memory>
class BulletMLParser;
class BulletMLNode;
@@ -24,17 +24,17 @@ class BulletMLState {
public:
DECLSPEC BulletMLState(BulletMLParser* bulletml,
const std::vector<BulletMLNode*>& node,
- std::tr1::shared_ptr<BulletMLParameter> para)
+ std::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 std::tr1::shared_ptr<BulletMLParameter> getParameter() { return para_; }
+ DECLSPEC std::shared_ptr<BulletMLParameter> getParameter() { return para_; }
private:
BulletMLParser* bulletml_;
std::vector<BulletMLNode*> node_;
- std::tr1::shared_ptr<BulletMLParameter> para_;
+ std::shared_ptr<BulletMLParameter> para_;
};
diff --git a/src/bulletmlrunnerimpl.cpp b/src/bulletmlrunnerimpl.cpp
@@ -374,7 +374,7 @@ void BulletMLRunnerImpl::runRepeat() {
}
void BulletMLRunnerImpl::runFireRef() {
- std::tr1::shared_ptr<Parameters> prevPara = parameters_;
+ std::shared_ptr<Parameters> prevPara = parameters_;
parameters_.reset(getParameters());
refStack_.push(std::make_pair(act_, prevPara));
@@ -382,7 +382,7 @@ void BulletMLRunnerImpl::runFireRef() {
}
void BulletMLRunnerImpl::runActionRef() {
- std::tr1::shared_ptr<Parameters> prevPara = parameters_;
+ std::shared_ptr<Parameters> prevPara = parameters_;
parameters_.reset(getParameters());
refStack_.push(std::make_pair(act_, prevPara));
@@ -390,7 +390,7 @@ void BulletMLRunnerImpl::runActionRef() {
}
void BulletMLRunnerImpl::runBulletRef() {
- std::tr1::shared_ptr<Parameters> prevPara = parameters_;
+ std::shared_ptr<Parameters> prevPara = parameters_;
parameters_.reset(getParameters());
refStack_.push(std::make_pair(act_, prevPara));
diff --git a/src/bulletmlrunnerimpl.h b/src/bulletmlrunnerimpl.h
@@ -6,7 +6,7 @@
#include <vector>
#include <memory>
#include <stack>
-#include <tr1/memory>
+#include <memory>
class BulletMLRunner;
class BulletMLState;
@@ -149,7 +149,7 @@ protected:
Validatable<double> spd_, dir_, prevSpd_, prevDir_;
typedef BulletMLParameter Parameters;
- std::tr1::shared_ptr<Parameters> parameters_;
+ std::shared_ptr<Parameters> parameters_;
protected:
BulletMLParser* bulletml_;
@@ -171,7 +171,7 @@ protected:
typedef std::stack<RepeatElem*> RepeatStack;
RepeatStack repeatStack_;
typedef std::stack<std::pair<BulletMLNode*,
- std::tr1::shared_ptr<Parameters> > > RefStack;
+ std::shared_ptr<Parameters> > > RefStack;
RefStack refStack_;
typedef void (BulletMLRunnerImpl::*Method)();