Bakkes / CPPRP

Fast C++ Rocket League replay parser
Mozilla Public License 2.0
30 stars 9 forks source link

MSVC Compilation Issue (with fix) #15

Open davechurchill opened 1 year ago

davechurchill commented 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.

fixed line:

replayFile->tickables.push_back([&](const CPPRP::Frame f, const std::unordered_map<uint32_t, CPPRP::ActorStateData>& actorStats)