From d43a124997063cb51ae751c92e64d84232744156 Mon Sep 17 00:00:00 2001 From: Drew Williams Date: Sat, 25 Nov 2023 19:55:31 -0500 Subject: [PATCH] changed to use iterator position --- .../src/main/native/include/photon/simulation/VisionSystemSim.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/photon-lib/src/main/native/include/photon/simulation/VisionSystemSim.h b/photon-lib/src/main/native/include/photon/simulation/VisionSystemSim.h index 0cffb3481c..d52e286c3b 100644 --- a/photon-lib/src/main/native/include/photon/simulation/VisionSystemSim.h +++ b/photon-lib/src/main/native/include/photon/simulation/VisionSystemSim.h @@ -186,7 +186,7 @@ class VisionSystemSim { auto it = std::find(targets.begin(), targets.end(), target); if (it != targets.end()) { removedList.emplace_back(target); - entry.second.erase(target); + entry.second.erase(it); } } }