Page MenuHome

Silence clang warning about copying `GridBase::Ptr` in ``

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



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

rB Blender

Event Timeline

btw, here is the warning:

../source/blender/blenkernel/intern/ 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