Skip to content

Commit 6f53052

Browse files
noexcept
1 parent 10dc150 commit 6f53052

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

libs/openFrameworks/utils/ofFilesystem.h

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ class path {
4040
path(path&& other) noexcept = default;
4141
path& operator=(path&& other) noexcept = default;
4242

43-
void clear() {
43+
void clear() noexcept {
4444
path_.clear();
4545
}
4646

@@ -66,11 +66,11 @@ class path {
6666
auto generic_u16string() const { return path_.generic_u16string(); }
6767
auto generic_u32string() const { return path_.generic_u32string(); }
6868
auto string() const { return path_.string(); }
69-
auto native() const { return path_.native(); }
69+
auto native() const noexcept { return path_.native(); }
7070
auto u8string() const { return path_.u8string(); }
7171
auto u16string() const { return path_.u16string(); }
7272
auto u32string() const { return path_.u32string(); }
73-
const auto c_str() const { return path_.c_str(); }
73+
const auto c_str() const noexcept { return path_.c_str(); }
7474

7575
const std::filesystem::path& native_path() const { return path_; }
7676

@@ -115,6 +115,7 @@ class path {
115115
template <typename T> bool operator<=(T&& other) const noexcept { return path_ <= std::forward<T>(other); }
116116
template <typename T> bool operator>(T&& other) const noexcept { return path_ > std::forward<T>(other); }
117117
template <typename T> bool operator>=(T&& other) const noexcept { return path_ >= std::forward<T>(other); }
118+
118119
bool operator!() const noexcept { return empty(); }
119120

120121
template <typename... Args>
@@ -132,7 +133,7 @@ class path {
132133
}
133134

134135
template <typename T>
135-
path& assign(T&& p) {
136+
path& assign(T&& p) noexcept {
136137
path_.assign(std::move(std::forward<T>(p)));
137138
return *this;
138139
}

0 commit comments

Comments
 (0)