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

Adds ProjDataInMemory::read_from_file to return a ProjDataInMemory object #1510

Merged
merged 3 commits into from
Sep 13, 2024

Conversation

robbietuk
Copy link
Collaborator

@robbietuk robbietuk commented Sep 10, 2024

Changes in this pull request

Previously,

auto pd1 = ProjData::read_from_file(fname);
auto pd2 = ProjDataInMemory::read_from_file(fname);

would both return a ProjData object.

This change, overwrites the ProjData::read_from_file() method for ProjDataInMemory. This allows ProjDataInMemory::read_from_file() to return a ProjDataInMemory object.

Testing performed

CI

Related issues

Checklist before requesting a review

  • [] I have performed a self-review of my code
  • [] I have added docstrings/doxygen in line with the guidance in the developer guide
  • [] I have implemented unit tests that cover any new or modified functionality (if applicable)
  • [] The code builds and runs on my machine
  • [] documentation/release_XXX.md has been updated with any functionality change (if applicable)

@robbietuk
Copy link
Collaborator Author

@KrisThielemans Are you happy with this implementation? It can be squash merged.

Copy link
Collaborator

@KrisThielemans KrisThielemans left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

actually, the open_mode should be removed (or at least ignored). ProjDataInMemory will always be read/write, and we're making a copy anyway. The initial ProjData::read_from_file should always be read-only (more chance that it works), which is the default.

Also, add something to release_6.3.htm

@KrisThielemans KrisThielemans merged commit 6417022 into UCL:master Sep 13, 2024
9 checks passed
@robbietuk robbietuk deleted the ProjDataInMemory_read_from_file branch October 10, 2024 15:42
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