bool ASE::RemoveRuleValue ( const char* szKey ) { list < CASERule* > ::iterator iter = m_Rules.begin (); for ( ; iter != m_Rules.end () ; iter++ ) { CASERule* pRule = *iter; if ( strcmp ( pRule->GetKey (), szKey ) == 0 ) { delete pRule; m_Rules.erase ( iter ); return true; } } return false; }
bool ASE::RemoveRuleValue ( const char* szKey ) { // Limit szKey length SString strKeyTemp; if ( szKey && strlen ( szKey ) > MAX_RULE_KEY_LENGTH ) { strKeyTemp = SStringX ( szKey ).Left ( MAX_RULE_KEY_LENGTH ); szKey = *strKeyTemp; } list < CASERule* > ::iterator iter = m_Rules.begin (); for ( ; iter != m_Rules.end () ; iter++ ) { CASERule* pRule = *iter; if ( strcmp ( pRule->GetKey (), szKey ) == 0 ) { delete pRule; m_Rules.erase ( iter ); return true; } } return false; }