- size_t n, nEntries = m_aEntries.GetCount();
- wxFileConfigLineList *pl;
- for ( pl = pLine->Prev(); pl != m_pLine; pl = pl->Prev() ) {
- // is it our subgroup?
- for ( n = 0; (pNewLast == NULL) && (n < nEntries); n++ ) {
- if ( m_aEntries[n]->GetLine() == m_pLine )
- pNewLast = m_aEntries[n];
- }
-
- if ( pNewLast != NULL ) // found?
+ const wxFileConfigLineList * const
+ pNewLastLine = m_pLastEntry->GetLine()->Prev();
+ const size_t nEntries = m_aEntries.GetCount();
+ for ( size_t n = 0; n < nEntries; n++ ) {
+ if ( m_aEntries[n]->GetLine() == pNewLastLine ) {
+ pNewLast = m_aEntries[n];