Unidata / netcdf-cxx4

Official GitHub repository for netCDF-C++ libraries and utilities.
Other
126 stars 49 forks source link

Erroneous condition always evaluating true #120

Closed ghost closed 2 years ago

ghost commented 2 years ago

In https://github.com/Unidata/netcdf-cxx4/blob/master/cxx4/ncGroup.cpp lines 1318 and 1356. Condition location != ParentsAndCurrent || location != All is always true, i believe.

ZedThree commented 2 years ago

It also looks like Location::Parents and Location::Children are possibly not handled correctly either.

ZedThree commented 2 years ago

Are Location::Parents/Children supposed to be synonyms for the Location::*AndChildren enums in this context? That is, should group.getCoordVars(NcGroup::Parents) always also search the current group?