1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-24 22:14:36 +02:00

Singleton implementation fix

This commit is contained in:
Dydzio 2018-07-21 15:42:17 +02:00
parent 82da82fbeb
commit 08a66abdcc
2 changed files with 1 additions and 1 deletions

View File

@ -6,6 +6,7 @@
MapObjectsEvaluator & MapObjectsEvaluator::getInstance()
{
static std::unique_ptr<MapObjectsEvaluator> singletonInstance;
if(singletonInstance == nullptr)
singletonInstance.reset(new MapObjectsEvaluator());

View File

@ -37,7 +37,6 @@ class MapObjectsEvaluator
{
private:
std::map<AiMapObjectID, int> objectDatabase; //value for each object type
static std::unique_ptr<MapObjectsEvaluator> singletonInstance;
public:
MapObjectsEvaluator();