util/Domain: add noexcept

This commit is contained in:
Max Kellermann 2020-02-01 13:25:57 +01:00
parent 620872390b
commit 0896f44455

View File

@ -34,21 +34,21 @@ class Domain {
const char *const name; const char *const name;
public: public:
constexpr explicit Domain(const char *_name) constexpr explicit Domain(const char *_name) noexcept
:name(_name) {} :name(_name) {}
Domain(const Domain &) = delete; Domain(const Domain &) = delete;
Domain &operator=(const Domain &) = delete; Domain &operator=(const Domain &) = delete;
constexpr const char *GetName() const { constexpr const char *GetName() const noexcept {
return name; return name;
} }
bool operator==(const Domain &other) const { bool operator==(const Domain &other) const noexcept {
return this == &other; return this == &other;
} }
bool operator!=(const Domain &other) const { bool operator!=(const Domain &other) const noexcept {
return !(*this == other); return !(*this == other);
} }
}; };