Commit 66e3801b authored by Max Kellermann's avatar Max Kellermann

util/MimeType: add "noexcept"

parent a30cf604
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
#include <string.h> #include <string.h>
std::string std::string
GetMimeTypeBase(const char *s) GetMimeTypeBase(const char *s) noexcept
{ {
const char *semicolon = strchr(s, ';'); const char *semicolon = strchr(s, ';');
return semicolon != nullptr return semicolon != nullptr
...@@ -32,7 +32,7 @@ GetMimeTypeBase(const char *s) ...@@ -32,7 +32,7 @@ GetMimeTypeBase(const char *s)
} }
std::map<std::string, std::string> std::map<std::string, std::string>
ParseMimeTypeParameters(const char *s) ParseMimeTypeParameters(const char *s) noexcept
{ {
std::map<std::string, std::string> result; std::map<std::string, std::string> result;
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
* the string as-is. * the string as-is.
*/ */
std::string std::string
GetMimeTypeBase(const char *s); GetMimeTypeBase(const char *s) noexcept;
/** /**
* Parse the parameters from a MIME type string. Parameters are * Parse the parameters from a MIME type string. Parameters are
...@@ -38,6 +38,6 @@ GetMimeTypeBase(const char *s); ...@@ -38,6 +38,6 @@ GetMimeTypeBase(const char *s);
* "foo/bar; param1=value1; param2=value2" * "foo/bar; param1=value1; param2=value2"
*/ */
std::map<std::string, std::string> std::map<std::string, std::string>
ParseMimeTypeParameters(const char *s); ParseMimeTypeParameters(const char *s) noexcept;
#endif #endif
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment