MR fixing the bug in setReferenceSurface_impl. The surface was moved to m_surfaces m_surfaces[istate] = std::move(surface) before calling encodeSurface . The order of lines is changed.
m_surfaces[istate] = std::move(surface)
encodeSurface
Tagging: @pagessin @cvarni @ncalace @tbold @emoyse @goetz @adye