Commit 3b88bac0 authored by Max Kellermann's avatar Max Kellermann

util/StringPointer: add `noexcept`

parent 358f2313
...@@ -49,22 +49,22 @@ private: ...@@ -49,22 +49,22 @@ private:
public: public:
StringPointer() = default; StringPointer() = default;
constexpr StringPointer(const_pointer _value) constexpr StringPointer(const_pointer _value) noexcept
:value(_value) {} :value(_value) {}
/** /**
* Check if this is a "nulled" instance. A "nulled" instance * Check if this is a "nulled" instance. A "nulled" instance
* must not be used. * must not be used.
*/ */
constexpr bool IsNull() const { constexpr bool IsNull() const noexcept {
return value == nullptr; return value == nullptr;
} }
constexpr const_pointer c_str() const { constexpr const_pointer c_str() const noexcept {
return value; return value;
} }
bool empty() const { bool empty() const noexcept {
return *value == SENTINEL; return *value == SENTINEL;
} }
}; };
......
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