Changeset 632 in dev for trunk/ab5.0/abdev/ab_common/src/Lexical/TypeDef.cpp
- Timestamp:
- Jun 5, 2008, 10:04:39 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ab5.0/abdev/ab_common/src/Lexical/TypeDef.cpp
r603 r632 17 17 } 18 18 19 int TypeDefCollection::GetIndex( const Symbol &symbol ) const{ 20 int max = (int)(*this).size(); 21 for( int i=0; i<max; i++ ){ 22 if( (*this)[i].IsEqualSymbol( symbol ) ){ 23 return i; 19 const TypeDef *TypeDefCollection::Find( const Symbol &symbol ) const 20 { 21 const TypeDefCollection &typeDefs = *this; 22 BOOST_FOREACH( const TypeDef &typeDef, typeDefs ) 23 { 24 if( typeDef.IsEqualSymbol( symbol ) ) 25 { 26 return &typeDef; 24 27 } 25 28 } 26 return -1;29 return NULL; 27 30 }
Note:
See TracChangeset
for help on using the changeset viewer.