fs/Path: add noexcept

This commit is contained in:
Max Kellermann 2019-04-24 14:16:26 +02:00
parent a8b94a4507
commit bc8bb41aef

View File

@ -39,7 +39,7 @@ class Path : public PathTraitsFS::Pointer {
using Traits = PathTraitsFS; using Traits = PathTraitsFS;
typedef Traits::Pointer Base; typedef Traits::Pointer Base;
constexpr Path(const_pointer_type _value):Base(_value) {} constexpr Path(const_pointer_type _value) noexcept:Base(_value) {}
public: public:
/** /**
@ -48,7 +48,7 @@ public:
* *
* @see IsNull() * @see IsNull()
*/ */
constexpr Path(std::nullptr_t):Base(nullptr) {} constexpr Path(std::nullptr_t) noexcept:Base(nullptr) {}
/** /**
* Copy a #Path object. * Copy a #Path object.
@ -59,7 +59,7 @@ public:
* Create a new instance pointing to the specified path * Create a new instance pointing to the specified path
* string. * string.
*/ */
static constexpr Path FromFS(const_pointer_type fs) { static constexpr Path FromFS(const_pointer_type fs) noexcept {
return Path(fs); return Path(fs);
} }
@ -72,7 +72,7 @@ public:
* 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.
*/ */
bool IsNull() const { bool IsNull() const noexcept {
return Base::IsNull(); return Base::IsNull();
} }
@ -81,7 +81,7 @@ public:
* *
* @see IsNull() * @see IsNull()
*/ */
void SetNull() { void SetNull() noexcept {
*this = nullptr; *this = nullptr;
} }