Clean up some loops with range-based for.

This commit is contained in:
Michael Hansen
2019-10-04 15:56:24 -07:00
parent 727da48ba5
commit 5c896fa743
6 changed files with 70 additions and 81 deletions

View File

@@ -10,8 +10,7 @@ void ASTNodeList::removeLast()
void ASTNodeList::removeFirst()
{
list_t::iterator it = m_nodes.begin();
m_nodes.erase(it);
m_nodes.erase(m_nodes.cbegin());
}
@@ -69,8 +68,7 @@ void ASTBlock::removeLast()
void ASTBlock::removeFirst()
{
list_t::iterator it = m_nodes.begin();
m_nodes.erase(it);
m_nodes.erase(m_nodes.begin());
}
const char* ASTBlock::type_str() const