Merge branch 'no-boost' of https://github.com/WagicProject/wagic into no-boost
This commit is contained in:
@@ -312,9 +312,6 @@ namespace boost
|
|||||||
#include <QMutex>
|
#include <QMutex>
|
||||||
#include <QThread>
|
#include <QThread>
|
||||||
|
|
||||||
#include <boost/bind.hpp>
|
|
||||||
#include <boost/shared_ptr.hpp>
|
|
||||||
|
|
||||||
#include "../include/JLogger.h"
|
#include "../include/JLogger.h"
|
||||||
|
|
||||||
namespace boost
|
namespace boost
|
||||||
@@ -420,23 +417,25 @@ namespace boost
|
|||||||
virtual void run() = 0;
|
virtual void run() = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef boost::shared_ptr<detail::thread_data_base> thread_data_ptr;
|
|
||||||
|
|
||||||
template<typename F>
|
typedef QSharedPointer<detail::thread_data_base> thread_data_ptr;
|
||||||
|
|
||||||
|
template<typename F, typename A1>
|
||||||
class thread_data : public detail::thread_data_base
|
class thread_data : public detail::thread_data_base
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
thread_data(F f_) : f(f_)
|
thread_data(F f_, A1 a1_) : f(f_), a1(a1_)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void run()
|
void run()
|
||||||
{
|
{
|
||||||
f();
|
f(a1);
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
F f;
|
F f;
|
||||||
|
A1 a1;
|
||||||
|
|
||||||
void operator=(thread_data&);
|
void operator=(thread_data&);
|
||||||
thread_data(thread_data&);
|
thread_data(thread_data&);
|
||||||
@@ -493,7 +492,7 @@ namespace boost
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <class F,class A1>
|
template <class F,class A1>
|
||||||
thread(F f, A1 a1) : mThreadInfo(make_thread_info(boost::bind(boost::type<void>(), f, a1)))
|
thread(F f, A1 a1) : mThreadInfo(make_thread_info(f, a1))
|
||||||
{
|
{
|
||||||
mpThread = new threadImpl(mThreadInfo);
|
mpThread = new threadImpl(mThreadInfo);
|
||||||
LOG("Calling start func");
|
LOG("Calling start func");
|
||||||
@@ -510,10 +509,10 @@ namespace boost
|
|||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
template<typename F>
|
template<typename F, typename A1>
|
||||||
static inline detail::thread_data_ptr make_thread_info(F f)
|
static inline detail::thread_data_ptr make_thread_info(F f, A1 a1)
|
||||||
{
|
{
|
||||||
return detail::thread_data_ptr(new detail::thread_data<F>(f));
|
return detail::thread_data_ptr(new detail::thread_data<F, A1>(f, a1));
|
||||||
}
|
}
|
||||||
|
|
||||||
detail::thread_data_ptr mThreadInfo;
|
detail::thread_data_ptr mThreadInfo;
|
||||||
|
|||||||
@@ -1,8 +1,6 @@
|
|||||||
#ifndef OBJECTANALYTICS_H
|
#ifndef OBJECTANALYTICS_H
|
||||||
#define OBJECTANALYTICS_H
|
#define OBJECTANALYTICS_H
|
||||||
|
|
||||||
#include <boost/cstdint.hpp>
|
|
||||||
|
|
||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
#define TRACK_OBJECT_USAGE
|
#define TRACK_OBJECT_USAGE
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -21,8 +21,9 @@
|
|||||||
|
|
||||||
#include "GameOptions.h"
|
#include "GameOptions.h"
|
||||||
|
|
||||||
#ifndef WP8
|
#if !defined(WP8) && !defined(QT_CONFIG)
|
||||||
#include <boost/shared_ptr.hpp>
|
#include <boost/shared_ptr.hpp>
|
||||||
|
#include <boost/scoped_ptr.hpp>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined (WP8) || defined (IOS) || defined (ANDROID) || defined (QT_CONFIG) || defined (SDL_CONFIG)
|
#if defined (WP8) || defined (IOS) || defined (ANDROID) || defined (QT_CONFIG) || defined (SDL_CONFIG)
|
||||||
|
|||||||
@@ -4,6 +4,15 @@
|
|||||||
#if (__cplusplus > 199711L)
|
#if (__cplusplus > 199711L)
|
||||||
#include <memory>
|
#include <memory>
|
||||||
typedef std::shared_ptr<JQuad> JQuadPtr;
|
typedef std::shared_ptr<JQuad> JQuadPtr;
|
||||||
|
#elif defined(QT_CONFIG)
|
||||||
|
#include <QSharedPointer>
|
||||||
|
class JQuadPtr : public QSharedPointer<JQuad>
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
JQuadPtr() : QSharedPointer(){};
|
||||||
|
JQuadPtr(JQuad*ptr) : QSharedPointer(ptr){};
|
||||||
|
JQuad* get() const {return data();};
|
||||||
|
};
|
||||||
#else
|
#else
|
||||||
#include <boost/shared_ptr.hpp>
|
#include <boost/shared_ptr.hpp>
|
||||||
typedef boost::shared_ptr<JQuad> JQuadPtr;
|
typedef boost::shared_ptr<JQuad> JQuadPtr;
|
||||||
|
|||||||
@@ -7,7 +7,21 @@
|
|||||||
#include "Player.h"
|
#include "Player.h"
|
||||||
#include "Counters.h"
|
#include "Counters.h"
|
||||||
#include "AllAbilities.h"
|
#include "AllAbilities.h"
|
||||||
|
|
||||||
|
#if !defined(QT_CONFIG)
|
||||||
#include <boost/scoped_ptr.hpp>
|
#include <boost/scoped_ptr.hpp>
|
||||||
|
typedef boost::scoped_ptr<ManaCost> ManaCostPtr;
|
||||||
|
#else
|
||||||
|
#include <QScopedPointer>
|
||||||
|
class ManaCostPtr : public QScopedPointer<ManaCost>
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
ManaCostPtr(ManaCost*m) : QScopedPointer(m){
|
||||||
|
};
|
||||||
|
ManaCost* get() const {return data();};
|
||||||
|
|
||||||
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
SUPPORT_OBJECT_ANALYTICS(ExtraCost)
|
SUPPORT_OBJECT_ANALYTICS(ExtraCost)
|
||||||
|
|
||||||
@@ -209,7 +223,7 @@ LifeorManaCost::LifeorManaCost(TargetChooser *_tc, string manaType)
|
|||||||
string buildType ="{";
|
string buildType ="{";
|
||||||
buildType.append(manaType);
|
buildType.append(manaType);
|
||||||
buildType.append("}");
|
buildType.append("}");
|
||||||
boost::scoped_ptr<ManaCost> cost(ManaCost::parseManaCost(buildType));
|
ManaCostPtr cost(ManaCost::parseManaCost(buildType));
|
||||||
manaCost.copy(cost.get());
|
manaCost.copy(cost.get());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -11,6 +11,8 @@
|
|||||||
#endif
|
#endif
|
||||||
#include "WFont.h"
|
#include "WFont.h"
|
||||||
|
|
||||||
|
#include <typeinfo>
|
||||||
|
|
||||||
#ifdef FORCE_LOW_CACHE_MEMORY
|
#ifdef FORCE_LOW_CACHE_MEMORY
|
||||||
//#define FORCE_LOW_CACHE_MEMORY
|
//#define FORCE_LOW_CACHE_MEMORY
|
||||||
const unsigned int kConstrainedCacheLimit = 8 * 1024 * 1024;
|
const unsigned int kConstrainedCacheLimit = 8 * 1024 * 1024;
|
||||||
|
|||||||
@@ -39,7 +39,6 @@ windows{
|
|||||||
macx:INCLUDEPATH += /opt/include
|
macx:INCLUDEPATH += /opt/include
|
||||||
INCLUDEPATH += ../../JGE/include
|
INCLUDEPATH += ../../JGE/include
|
||||||
INCLUDEPATH += ../../JGE/src/zipFS
|
INCLUDEPATH += ../../JGE/src/zipFS
|
||||||
INCLUDEPATH += ../../Boost
|
|
||||||
INCLUDEPATH += include
|
INCLUDEPATH += include
|
||||||
|
|
||||||
unix:!symbian:LIBS += -lz
|
unix:!symbian:LIBS += -lz
|
||||||
|
|||||||
Reference in New Issue
Block a user