Open davechurchill opened 1 year ago
I learned how to iterate through the actorStats via this line of code: https://github.com/Bakkes/CPPRP/blob/master/CPPRPBM/CPPBM.cpp#L167
replayFile->tickables.push_back([&](const CPPRP::Frame f, const std::unordered_map<int, CPPRP::ActorStateData>& actorStats)
However when I tried to compile this in VS 2022, I got an error. I looked into it, and the typedef for tickable uses decltype(ActorStateData::actorId), which is a uint32_t. When I changed the int key of the map above to uint32_t it worked fine.
decltype(ActorStateData::actorId)
uint32_t
int
fixed line:
replayFile->tickables.push_back([&](const CPPRP::Frame f, const std::unordered_map<uint32_t, CPPRP::ActorStateData>& actorStats)
I learned how to iterate through the actorStats via this line of code: https://github.com/Bakkes/CPPRP/blob/master/CPPRPBM/CPPBM.cpp#L167
replayFile->tickables.push_back([&](const CPPRP::Frame f, const std::unordered_map<int, CPPRP::ActorStateData>& actorStats)
However when I tried to compile this in VS 2022, I got an error. I looked into it, and the typedef for tickable uses
decltype(ActorStateData::actorId)
, which is auint32_t
. When I changed theint
key of the map above touint32_t
it worked fine.fixed line:
replayFile->tickables.push_back([&](const CPPRP::Frame f, const std::unordered_map<uint32_t, CPPRP::ActorStateData>& actorStats)