To do with std::unique_ptr...
Don't assign, please use reset: > w->mMinimizeHandler = std::unique_ptr <Type> (new Type (win));
w->mMinimizeHandler.reset(new Type(win);
Assignment only works with a temporary, as unique_ptr is non-copyable, but has move semantics. Better to use the explicit reset.
Since you are not caring aroub the return type, use reset, not release.
> w->mMinimizeHandler.release();
w->mMinimizeHandler.reset();
> return mMinimizeHandler.get () != nullptr;
Please use the class's operator bool.
return mMinimizeHandler;
« Back to merge proposal
To do with std::unique_ptr...
Don't assign, please use reset:
> w->mMinimizeHandler = std::unique_ptr <Type> (new Type (win));
w->mMinimizeH andler. reset(new Type(win);
Assignment only works with a temporary, as unique_ptr is non-copyable,
but has move semantics. Better to use the explicit reset.
Since you are not caring aroub the return type, use reset, not release.
> w->mMinimizeHan dler.release( );
w->mMinimizeHa ndler.reset( );
> return mMinimizeHandle r.get () != nullptr;
Please use the class's operator bool.
return mMinimizeHandler;