Changeset 82:ef501464f31c in rrlib_design_patterns


Ignore:
Timestamp:
06.02.2021 21:13:33 (17 months ago)
Author:
Max Reichardt <mreichardt@…>
Branch:
17.03
Phase:
public
Message:

Fixes compiler warnings that appear with additional non-default warning options enabled

Location:
factory
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • factory/tCloneFactory.h

    r67 r82  
    8181  tTypeInfoWrapper(const TAbstractProduct &type) : type(typeid(type)) {} 
    8282  tTypeInfoWrapper(const TAbstractProduct *type) : type(typeid(*type)) {} 
    83   const bool operator < (const tTypeInfoWrapper &other) const 
     83  bool operator < (const tTypeInfoWrapper &other) const 
    8484  { 
    8585    return other.type.before(this->type); 
     
    112112 
    113113  template <typename TProduct> 
    114   const bool Register(const tIdentifier &id) 
     114  bool Register(const tIdentifier &id) 
    115115  { 
    116116    return this->Register(id, &factory::DefaultCopyCloner<TProduct>); 
  • factory/tFactory.h

    r79 r82  
    8686  {}; 
    8787 
    88   const bool Register(const TIdentifier &id, const TProductCreator &product_creator) 
     88  bool Register(const TIdentifier &id, const TProductCreator &product_creator) 
    8989  { 
    9090    return this->id_to_creator_map.insert(std::make_pair(id, product_creator)).second; 
     
    9292 
    9393  template <typename TProduct> 
    94   const bool Register(const TIdentifier &id) 
     94  bool Register(const TIdentifier &id) 
    9595  { 
    9696    return this->Register(id, factory::DefaultNewCreator<TProduct>()); 
    9797  } 
    9898 
    99   const bool Unregister(const TIdentifier &id) 
     99  bool Unregister(const TIdentifier &id) 
    100100  { 
    101101    return this->id_to_creator_map.erase(id) == 1; 
Note: See TracChangeset for help on using the changeset viewer.