diff --git a/include/layereddataz.h b/include/layereddataz.h index 39819c4..3a2fa7b 100644 --- a/include/layereddataz.h +++ b/include/layereddataz.h @@ -25,8 +25,8 @@ class LayeredDataZ: public NCFuncs Error ReadTimes(const MString& tname) { static const MString pref = "LayeredDataZ::NC::ReadTimes"; - if(!*this) return Error(pref, "Dataset not open"); - std::vector time; + if(!*this) return Error(pref, "Dataset not open"); + std::vector time; { auto ret = Read(tname, time); @@ -46,7 +46,7 @@ class LayeredDataZ: public NCFuncs } times.resize(time.size()); - for(size_t i = 0; i < times.size(); i++) times[i] = refdate + static_cast(time[i]) * step; + for(size_t i = 0; i < time.size(); i++) times[i] = refdate + static_cast(time[i] * step); return Error(); }