*: add "noexcept" to many, many function prototypes

This eliminates some overhead, because the compiler doesn't need to
consider these functions throwing.
This commit is contained in:
Max Kellermann
2017-05-08 14:44:49 +02:00
parent ac2e4e593d
commit 71f0ed8b74
272 changed files with 873 additions and 846 deletions

View File

@@ -153,7 +153,7 @@ public:
* Returns return a "nulled" instance on error.
*/
gcc_pure gcc_nonnull_all
static AllocatedPath FromUTF8(const char *path_utf8);
static AllocatedPath FromUTF8(const char *path_utf8) noexcept;
/**
* Convert a UTF-8 C string to an #AllocatedPath instance.
@@ -244,14 +244,14 @@ public:
* (#IsNull returns true).
*/
gcc_pure
std::string ToUTF8() const;
std::string ToUTF8() const noexcept;
/**
* Gets directory name of this path.
* Returns a "nulled" instance on error.
*/
gcc_pure
AllocatedPath GetDirectoryName() const;
AllocatedPath GetDirectoryName() const noexcept;
/**
* Determine the relative part of the given path to this
@@ -260,17 +260,17 @@ public:
* nullptr on mismatch.
*/
gcc_pure
const_pointer_type Relative(Path other_fs) const {
const_pointer_type Relative(Path other_fs) const noexcept {
return PathTraitsFS::Relative(c_str(), other_fs.c_str());
}
/**
* Chop trailing directory separators.
*/
void ChopSeparators();
void ChopSeparators() noexcept;
gcc_pure
bool IsAbsolute() const {
bool IsAbsolute() const noexcept {
return PathTraitsFS::IsAbsolute(c_str());
}
};