*: 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:
@@ -64,13 +64,13 @@ public:
|
||||
|
||||
StorageDirectoryReader *OpenDirectory(const char *uri_utf8) override;
|
||||
|
||||
std::string MapUTF8(const char *uri_utf8) const override;
|
||||
std::string MapUTF8(const char *uri_utf8) const noexcept override;
|
||||
|
||||
const char *MapToRelativeUTF8(const char *uri_utf8) const override;
|
||||
const char *MapToRelativeUTF8(const char *uri_utf8) const noexcept override;
|
||||
};
|
||||
|
||||
std::string
|
||||
CurlStorage::MapUTF8(const char *uri_utf8) const
|
||||
CurlStorage::MapUTF8(const char *uri_utf8) const noexcept
|
||||
{
|
||||
assert(uri_utf8 != nullptr);
|
||||
|
||||
@@ -83,7 +83,7 @@ CurlStorage::MapUTF8(const char *uri_utf8) const
|
||||
}
|
||||
|
||||
const char *
|
||||
CurlStorage::MapToRelativeUTF8(const char *uri_utf8) const
|
||||
CurlStorage::MapToRelativeUTF8(const char *uri_utf8) const noexcept
|
||||
{
|
||||
// TODO: escape/unescape?
|
||||
|
||||
@@ -475,7 +475,7 @@ CurlStorage::GetInfo(const char *uri_utf8, gcc_unused bool follow)
|
||||
|
||||
gcc_pure
|
||||
static const char *
|
||||
UriPathOrSlash(const char *uri)
|
||||
UriPathOrSlash(const char *uri) noexcept
|
||||
{
|
||||
const char *path = uri_get_path(uri);
|
||||
if (path == nullptr)
|
||||
|
Reference in New Issue
Block a user