summaryrefslogtreecommitdiff
path: root/src/IcyMetaDataParser.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2017-12-20 15:05:14 +0100
committerMax Kellermann <max@musicpd.org>2017-12-20 15:05:14 +0100
commit6b77ee9a5eacb7a49c7bcaf6e55d4459d0e501b9 (patch)
tree89a21500deaafc2101430997032f4b2ee37d4b17 /src/IcyMetaDataParser.cxx
parent25fa3ccade6aa9ab0d03c58ffbe8fee4945a3a3c (diff)
IcyMetaDataParser: add "noexcept"
Diffstat (limited to 'src/IcyMetaDataParser.cxx')
-rw-r--r--src/IcyMetaDataParser.cxx17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/IcyMetaDataParser.cxx b/src/IcyMetaDataParser.cxx
index b4015823e..e39a7041c 100644
--- a/src/IcyMetaDataParser.cxx
+++ b/src/IcyMetaDataParser.cxx
@@ -31,7 +31,7 @@
static constexpr Domain icy_metadata_domain("icy_metadata");
void
-IcyMetaDataParser::Reset()
+IcyMetaDataParser::Reset() noexcept
{
if (!IsDefined())
return;
@@ -46,7 +46,7 @@ IcyMetaDataParser::Reset()
}
size_t
-IcyMetaDataParser::Data(size_t length)
+IcyMetaDataParser::Data(size_t length) noexcept
{
assert(length > 0);
@@ -66,7 +66,7 @@ IcyMetaDataParser::Data(size_t length)
}
static void
-icy_add_item(TagBuilder &tag, TagType type, const char *value)
+icy_add_item(TagBuilder &tag, TagType type, const char *value) noexcept
{
size_t length = strlen(value);
@@ -81,7 +81,8 @@ icy_add_item(TagBuilder &tag, TagType type, const char *value)
}
static void
-icy_parse_tag_item(TagBuilder &tag, const char *name, const char *value)
+icy_parse_tag_item(TagBuilder &tag,
+ const char *name, const char *value) noexcept
{
if (strcmp(name, "StreamTitle") == 0)
icy_add_item(tag, TAG_TITLE, value);
@@ -96,7 +97,7 @@ icy_parse_tag_item(TagBuilder &tag, const char *name, const char *value)
* that also fails, return #end.
*/
static char *
-find_end_quote(char *p, char *const end)
+find_end_quote(char *p, char *const end) noexcept
{
char *fallback = std::find(p, end, '\'');
if (fallback >= end - 1 || fallback[1] == ';')
@@ -116,7 +117,7 @@ find_end_quote(char *p, char *const end)
}
static std::unique_ptr<Tag>
-icy_parse_tag(char *p, char *const end)
+icy_parse_tag(char *p, char *const end) noexcept
{
assert(p != nullptr);
assert(end != nullptr);
@@ -165,7 +166,7 @@ icy_parse_tag(char *p, char *const end)
}
size_t
-IcyMetaDataParser::Meta(const void *data, size_t length)
+IcyMetaDataParser::Meta(const void *data, size_t length) noexcept
{
const unsigned char *p = (const unsigned char *)data;
@@ -223,7 +224,7 @@ IcyMetaDataParser::Meta(const void *data, size_t length)
}
size_t
-IcyMetaDataParser::ParseInPlace(void *data, size_t length)
+IcyMetaDataParser::ParseInPlace(void *data, size_t length) noexcept
{
uint8_t *const dest0 = (uint8_t *)data;
uint8_t *dest = dest0;