Ignore:
Timestamp:
Feb 14, 2019, 11:14:50 AM (6 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
no_list
Children:
99614c2
Parents:
8d25360
Message:

Forall list now uses vector

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/SymTab/Validate.cc

    r8d25360 r80eefcb  
    808808
    809809        /// Fix up assertions - flattens assertion lists, removing all trait instances
    810         void forallFixer( std::list< TypeDecl * > & forall, BaseSyntaxNode * node ) {
     810        template<typename container_t>
     811        void forallFixer( container_t & forall, BaseSyntaxNode * node ) {
    811812                for ( TypeDecl * type : forall ) {
    812                         std::list< DeclarationWithType * > asserts;
    813                         asserts.splice( asserts.end(), type->assertions );
     813                        decltype(type->assertions) asserts;
     814                        std::swap(asserts, type->assertions );
    814815                        // expand trait instances into their members
    815816                        for ( DeclarationWithType * assertion : asserts ) {
Note: See TracChangeset for help on using the changeset viewer.