util/StringPointer: add noexcept

This commit is contained in:
Max Kellermann 2020-04-03 15:25:23 +02:00
parent 358f231391
commit 3b88bac07c

View File

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