Commit a636b8f4 authored by Thomas Jahns's avatar Thomas Jahns 🤸
Browse files

Shorten unitIsHeight.

parent e86fbe04
......@@ -94,14 +94,11 @@ bool is_timeaxis_units(const char *timeunits)
bool is_height_units(const char *units)
{
bool status = false;
int u0 = units[0];
if ( (u0=='m' && (!units[1] || strncmp(units, "meter", 5) == 0)) ||
(!units[2] && units[1]=='m' && (u0=='c' || u0=='d' || u0=='k')) )
{
status = true;
}
bool status
= (u0=='m' && (!units[1] || strncmp(units, "meter", 5) == 0))
|| (!units[2] && units[1]=='m' && (u0=='c' || u0=='d' || u0=='k'));
return status;
}
......
......@@ -1938,10 +1938,8 @@ void grid_set_chunktype(grid_t *grid, ncvar_t *ncvar)
if ( grid->type == GRID_UNSTRUCTURED )
{
if ( ncvar->chunks[ndims-1] == grid->size )
ncvar->chunktype = CDI_CHUNK_GRID;
else
ncvar->chunktype = CDI_CHUNK_AUTO;
ncvar->chunktype = ncvar->chunks[ndims-1] == grid->size
? CDI_CHUNK_GRID : CDI_CHUNK_AUTO;
}
else
{
......
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