Changeset 230 for trunk/lib


Ignore:
Timestamp:
Mar 25, 2007, 11:18:46 PM (14 years ago)
Author:
Peter Johansson
Message:

copyright: added warning when missing alias

Location:
trunk/lib
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/Directory.cc

    r226 r230  
    227227  (const std::vector<std::string>& dates,
    228228   const std::vector<std::string>& authors,
    229    const std::map<std::string, std::string>& alias) const
     229   std::map<std::string, std::string>& alias) const
    230230  {
    231231    if (!ignore()){
  • trunk/lib/Directory.h

    r226 r230  
    8282    void print_copyright(const std::vector<std::string>& dates,
    8383                         const std::vector<std::string>& author,
    84                          const std::map<std::string, std::string>&) const;
     84                         std::map<std::string, std::string>&) const;
    8585
    8686  private:
  • trunk/lib/File.cc

    r228 r230  
    157157  (const std::vector<std::string>& dates,
    158158   const std::vector<std::string>& authors,
    159    const std::map<std::string, std::string>& alias) const
     159   std::map<std::string, std::string>& alias) const
    160160  {
    161161    if (ignore())
     
    178178      if (name != alias.end() )
    179179        copyright[timeinfo->tm_year].insert(name->second);
    180       else
     180      else {
    181181        // else insert user name
    182182        copyright[timeinfo->tm_year].insert(authors[*i]);
     183        std::cerr << "Warning: no alias found for `" << authors[*i] << "`\n";
     184        // insert alias to avoid multiple warnings.
     185        alias[authors[*i]] = authors[*i];
     186      }
    183187    }
    184188   
  • trunk/lib/File.h

    r226 r230  
    7373    void print_copyright(const std::vector<std::string>& dates,
    7474                         const std::vector<std::string>& author,
    75                          const std::map<std::string, std::string>&) const;
     75                         std::map<std::string, std::string>&) const;
    7676
    7777  private:
  • trunk/lib/Node.h

    r226 r230  
    145145    print_copyright(const std::vector<std::string>& dates,
    146146                    const std::vector<std::string>& author,
    147                     const std::map<std::string, std::string>&) const=0;
     147                    std::map<std::string, std::string>&) const=0;
    148148
    149149    /**
Note: See TracChangeset for help on using the changeset viewer.