Removed dependency on boost when Qt is used.

This commit is contained in:
xawotihs
2015-09-24 23:20:52 +02:00
parent b4e0f2c991
commit b8b5362ba5
7 changed files with 38 additions and 16 deletions

View File

@@ -7,7 +7,21 @@
#include "Player.h"
#include "Counters.h"
#include "AllAbilities.h"
#if !defined(QT_CONFIG)
#include <boost/scoped_ptr.hpp>
typedef ManaCostPtr boost::scoped_ptr<ManaCost>
#else
#include <QScopedPointer>
class ManaCostPtr : public QScopedPointer<ManaCost>
{
public:
ManaCostPtr(ManaCost*m) : QScopedPointer(m){
};
ManaCost* get() const {return data();};
};
#endif
SUPPORT_OBJECT_ANALYTICS(ExtraCost)
@@ -209,7 +223,7 @@ LifeorManaCost::LifeorManaCost(TargetChooser *_tc, string manaType)
string buildType ="{";
buildType.append(manaType);
buildType.append("}");
boost::scoped_ptr<ManaCost> cost(ManaCost::parseManaCost(buildType));
ManaCostPtr cost(ManaCost::parseManaCost(buildType));
manaCost.copy(cost.get());
}