Commit 0ef63cec authored by Thomas Jahns's avatar Thomas Jahns 🤸
Browse files

Move copying of reference attribute to gridGenerate.

parent 3f8e38ad
...@@ -2633,12 +2633,6 @@ static void gridComplete(grid_t *grid) ...@@ -2633,12 +2633,6 @@ static void gridComplete(grid_t *grid)
gridDefNumber(gridID, number); gridDefNumber(gridID, number);
gridDefPosition(gridID, position); gridDefPosition(gridID, position);
} }
if ( grid->reference )
{
const char *reference = grid->reference;
grid->reference = NULL;
gridDefReference(gridID, reference);
}
} }
break; break;
case GRID_PROJECTION: case GRID_PROJECTION:
...@@ -2796,7 +2790,8 @@ int gridGenerate(const grid_t *grid) ...@@ -2796,7 +2790,8 @@ int gridGenerate(const grid_t *grid)
gridptr->number = grid->number; gridptr->number = grid->number;
gridptr->position = grid->position; gridptr->position = grid->position;
memcpy(gridptr->uuid, grid->uuid, CDI_UUID_SIZE); memcpy(gridptr->uuid, grid->uuid, CDI_UUID_SIZE);
gridptr->reference = grid->reference; if ( gridtype == GRID_UNSTRUCTURED && grid->reference )
gridDefReference(gridID, grid->reference);
gridptr->name = grid->name; gridptr->name = grid->name;
gridptr->rowlon = grid->rowlon; gridptr->rowlon = grid->rowlon;
gridptr->trunc = grid->trunc; gridptr->trunc = grid->trunc;
......
Supports Markdown
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