Ignore:
Timestamp:
04/04/18 12:20:26 (3 years ago)
Author:
oabramkina
Message:

Implementing a patch suggested by Rupert Nash in order to bring temporal_filter.cpp in compliance with c++98 norms.

For this, a constructor of CDuration has been added.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/dev/XIOS_DEV_CMIP6/src/interface/c/icdate.cpp

    r801 r1472  
    7070                                   date_c.year, date_c.month, date_c.day, 
    7171                                   date_c.hour, date_c.minute, date_c.second); 
    72     xios::CDuration dur = { dur_c.year, dur_c.month, dur_c.day, 
    73                             dur_c.hour, dur_c.minute, dur_c.second, 
    74                             dur_c.timestep }; 
     72    xios::CDuration dur( dur_c.year, dur_c.month, dur_c.day, dur_c.hour, dur_c.minute, dur_c.second, dur_c.timestep ); 
    7573    xios::CDate res = date + dur; 
    7674    return { res.getYear(), res.getMonth(), res.getDay(), res.getHour(), res.getMinute(), res.getSecond() }; 
     
    8280                                   date_c.year, date_c.month, date_c.day, 
    8381                                   date_c.hour, date_c.minute, date_c.second); 
    84     xios::CDuration dur = { dur_c.year, dur_c.month, dur_c.day, 
    85                             dur_c.hour, dur_c.minute, dur_c.second, 
    86                             dur_c.timestep }; 
     82    xios::CDuration dur( dur_c.year, dur_c.month, dur_c.day, dur_c.hour, dur_c.minute, dur_c.second, dur_c.timestep ); 
     83 
    8784    xios::CDate res = date - dur; 
    8885    return { res.getYear(), res.getMonth(), res.getDay(), res.getHour(), res.getMinute(), res.getSecond() }; 
Note: See TracChangeset for help on using the changeset viewer.