-
Notifications
You must be signed in to change notification settings - Fork 76
Closed
Labels
Description
I'm using a manager to store my game maps. The code is similar to this.
//_maps is an std::map. name is a string
tmx::Map _map
MapManager::_maps[name] = _map;Fails because of operator deleted. So I got rid of that code and am directly storing maps in my game controller. However, I cannot keep loading the map each cycle as that is cpu intensive. I therefore tried to place the maps as private values in the controller but I get this error.
[5/9038]
./include/playing.h:14:18: note: copy constructor of 'PlayController' is implicitly deleted because field '_outerWorld' has a deleted
copy constructor
tmx::Map _outerWorld;
./include/tmxlite/Map.hpp:96:9: note: 'Map' has been explicitly marked deleted here
Map(const Map&) = delete;
How can I get around this? I tried deleting the Map code but it leads to even more errors. Note std::map insert does not work for some reason