Mir

Code review comment for lp:~raof/mir/factor-out-gbm-output-surface

Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

> > +mgmh::EGLHelper::EGLHelper(EGLHelper&& from)
> > + : depth_buffer_bits{from.depth_buffer_bits},
> > + stencil_buffer_bits{from.stencil_buffer_bits},
> > + egl_display{from.egl_display},
> > + egl_config{from.egl_config},
> > + egl_context{from.egl_context},
> > + egl_surface{from.egl_surface},
> > + should_terminate_egl{from.should_terminate_egl}
> > +{
> > +}
> >
> > A long way to write "mgmh::EGLHelper::EGLHelper(EGLHelper&& from) =
> default;"?
>
> No, an incomplete move constructor - it doesn't invalidate the moved-from
> object, resulting in the crash.

So why have a move constructor at all?!

A move constructor that promises to behave like a copy constructor is misleading at best.

« Back to merge proposal