1
1
mirror of https://github.com/mawww/kakoune.git synced 2024-12-01 08:23:05 +03:00

use custom Client::operator=(Client&&) to drop safe counts first

This commit is contained in:
Maxime Coste 2012-10-30 14:12:57 +01:00
parent 1ea4b3998a
commit 6eef68124f

View File

@ -19,7 +19,16 @@ struct Client
context(new Context(*input_handler, window, *ui)) {}
Client(Client&&) = default;
Client& operator=(Client&&) = default;
Client& operator=(Client&& other)
{
// drop safe pointers first
context.reset();
ui = std::move(other.ui);
input_handler = std::move(other.input_handler);
context = std::move(other.context);
return *this;
}
};
struct client_removed{};