This commit is contained in:
jonschz 2025-07-13 10:02:22 +02:00
parent 9f4439ef8f
commit 364ed55536

View File

@ -116,7 +116,6 @@ void Act3List::Insert(MxS32 p_objectId, InsertMode p_option)
} }
switch (p_option) { switch (p_option) {
// TODO: Consider using an enum
case InsertMode::e_replaceAction: case InsertMode::e_replaceAction:
if (!empty()) { if (!empty()) {
DeleteActionWrapper(); DeleteActionWrapper();
@ -197,10 +196,10 @@ void Act3List::RemoveByObjectIdOrFirst(MxU32 p_objectId)
} }
else { else {
for (it = begin(); it != end(); it++) { for (it = begin(); it != end(); it++) {
Act3ListElement& current = *it; // Removing this variable decreases the match, but replacing `*it` by `unused` below also does.
// No idea why `current` is used in one comparison but not the other, Act3ListElement& unused = *it;
// but this is what produces the best match.
if (current.m_hasStarted && (*it).m_objectId == p_objectId) { if ((*it).m_hasStarted && (*it).m_objectId == p_objectId) {
erase(it); erase(it);
removed = TRUE; removed = TRUE;
break; break;