Commit 513eb37d authored by Marshall Cline's avatar Marshall Cline Committed by Facebook Github Bot

fix CoreAndCallbackReference move-ctor

Summary:
Fix CoreAndCallbackReference move-ctor so it doesn't call this->detach() (my bad; see D7723078).

Also (for clarity/pedantry/obviousness), explicitly delete the class' move-assignment op.

Reviewed By: yfeldblum

Differential Revision: D7848370

fbshipit-source-id: bc051120b3df0557ce9b01cbad8c00a57b8780d8
parent 30b22b4a
......@@ -289,11 +289,10 @@ class Core final {
CoreAndCallbackReference(CoreAndCallbackReference const& o) = delete;
CoreAndCallbackReference& operator=(CoreAndCallbackReference const& o) =
delete;
CoreAndCallbackReference& operator=(CoreAndCallbackReference&&) = delete;
CoreAndCallbackReference(CoreAndCallbackReference&& o) noexcept {
detach();
core_ = exchange(o.core_, nullptr);
}
CoreAndCallbackReference(CoreAndCallbackReference&& o) noexcept
: core_(exchange(o.core_, nullptr)) {}
Core* getCore() const noexcept {
return core_;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment