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

Self assigning in operator= #563

Closed
sambler opened this issue Sep 4, 2018 · 0 comments · Fixed by #580
Closed

Self assigning in operator= #563

sambler opened this issue Sep 4, 2018 · 0 comments · Fixed by #580

Comments

@sambler
Copy link

sambler commented Sep 4, 2018

https://github.com/imageworks/OpenColorIO/blob/15e96c1f579d3640947a5fcb5ec831383cc3956e/src/core/Config.cpp#L327

Shouldn't this be cacheidnocontext_ = rhs.cacheidnocontext_; ?

Clang 7 is turning this into an error by default -
.../Config.cpp:327:35: error: assigning field to itself [-Werror,-Wself-assign-field]

BernardLefebvre added a commit to autodesk-forks/OpenColorIO that referenced this issue Sep 11, 2018
operator=
- make sure rhs is compared with this before assigning
- avoid a shared pointer copy
- fix AcademySoftwareFoundation#563
BernardLefebvre added a commit to autodesk-forks/OpenColorIO that referenced this issue Sep 28, 2018
operator=
- make sure rhs is compared with this before assigning
- avoid a shared pointer copy
- fix AcademySoftwareFoundation#563
scoopxyz pushed a commit that referenced this issue Sep 28, 2018
operator=
- make sure rhs is compared with this before assigning
- avoid a shared pointer copy
- fix #563
scoopxyz pushed a commit to scoopxyz/OpenColorIO that referenced this issue Jun 4, 2019
…cademySoftwareFoundation#580)

operator=
- make sure rhs is compared with this before assigning
- avoid a shared pointer copy
- fix AcademySoftwareFoundation#563
fnordware pushed a commit to fnordware/OpenColorIO that referenced this issue Oct 8, 2019
…cademySoftwareFoundation#580)

operator=
- make sure rhs is compared with this before assigning
- avoid a shared pointer copy
- fix AcademySoftwareFoundation#563
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants