Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Improve stream handling in Viewer and GraphEditor #1517
Improve stream handling in Viewer and GraphEditor #1517
Changes from 16 commits
9c8b357
5f3ab58
2581bf3
1ea6908
ebbb765
cf23227
2510769
8170c20
1a4d2cd
1caad7a
003379e
1511967
fdef59e
a72fb91
5183320
4c73377
9cfb948
9a0d7f0
32a6f3a
14c723e
cfaec6d
c21337d
92439dd
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure about this design choice, where the formerly const method
Mesh::getStream
will silently create new streams when data is missing.As an alternative design, what if we were to leave
Mesh::getStream
as a const method, and move the stream construction logic into a newMesh::createStream
method. In the two locations where we need fallbacks for missing streams, we would simply check for a null result fromMesh::getStream
and then callMesh::createStream
explicitly.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems like a surprising behavior for
Mesh::addStream
, where it will silently skip the requested addition when a stream by the same name already exists. In this situation, the caller has no way to know that the mesh stream that they have constructed is not actually referenced or needed by the mesh.Would it instead be better to thrown an exception in this situation, so that the logic bug leading to this situation can be addressed?