Mark List::append/insert deprecated in favor of push_back/push_front for consistency with Queue

This commit is contained in:
Tim Wojtulewicz 2019-07-19 14:53:01 -07:00 committed by Jon Siwek
parent d2d5043bf0
commit 6144f459e1
39 changed files with 221 additions and 211 deletions

View file

@ -54,7 +54,7 @@ NFA_State::~NFA_State()
void NFA_State::AddXtionsTo(NFA_state_list* ns)
{
for ( int i = 0; i < xtions.length(); ++i )
ns->append(xtions[i]);
ns->push_back(xtions[i]);
}
NFA_State* NFA_State::DeepCopy()
@ -92,7 +92,7 @@ NFA_state_list* NFA_State::EpsilonClosure()
epsclosure = new NFA_state_list;
NFA_state_list states;
states.append(this);
states.push_back(this);
SetMark(this);
int i;
@ -107,18 +107,18 @@ NFA_state_list* NFA_State::EpsilonClosure()
NFA_State* nxt = (*x)[j];
if ( ! nxt->Mark() )
{
states.append(nxt);
states.push_back(nxt);
nxt->SetMark(nxt);
}
}
if ( ns->Accept() != NO_ACCEPT )
epsclosure->append(ns);
epsclosure->push_back(ns);
}
else
// Non-epsilon transition - keep it.
epsclosure->append(ns);
epsclosure->push_back(ns);
}
// Clear out markers.
@ -344,7 +344,7 @@ NFA_state_list* epsilon_closure(NFA_state_list* states)
if ( ! closuremap.Contains(ns->ID()) )
{
closuremap.Insert(ns->ID());
closure->append(ns);
closure->push_back(ns);
}
}
}