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

[SofaKernel] FIX operator>> in Mat.h and add corresponding test. #993

Merged
merged 1 commit into from
Apr 24, 2019

Conversation

damienmarchal
Copy link
Contributor

@damienmarchal damienmarchal commented Apr 16, 2019

The operator>> was not functionning properly as it was returning
with a failbit set because of the in.peek() on empty string. This error
was generating a warning in UniformMass.

The PR:

  • fix this error
  • adds a test that validate that the code is correct and does not generate error anymore.
  • makes some sout/serr cleaning in uniformmass.

This PR:

  • builds with SUCCESS for all platforms on the CI.
  • does not generate new warnings.
  • does not generate new unit test failures.
  • does not generate new scene test failures.
  • does not break API compatibility.
  • is more than 1 week old (or has fast-merge label).

Reviewers will merge only if all these checks are true.

The operator>> was not functionning properly as it was returning
with a failbit set because of the in.peek() on empty string. This error
was generating a warning in UniformMass.

The PR:
- fix this error
- adds a test that validate that the code is not correct and does not generate error anymore.
- makes some sout/serr cleaning in uniformmass.
@damienmarchal damienmarchal added pr: fix Fix a bug pr: status to review To notify reviewers to review this pull-request labels Apr 16, 2019
@guparan
Copy link
Contributor

guparan commented Apr 18, 2019

Thanks @damienmarchal 👍
Could you explain how the new test checkRigidAttribute ends up using the operator>> you fixed?

@damienmarchal
Copy link
Contributor Author

Hi Guillaume,

The problem of matrix reading was visible because of the UniformMass was generating a warning at run-time. The test was designed to fail if the uniformmass generates such a warning or cannot read the given values. Finally the error was not in UniformMass but in Mat.h, so I fixed the problem and keept the written test (not failing now).

@hugtalbot hugtalbot added pr: status ready Approved a pull-request, ready to be squashed and removed pr: status to review To notify reviewers to review this pull-request labels Apr 24, 2019
@guparan guparan merged commit 38c065c into sofa-framework:master Apr 24, 2019
@damienmarchal damienmarchal deleted the fixMatrixDataReading branch April 24, 2019 22:58
@guparan guparan added this to the v19.06 milestone Jun 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr: fix Fix a bug pr: status ready Approved a pull-request, ready to be squashed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants