From 3e9430673d7472db3b5f10aec899e942efe3b851 Mon Sep 17 00:00:00 2001 From: Michael Uleysky Date: Fri, 12 Apr 2024 12:05:19 +1000 Subject: [PATCH] Some files define time shift as double, not int --- include/layereddataz.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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(); }