Changeset 43e0949 for src/SymTab


Ignore:
Timestamp:
Feb 19, 2019, 1:19:47 PM (7 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
no_list
Children:
2f42718
Parents:
99614c2
Message:

more lists converted to vectors

Location:
src/SymTab
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/SymTab/Indexer.cc

    r99614c2 r43e0949  
    102102        }
    103103
    104         void Indexer::removeSpecialOverrides( const std::string &id, std::list< IdData > & out ) const {
     104        void Indexer::removeSpecialOverrides( const std::string &id, std::vector< IdData > & out ) const {
    105105                // only need to perform this step for constructors, destructors, and assignment functions
    106106                if ( ! CodeGen::isCtorDtorAssign( id ) ) return;
     
    116116                        bool existsUserDefinedCopyFunc = false;    // user-defined copy ctor found
    117117                        BaseSyntaxNode * deleteStmt = nullptr;     // non-null if a user-defined function is found
    118                         std::list< DeclBall > decls;
     118                        std::vector< DeclBall > decls;
    119119
    120120                        // another FunctionDecl for the current type was found - determine
     
    135135                }; // ValueType
    136136
    137                 std::list< IdData > copy;
    138                 copy.splice( copy.end(), out );
     137                std::vector< IdData > copy;
     138                swap( copy, out );
    139139
    140140                // organize discovered declarations by type
     
    231231        }
    232232
    233         void Indexer::lookupId( const std::string &id, std::list< IdData > &out ) const {
     233        void Indexer::lookupId( const std::string &id, std::vector< IdData > &out ) const {
    234234                std::unordered_set< std::string > foundMangleNames;
    235235
  • src/SymTab/Indexer.h

    r99614c2 r43e0949  
    6060
    6161                /// Gets all declarations with the given ID
    62                 void lookupId( const std::string &id, std::list< IdData > &out ) const;
     62                void lookupId( const std::string &id, std::vector< IdData > &out ) const;
    6363                /// Gets the top-most type declaration with the given ID
    6464                NamedTypeDecl *lookupType( const std::string &id ) const;
     
    140140                // so that they will not be selected
    141141                // void removeSpecialOverrides( FunctionDecl *decl );
    142                 void removeSpecialOverrides( const std::string &id, std::list< IdData > & out ) const;
     142                void removeSpecialOverrides( const std::string &id, std::vector< IdData > & out ) const;
    143143
    144144                /// Ensures that tables variable is writable (i.e. allocated, uniquely owned by this Indexer, and at the current scope)
Note: See TracChangeset for help on using the changeset viewer.