Skip to content

Conversation

@stefanatwork
Copy link
Collaborator

A handful of commits to address issues flagged by the coverity scan.

@stefanatwork stefanatwork added this to the v4.4.1 milestone Jan 28, 2026
@stefanatwork stefanatwork self-assigned this Jan 28, 2026
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))
Copy link
Collaborator

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) {}
Copy link
Collaborator

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.

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.

3 participants