Changeset 1361 for XIOS/dev


Ignore:
Timestamp:
12/06/17 14:05:12 (6 years ago)
Author:
ymipsl
Message:

Fix : when making a reference to an object and when attribut "name" is empty, the name was automatically set using référence name or id, even if the objcet has a defined id. Now take name first , then take id and after that look at the referenced object.

Side effect may be expected....

YM

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/dev/XIOS_DEV_CMIP6/src/declare_ref_func.hpp

    r1158 r1361  
    9090}                                                                      \ 
    9191                                                                       \ 
    92 const StdString C##type::get##type##OutputName(void) const            \ 
     92const StdString C##type::get##type##OutputName(void) const             \ 
    9393{                                                                      \ 
    94   if (!this->name.isEmpty())                                           \ 
    95     return this->name;                                                 \ 
    96   else if (hasDirect##type##Reference())                               \ 
     94  if (!this->name.isEmpty())  return this->name;                       \ 
     95  else if (this->hasAutoGeneratedId() && hasDirect##type##Reference()) \ 
    9796  {                                                                    \ 
    9897    const C##type* refer_ptr = this, *tmp_ptr;                         \ 
Note: See TracChangeset for help on using the changeset viewer.