- Timestamp:
- 07/10/17 18:17:04 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/dev/branch_yushan_merged/src/filter/source_filter.cpp
r1018 r1205 37 37 if (hasMissingValue) 38 38 { 39 double nanValue = std::numeric_limits<double>::quiet_NaN();40 size_t nbData = packet->data.numElements();39 const double nanValue = std::numeric_limits<double>::quiet_NaN(); 40 const size_t nbData = packet->data.numElements(); 41 41 for (size_t idx = 0; idx < nbData; ++idx) 42 42 { … … 82 82 } 83 83 84 // Convert missing values to NaN 85 if (hasMissingValue) 86 { 87 const double nanValue = std::numeric_limits<double>::quiet_NaN(); 88 const size_t nbData = packet->data.numElements(); 89 for (size_t idx = 0; idx < nbData; ++idx) 90 { 91 if (defaultValue == packet->data(idx)) 92 packet->data(idx) = nanValue; 93 } 94 } 95 84 96 onOutputReady(packet); 85 97 }
Note: See TracChangeset
for help on using the changeset viewer.