mirror of
https://github.com/isledecomp/isle.git
synced 2026-01-20 23:01: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) {
|
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;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user