util/MimeType: add "noexcept"

This commit is contained in:
Max Kellermann 2017-05-16 10:23:38 +02:00
parent a30cf60422
commit 66e3801b1e
2 changed files with 4 additions and 4 deletions

View File

@ -23,7 +23,7 @@
#include <string.h>
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<std::string, std::string>
ParseMimeTypeParameters(const char *s)
ParseMimeTypeParameters(const char *s) noexcept
{
std::map<std::string, std::string> result;

View File

@ -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<std::string, std::string>
ParseMimeTypeParameters(const char *s);
ParseMimeTypeParameters(const char *s) noexcept;
#endif