From 66e3801b1e662d68fd8a1126b8308b13d89250aa Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 16 May 2017 10:23:38 +0200 Subject: [PATCH] util/MimeType: add "noexcept" --- src/util/MimeType.cxx | 4 ++-- src/util/MimeType.hxx | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/util/MimeType.cxx b/src/util/MimeType.cxx index 121b874ee..bf2f9aa1a 100644 --- a/src/util/MimeType.cxx +++ b/src/util/MimeType.cxx @@ -23,7 +23,7 @@ #include std::string -GetMimeTypeBase(const char *s) +GetMimeTypeBase(const char *s) noexcept { const char *semicolon = strchr(s, ';'); return semicolon != nullptr @@ -32,7 +32,7 @@ GetMimeTypeBase(const char *s) } std::map -ParseMimeTypeParameters(const char *s) +ParseMimeTypeParameters(const char *s) noexcept { std::map result; diff --git a/src/util/MimeType.hxx b/src/util/MimeType.hxx index 9ce102dbc..4e41b461c 100644 --- a/src/util/MimeType.hxx +++ b/src/util/MimeType.hxx @@ -29,7 +29,7 @@ * the string as-is. */ std::string -GetMimeTypeBase(const char *s); +GetMimeTypeBase(const char *s) noexcept; /** * Parse the parameters from a MIME type string. Parameters are @@ -38,6 +38,6 @@ GetMimeTypeBase(const char *s); * "foo/bar; param1=value1; param2=value2" */ std::map -ParseMimeTypeParameters(const char *s); +ParseMimeTypeParameters(const char *s) noexcept; #endif