exclude: convert to C++

This commit is contained in:
Max Kellermann 2013-01-03 09:51:35 +01:00
parent c0f2024a2e
commit 47fc08bffe
4 changed files with 8 additions and 8 deletions

View File

@ -82,7 +82,6 @@ mpd_headers = \
src/encoder_plugin.h \
src/encoder_list.h \
src/encoder_api.h \
src/exclude.h \
src/fd_util.h \
src/gerror.h \
src/glib_compat.h \
@ -232,7 +231,7 @@ src_mpd_SOURCES = \
src/DatabasePlugin.hxx \
src/DatabaseVisitor.hxx \
src/DatabaseSelection.cxx src/DatabaseSelection.hxx \
src/exclude.c \
src/ExcludeList.cxx src/ExcludeList.hxx \
src/fd_util.c \
src/fifo_buffer.c src/fifo_buffer.h \
src/growing_fifo.c src/growing_fifo.h \

View File

@ -23,8 +23,11 @@
*/
#include "config.h"
#include "exclude.h"
#include "ExcludeList.hxx"
extern "C" {
#include "path.h"
}
#include <assert.h>
#include <string.h>
@ -69,7 +72,7 @@ void
exclude_list_free(GSList *list)
{
while (list != NULL) {
GPatternSpec *pattern = list->data;
GPatternSpec *pattern = (GPatternSpec *)list->data;
g_pattern_spec_free(pattern);
list = g_slist_remove(list, list->data);
}
@ -83,7 +86,7 @@ exclude_list_check(GSList *list, const char *name_fs)
/* XXX include full path name in check */
for (; list != NULL; list = list->next) {
GPatternSpec *pattern = list->data;
GPatternSpec *pattern = (GPatternSpec *)list->data;
if (g_pattern_match_string(pattern, name_fs))
return true;

View File

@ -27,8 +27,6 @@
#include <glib.h>
#include <stdbool.h>
/**
* Loads and parses a .mpdignore file.
*/

View File

@ -29,9 +29,9 @@
#include "song.h"
#include "PlaylistVector.hxx"
#include "Mapper.hxx"
#include "ExcludeList.hxx"
extern "C" {
#include "exclude.h"
#include "uri.h"
#include "path.h"
#include "playlist_list.h"