Skip to content

Commit

Permalink
small simplification to hdf5 read with size
Browse files Browse the repository at this point in the history
  • Loading branch information
Kevin Huy-Khoa Huynh committed Feb 22, 2021
1 parent f73a8b4 commit e3898e7
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/libs/relay/conduit_relay_io_hdf5.cpp
Expand Up @@ -2521,7 +2521,7 @@ read_hdf5_dataset_into_conduit_node(hid_t hdf5_dset_id,
nelems_from_offset++;
}

int nelems_to_read = -1;
int nelems_to_read = nelems_from_offset;
if(opts.has_child("size"))
{
nelems_to_read = opts["size"].to_value();
Expand All @@ -2530,10 +2530,6 @@ read_hdf5_dataset_into_conduit_node(hid_t hdf5_dset_id,
CONDUIT_ERROR("Size must be greater than zero.");
}
}
else
{
nelems_to_read = nelems_from_offset;
}

// copy metadata to the node under hard-coded keys
if (only_get_metadata)
Expand Down

0 comments on commit e3898e7

Please sign in to comment.