-
Notifications
You must be signed in to change notification settings - Fork 420
Fix coverity tests #583
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
base: master
Are you sure you want to change the base?
Fix coverity tests #583
Conversation
Co-authored-by: stefanatwork <[email protected]>
| Texture::Texture(Ref<Image> img, const std::string fileName) | ||
| : width(unsigned(img->width)), height(unsigned(img->height)), format(RGBA8), bytesPerTexel(4), width_mask(0), height_mask(0), data(nullptr), fileName(fileName) | ||
| Texture::Texture(Ref<Image> img, std::string &&fileName) | ||
| : width(unsigned(img->width)), height(unsigned(img->height)), format(RGBA8), bytesPerTexel(4), width_mask(0), height_mask(0), data(nullptr), fileName(std::move(fileName)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This here is odd, why would one want to do this? The string object passed would get destroyed by that std::move. This should get reverted.
| { | ||
| AnimatedLightNode (const std::vector<Ref<LightNode>>&& lights, BBox1f time_range) | ||
| : lights(lights), time_range(time_range) {} | ||
| : lights(std::move(lights)), time_range(time_range) {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also here, semantics to destroy the input vector is odd. Maybe it works, but you would never expect a function you pass a value to destroy the passed object.
A handful of commits to address issues flagged by the coverity scan.