Changeset 1284 for XIOS/dev


Ignore:
Timestamp:
09/27/17 18:05:57 (7 years ago)
Author:
ymipsl
Message:

Fix 1 side effect introduced by previous commit...

YM

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/dev/XIOS_DEV_CMIP6/src/node/domain.cpp

    r1265 r1284  
    15401540   void CDomain::checkLonLat() 
    15411541   { 
    1542      hasLonLat = (!latvalue_1d.isEmpty() && !lonvalue_1d.isEmpty()) || 
    1543                  (!latvalue_2d.isEmpty() && !lonvalue_2d.isEmpty()); 
     1542     if (!hasLonLat) hasLonLat = (!latvalue_1d.isEmpty() && !lonvalue_1d.isEmpty()) || 
     1543                                 (!latvalue_2d.isEmpty() && !lonvalue_2d.isEmpty()); 
    15441544     bool hasLonLatValue = (0 != lonvalue.numElements()) || (0 != latvalue.numElements()); 
    15451545     if (hasLonLat && !hasLonLatValue) 
     
    25412541    }  
    25422542 
    2543     i_index.resizeAndPreserve(nbIndGlob); 
    2544     j_index.resizeAndPreserve(nbIndGlob); 
     2543    if (nbIndGlob==0) 
     2544    { 
     2545      i_index.resize(nbIndGlob); 
     2546      j_index.resize(nbIndGlob); 
     2547    } 
     2548    else 
     2549    { 
     2550      i_index.resizeAndPreserve(nbIndGlob); 
     2551      j_index.resizeAndPreserve(nbIndGlob); 
     2552    } 
    25452553  } 
    25462554 
Note: See TracChangeset for help on using the changeset viewer.