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:
parent
82da82fbeb
commit
08a66abdcc
@ -6,6 +6,7 @@
|
||||
|
||||
MapObjectsEvaluator & MapObjectsEvaluator::getInstance()
|
||||
{
|
||||
static std::unique_ptr<MapObjectsEvaluator> singletonInstance;
|
||||
if(singletonInstance == nullptr)
|
||||
singletonInstance.reset(new MapObjectsEvaluator());
|
||||
|
||||
|
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user