Page MenuHome

Silence clang warning about copying `GridBase::Ptr` in `volume.cc`
ClosedPublic

Authored by Stephan Seitz (theHamsta) on Wed, Mar 18, 11:01 PM.

Details

Summary

Clang warned about a unnecessary copy of GridBase::Ptr (alias for std::shared_ptr<openvdb::GridBase>) without the &. This would not be dramatic but this PR silences the warning.

Diff Detail

Repository
rB Blender

Event Timeline

btw, here is the warning:

../source/blender/blenkernel/intern/volume.cc:684:8: note: use reference type 'const openvdb::GridBase::Ptr &' (aka 'const shared_ptr<openvdb::v5_2::GridBase> &') to prevent copying
  for (const openvdb::GridBase::Ptr vdb_grid : vdb_grids) {
This revision is now accepted and ready to land.Thu, Mar 19, 11:52 AM