diff options
Diffstat (limited to '')
-rw-r--r-- | src/playlist/RssPlaylistPlugin.cxx | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/playlist/RssPlaylistPlugin.cxx b/src/playlist/RssPlaylistPlugin.cxx index 43ad68cf6..e2a44bfd3 100644 --- a/src/playlist/RssPlaylistPlugin.cxx +++ b/src/playlist/RssPlaylistPlugin.cxx @@ -74,11 +74,11 @@ static const gchar * get_attribute(const gchar **attribute_names, const gchar **attribute_values, const gchar *name) { - for (unsigned i = 0; attribute_names[i] != NULL; ++i) + for (unsigned i = 0; attribute_names[i] != nullptr; ++i) if (StringEqualsCaseASCII(attribute_names[i], name)) return attribute_values[i]; - return NULL; + return nullptr; } static void @@ -105,7 +105,7 @@ rss_start_element(gcc_unused GMarkupParseContext *context, const gchar *href = get_attribute(attribute_names, attribute_values, "url"); - if (href != NULL) { + if (href != nullptr) { /* create new song object, and copy the existing tag over; we cannot replace the existing song's URI, @@ -113,9 +113,9 @@ rss_start_element(gcc_unused GMarkupParseContext *context, immutable */ Song *song = Song::NewRemote(href); - if (parser->song != NULL) { + if (parser->song != nullptr) { song->tag = parser->song->tag; - parser->song->tag = NULL; + parser->song->tag = nullptr; parser->song->Free(); } @@ -169,7 +169,7 @@ rss_text(gcc_unused GMarkupParseContext *context, case RssParser::ITEM: if (parser->tag != TAG_NUM_OF_ITEM_TYPES) { - if (parser->song->tag == NULL) + if (parser->song->tag == nullptr) parser->song->tag = new Tag(); parser->song->tag->AddItem(parser->tag, text, text_len); @@ -210,7 +210,7 @@ rss_open_stream(InputStream &is) size_t nbytes; bool success; Error error2; - GError *error = NULL; + GError *error = nullptr; /* parse the RSS XML file */ @@ -224,7 +224,7 @@ rss_open_stream(InputStream &is) if (error2.IsDefined()) { g_markup_parse_context_free(context); LogError(error2); - return NULL; + return nullptr; } break; @@ -237,7 +237,7 @@ rss_open_stream(InputStream &is) "XML parser failed: %s", error->message); g_error_free(error); g_markup_parse_context_free(context); - return NULL; + return nullptr; } } @@ -247,7 +247,7 @@ rss_open_stream(InputStream &is) "XML parser failed: %s", error->message); g_error_free(error); g_markup_parse_context_free(context); - return NULL; + return nullptr; } parser.songs.reverse(); @@ -261,13 +261,13 @@ rss_open_stream(InputStream &is) static const char *const rss_suffixes[] = { "rss", - NULL + nullptr }; static const char *const rss_mime_types[] = { "application/rss+xml", "text/xml", - NULL + nullptr }; const struct playlist_plugin rss_playlist_plugin = { |