From 0896f444552a383a0da1b5056a361bef9596f414 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sat, 1 Feb 2020 13:25:57 +0100 Subject: [PATCH] util/Domain: add `noexcept` --- src/util/Domain.hxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/util/Domain.hxx b/src/util/Domain.hxx index a60abe34c..b83065c9b 100644 --- a/src/util/Domain.hxx +++ b/src/util/Domain.hxx @@ -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); } };