mirror of
https://github.com/isledecomp/isle.git
synced 2026-01-11 18:51:16 +00:00
Cleanup
This commit is contained in:
parent
9f4439ef8f
commit
364ed55536
@ -116,7 +116,6 @@ void Act3List::Insert(MxS32 p_objectId, InsertMode p_option)
|
||||
}
|
||||
|
||||
switch (p_option) {
|
||||
// TODO: Consider using an enum
|
||||
case InsertMode::e_replaceAction:
|
||||
if (!empty()) {
|
||||
DeleteActionWrapper();
|
||||
@ -197,10 +196,10 @@ void Act3List::RemoveByObjectIdOrFirst(MxU32 p_objectId)
|
||||
}
|
||||
else {
|
||||
for (it = begin(); it != end(); it++) {
|
||||
Act3ListElement& current = *it;
|
||||
// No idea why `current` is used in one comparison but not the other,
|
||||
// but this is what produces the best match.
|
||||
if (current.m_hasStarted && (*it).m_objectId == p_objectId) {
|
||||
// Removing this variable decreases the match, but replacing `*it` by `unused` below also does.
|
||||
Act3ListElement& unused = *it;
|
||||
|
||||
if ((*it).m_hasStarted && (*it).m_objectId == p_objectId) {
|
||||
erase(it);
|
||||
removed = TRUE;
|
||||
break;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user