Ignore:
Timestamp:
03/22/18 10:43:20 (6 years ago)
Author:
yushan
Message:

branch_openmp merged with XIOS_DEV_CMIP6@1459

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/dev/branch_openmp/src/attribute_array_impl.hpp

    r1112 r1460  
    104104 
    105105    template <typename T_numtype, int N_rank> 
    106     bool CAttributeArray<T_numtype,N_rank>::isEqual(const CAttributeArray& attr) 
     106    bool CAttributeArray<T_numtype,N_rank>::isEqual(const CAttribute& attr) 
    107107    { 
    108       return ((dynamic_cast<CArray<T_numtype,N_rank>& >(*this)) == (dynamic_cast<const CArray<T_numtype,N_rank>& >(attr)));       
     108      const CAttributeArray<T_numtype,N_rank>& tmp = dynamic_cast<const CAttributeArray<T_numtype,N_rank>& >(attr); 
     109      return this->isEqual_(tmp);       
    109110    } 
    110111 
    111112    template <typename T_numtype, int N_rank> 
    112     bool CAttributeArray<T_numtype,N_rank>::isEqual(const CAttribute& attr) 
     113    bool CAttributeArray<T_numtype,N_rank>::isEqual_(const CAttributeArray& attr) 
    113114    { 
    114       return ((*this) == (dynamic_cast<const CAttributeArray<T_numtype,N_rank>& >(attr)));       
     115      if ((!this->hasInheritedValue() && !attr.hasInheritedValue())) 
     116          return true; 
     117      if (this->hasInheritedValue() && attr.hasInheritedValue()) 
     118          return (this->getInheritedValue() == attr.getInheritedValue()); 
     119      else  
     120        return false;       
    115121    } 
    116122 
Note: See TracChangeset for help on using the changeset viewer.