Commit a334195e authored by Dominik Charousset's avatar Dominik Charousset

Fix crash on MSVC plus coding style nitpick

parent 5d47387c
......@@ -44,8 +44,7 @@ public:
void dispose() override {
if (state_) {
decltype(state_) state;
state.swap(state_);
auto state = std::move(state_);
state->dispose();
}
}
......
......@@ -89,8 +89,8 @@ public:
if (!running && buf.empty()) {
disposed = true;
if (out) {
out.on_error(reason);
out = nullptr;
auto out_hdl = std::move(out);
out_hdl.on_error(reason);
}
when_disposed = nullptr;
when_consumed_some = nullptr;
......@@ -164,8 +164,7 @@ public:
void dispose() override {
if (state_) {
decltype(state_) state;
state.swap(state_);
auto state = std::move(state_);
state->dispose();
}
}
......
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