Changes in src/SymTab/AddVisit.h [620cb95:145f1fc]
- File:
-
- 1 edited
-
src/SymTab/AddVisit.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/SymTab/AddVisit.h
r620cb95 r145f1fc 5 5 // file "LICENCE" distributed with Cforall. 6 6 // 7 // AddVisit.h -- 7 // AddVisit.h -- 8 8 // 9 9 // Author : Richard C. Bilson … … 85 85 maybeAccept( cathStmt->get_decl(), visitor ); 86 86 } 87 88 template< typename Visitor >89 void acceptAndAdd( std::list< Declaration * > &translationUnit, Visitor &visitor, bool addBefore ) {90 std::list< Declaration * >::iterator i = translationUnit.begin();91 while ( i != translationUnit.end() ) {92 (*i)->accept( visitor );93 std::list< Declaration * >::iterator next = i;94 next++;95 if ( ! visitor.get_declsToAdd().empty() ) {96 translationUnit.splice( addBefore ? i : next, visitor.get_declsToAdd() );97 } // if98 i = next;99 } // while100 }101 87 } // namespace SymTab 102 88
Note:
See TracChangeset
for help on using the changeset viewer.