*: 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

@@ -170,7 +170,7 @@ CurlRequest::Done(CURLcode result)
gcc_pure
static bool
IsResponseBoundaryHeader(StringView s)
IsResponseBoundaryHeader(StringView s) noexcept
{
return s.size > 5 && (memcmp(s.data, "HTTP/", 5) == 0 ||
/* the proprietary "ICY 200 OK" is

View File

@@ -32,7 +32,7 @@
#include <curl/curl.h>
bool
IsCurlOlderThan(unsigned version_num)
IsCurlOlderThan(unsigned version_num) noexcept
{
const auto *const info = curl_version_info(CURLVERSION_FIRST);
return info == nullptr || info->version_num < version_num;

View File

@@ -34,6 +34,6 @@
gcc_const
bool
IsCurlOlderThan(unsigned version_num);
IsCurlOlderThan(unsigned version_num) noexcept;
#endif