Skip to content
Snippets Groups Projects
Commit 423d6719 authored by Thomas Jahns's avatar Thomas Jahns :cartwheel: Committed by Sergey Kosukhin
Browse files

Shorten array initializations.

parent fbba02ae
No related branches found
No related tags found
2 merge requests!34Version 2.2.0,!13Consolidation with CDI-PIO (develop)
......@@ -279,10 +279,9 @@ cdfDefTimestep(stream_t *streamptr, int tsID)
ncvarid = streamptr->basetime.ncvarboundsid;
if (ncvarid == CDI_UNDEFID) Error("Call to taxisWithBounds() missing!");
double timebounds[2];
timebounds[0] = cdi_encode_timeval(taxis->vDateTime_lb, &streamptr->tsteps[0].taxis);
timebounds[1] = cdi_encode_timeval(taxis->vDateTime_ub, &streamptr->tsteps[0].taxis);
size_t start[2] = { tsID, 0 }, count[2] = { 1, 2 };
size_t start[2] = { [0] = (size_t) tsID, [1] = 0 }, count[2] = { [0] = 1, [1] = 2 };
double timebounds[2] = { timebounds[0] = cdi_encode_timeval(taxis->vDateTime_lb, &streamptr->tsteps[0].taxis),
timebounds[1] = cdi_encode_timeval(taxis->vDateTime_ub, &streamptr->tsteps[0].taxis) };
cdf_put_vara_double(fileID, ncvarid, start, count, timebounds);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment