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

Fix PointData::setIndexOfVariant accidentally doing pass-by-value #495

Merged

Conversation

N-Dekker
Copy link
Contributor

@N-Dekker N-Dekker commented Feb 7, 2024

The first parameter of the private member function PointData::setIndexOfVariant should be passed by reference. Before this commit, it did pass-by-value, causing calls to PointData::setElementTypeSpecifier to have no effect at all.

The bug was introduced with pull request #454 commit 55f50a9 "Replace private PointData::VectorHolder class with std::variant (merged on 5 February 2024) and reported to me by Jeroen Eggermont (@jeggermont).

The first parameter of the private member function `PointData::setIndexOfVariant` should be passed by reference. Before this commit, it did pass-by-value, causing calls to `PointData::setElementTypeSpecifier` to have no effect at all.

The bug was introduced with pull request #454 commit 55f50a9 "Replace private `PointData::VectorHolder` class with `std::variant` (merged on 5 February 2024) and reported to me by Jeroen Eggermont.
Copy link
Contributor

@jeggermont jeggermont left a comment

Choose a reason for hiding this comment

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

Fix seems to work.

Copy link
Contributor

@ThomasKroes ThomasKroes left a comment

Choose a reason for hiding this comment

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

Works for me

@N-Dekker N-Dekker added the bug Something isn't working label Feb 8, 2024
@ThomasKroes ThomasKroes merged commit b83c803 into master Feb 8, 2024
6 checks passed
@ThomasKroes ThomasKroes deleted the feature/PointData-setIndexOfVariant-pass-by-reference branch February 8, 2024 10:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants