Skip to content

Layers avoid use after move

I assume this is used only in the ITK path.

The change is

, Layer(std::move(surfaceArray), thickness, std::move(olap), laytyp)
 .... 
{
  if (!ades && surfaceArray) <-- [surfaceArray has been moved from above]

to

, Layer(std::move(surfaceArray), thickness, std::move(olap), laytyp)
 .... 
{
  if (!ades && m_surfaceArray) <-- [m_surfaceArray has been moved to]

More or less the issue is this [https://godbolt.org/z/jqavj6YGe]

ping @tstreble @pagessin

Edited by Christos Anastopoulos

Merge request reports

Loading