Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement DataSet::setExtent to allow true resizing (not just extending) and use it where appropriate #40

Merged
merged 8 commits into from
Jan 28, 2014

Conversation

gicmo
Copy link
Member

@gicmo gicmo commented Jan 28, 2014

This will fix a couple of places where we currently use DataSet::extend() which will correctly work in case we enlarge the dataset but not if we want to shrink it. The latter is a problem size in a few places we also relay in DataSet::size() returning the correct size to know how many values are actually in the dataset.
This will also make Values work as expected and so fix issue #36.

@stoewer
Copy link
Collaborator

stoewer commented Jan 28, 2014

The old extend method DataSet::extend(NDSize) is now only used twice:

src/hdf5/ReferenceList.cpp:56:
src/hdf5/DataArrayHDF5.cpp:104:

In DataArrayHDF5.cpp line 104 not using the new setExtent() seems to be wrong. IMO the old extend() method could be completely replaced and therefore removed.

@gicmo
Copy link
Member Author

gicmo commented Jan 28, 2014

Fair enough.

@stoewer
Copy link
Collaborator

stoewer commented Jan 28, 2014

Perfect

stoewer added a commit that referenced this pull request Jan 28, 2014
Implement DataSet::setExtent to allow true resizing (not just extending) and use it where appropriate
@stoewer stoewer merged commit 90c8948 into G-Node:master Jan 28, 2014
@gicmo gicmo deleted the set_extent branch January 28, 2014 19:32
@gicmo gicmo mentioned this pull request Jan 28, 2014
gicmo pushed a commit to gicmo/nix that referenced this pull request Jan 20, 2015
Implement DataSet::setExtent to allow true resizing (not just extending) and use it where appropriate
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants