Commit 06909f4f authored by Max Kellermann's avatar Max Kellermann

util/Error: remove explicit move constructor, allow copying

The C++ compiler will auto-generate move and copy constructors/operators for us.
parent aca08155
......@@ -75,22 +75,8 @@ public:
Error(const Domain &_domain, const char *_message)
:domain(&_domain), code(0), message(_message) {}
Error(Error &&other)
:domain(other.domain), code(other.code),
message(std::move(other.message)) {}
~Error();
Error(const Error &) = delete;
Error &operator=(const Error &) = delete;
Error &operator=(Error &&other) {
domain = other.domain;
code = other.code;
std::swap(message, other.message);
return *this;
}
bool IsDefined() const {
return domain != nullptr;
}
......
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