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;
public:
constexpr explicit Domain(const char *_name)
constexpr explicit Domain(const char *_name) noexcept
:name(_name) {}
Domain(const Domain &) = delete;
Domain &operator=(const Domain &) = delete;
constexpr const char *GetName() const {
constexpr const char *GetName() const noexcept {
return name;
}
bool operator==(const Domain &other) const {
bool operator==(const Domain &other) const noexcept {
return this == &other;
}
bool operator!=(const Domain &other) const {
bool operator!=(const Domain &other) const noexcept {
return !(*this == other);
}
};