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

oiio: fixed move constructor of ParamValue class. #1740

Merged
merged 1 commit into from
Aug 8, 2017

Conversation

edubois
Copy link
Contributor

@edubois edubois commented Aug 8, 2017

Description

ParamValue move constructor was not copying the internal ParamValue type.

Checklist:

  • I have read the contribution guidelines.
  • If this is more extensive than a small change to existing code, I
    have previously submitted a Contributor License Agreement
    (individual, and if there is any way my
    employers might think my programming belongs to them, then also
    corporate).
  • I have updated the documentation, if applicable.
  • I have ensured that the change is tested somewhere in the testsuite
    (adding new test cases if necessary).
  • My code follows the prevailing code style of this project.

@edubois
Copy link
Contributor Author

edubois commented Aug 8, 2017

Please note that this bugfix is an important one. I don't know how ParamValue could have worked before.

@@ -117,6 +117,7 @@ class OIIO_API ParamValue {
: m_name(p.m_name), m_nvalues(p.m_nvalues), m_interp(p.m_interp),
Copy link
Collaborator

Choose a reason for hiding this comment

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

Let's put it here, where the other initializers are (except for the ones that are part of unions, which is harder to do in the initializer list).

Copy link
Collaborator

Choose a reason for hiding this comment

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

n/m, I merged as is.

@lgritz
Copy link
Collaborator

lgritz commented Aug 8, 2017

LGTM. Good catch!

I suspect that it went unnoticed because it's the "move" constructor, and the reliance on this C++11 feature is relatively new for us? But yeah, surprised it hasn't made noticeable bugs before.

@lgritz lgritz merged commit 062dfab into AcademySoftwareFoundation:master Aug 8, 2017
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.

None yet

2 participants