Changeset View
Standalone View
source/simulation2/system/TurnManager.h
Show All 18 Lines | |||||
#define INCLUDED_TURNMANAGER | #define INCLUDED_TURNMANAGER | ||||
#include "ps/CStr.h" | #include "ps/CStr.h" | ||||
#include "simulation2/helpers/SimulationCommand.h" | #include "simulation2/helpers/SimulationCommand.h" | ||||
#include <list> | #include <list> | ||||
#include <map> | #include <map> | ||||
#include <vector> | #include <vector> | ||||
#include <deque> | |||||
Itms: unneeded anymore | |||||
Done Inline ActionsI seem to get the following error when I remove this include: ==== Building rlinterface (release) ==== RLInterface.cpp In file included from ../../../source/rlinterface/RLInterface.h:30, from ../../../source/rlinterface/RLInterface.cpp:17: ../../../source/simulation2/system/TurnManager.h:173:7: error: ‘deque’ in namespace ‘std’ does not name a template type 173 | std::deque<std::map<u32, std::vector<SimulationCommand>>> m_QueuedCommands; | ^~~~~ ../../../source/simulation2/system/TurnManager.h:22:1: note: ‘std::deque’ is defined in header ‘<deque>’; did you forget to ‘#include <deque>’? 21 | #include "ps/CStr.h" +++ |+#include <deque> 22 | #include "simulation2/helpers/SimulationCommand.h" make[1]: *** [rlinterface.make:129: obj/rlinterface_Release/RLInterface.o] Error 1 make: *** [Makefile:83: rlinterface] Error 2 Am I missing something? irishninja: I seem to get the following error when I remove this include:
```
==== Building rlinterface… | |||||
Not Done Inline ActionsAh it looks like deque can be declared without the header, but not used. You can either move this include to RLInterface.cpp, or you can leave it here but in this case there will be an unneeded include in TurnManager.cpp, that you could remove. I would favor moving the include to your own code, that way, this commit touches one file less. Itms: Ah it looks like deque can be declared without the header, but not used. You can either move… | |||||
Done Inline ActionsIt actually looks like there is no include in the cpp file. It seems to me like it would be better to have it in the TurnManager.h since it would be more clear why it is included rather than including it in RLInterface because TurnManager requires it. That said, I am happy to defer to whatever you prefer! irishninja: It actually looks like there is no include in the cpp file. It seems to me like it would be… | |||||
Done Inline ActionsThere must be a couple of includes somewhere else. Then it's probably better to include it in the main header like you did, I agree ? Itms: There must be a couple of includes somewhere else. Then it's probably better to include it in… | |||||
class CSimulationMessage; | class CSimulationMessage; | ||||
class CSimulation2; | class CSimulation2; | ||||
class IReplayLogger; | class IReplayLogger; | ||||
extern const u32 DEFAULT_TURN_LENGTH_SP; | extern const u32 DEFAULT_TURN_LENGTH_SP; | ||||
extern const u32 DEFAULT_TURN_LENGTH_MP; | extern const u32 DEFAULT_TURN_LENGTH_MP; | ||||
▲ Show 20 Lines • Show All 164 Lines • Show Last 20 Lines |
unneeded anymore