Commit 66aac200 authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

juldate_sub(): changed interface.

parent 59f43728
......@@ -41,8 +41,8 @@ Deltat(void *process)
cdoOperatorAdd("dTdivdt", 0, 1, nullptr);
// clang-format on
int operatorID = cdoOperatorID();
bool ldivdt = cdoOperatorF2(operatorID);
const int operatorID = cdoOperatorID();
const bool ldivdt = cdoOperatorF2(operatorID);
const int streamID1 = cdoStreamOpenRead(cdoStreamName(0));
......@@ -80,8 +80,8 @@ Deltat(void *process)
int tsID2 = 0;
while ((nrecs = cdoStreamInqTimestep(streamID1, tsID)))
{
JulianDate juldate1 = juldate_encode(calendar, taxisInqVdate(taxisID1), taxisInqVtime(taxisID1));
double idt_in_sec = ldivdt ? 1./JulianDateo_seconds(juldate_sub(juldate1, juldate0)) : 1;
const JulianDate juldate1 = juldate_encode(calendar, taxisInqVdate(taxisID1), taxisInqVtime(taxisID1));
const double idt_in_sec = ldivdt ? 1./JulianDateo_seconds(juldate_sub(juldate1, juldate0)) : 1;
juldate0 = juldate1;
taxisCopyTimestep(taxisID2, taxisID1);
......
......@@ -102,7 +102,7 @@ private:
JulianDate juldate_encode(int calendar, int64_t date, int time);
void juldate_decode(int calendar, JulianDate juldate, int64_t *date, int *time);
JulianDate juldate_sub(JulianDate juldate2, JulianDate juldate1);
JulianDate juldate_sub(const JulianDate &juldate2, const JulianDate &juldate1);
JulianDate juldate_add_seconds(int64_t seconds, JulianDate juldate);
double JulianDateo_seconds(JulianDate juldate);
......
......@@ -44,7 +44,7 @@ juldate_decode(int calendar, JulianDate juldate, int64_t *date, int *time)
}
JulianDate
juldate_sub(JulianDate juldate2, JulianDate juldate1)
juldate_sub(const JulianDate &juldate2, const JulianDate &juldate1)
{
JulianDate juldate;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment