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

Unable to serialize coordinates as floats in combination with *Props #4621

Closed
santeripuranen opened this issue Oct 20, 2021 · 1 comment
Closed
Assignees
Labels
Milestone

Comments

@santeripuranen
Copy link
Contributor

santeripuranen commented Oct 20, 2021

Description:
It seems that an error in the PicklerOps::CoordsAsDouble mask value (introduced while fixing #2510) now unintentionally triggers serialization of coordinates as doubles (here) whenever any of the Props are selected for serialization, making it impossible for the user to select a combination of Props and coordinates as floats. Likewise, calling MolPickler::pickleMol with propertyFlags set to PicklerOps::CoordsAsDouble will also trigger AllProps serialization as a side effect. This behavior is less of a problem, though, as it can be dealt with on the caller side.

The fix:
Unless there's something I'm missing, simply changing the mask value from CoordsAsDouble = 0x0001FFFF; to CoordsAsDouble = 0x00010000; should correct both problems and make the code behave as expected.

@bp-kelley
Copy link
Contributor

I think this makes good sense.

@bp-kelley bp-kelley self-assigned this Oct 20, 2021
@greglandrum greglandrum added this to the 2022_09_1 milestone Oct 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants