From 43cbbe111b2429b41b1896f228625cf5692c3d88 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 2 Jan 2013 22:42:12 +0100 Subject: [PATCH] song_update: convert to C++ --- Makefile.am | 2 +- src/{song_update.c => SongUpdate.cxx} | 11 +++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) rename src/{song_update.c => SongUpdate.cxx} (96%) diff --git a/Makefile.am b/Makefile.am index 1ae249c80..76ec6a612 100644 --- a/Makefile.am +++ b/Makefile.am @@ -309,7 +309,7 @@ src_mpd_SOURCES = \ src/replay_gain_info.c \ src/sig_handlers.c \ src/Song.cxx \ - src/song_update.c \ + src/SongUpdate.cxx \ src/SongPrint.cxx src/SongPrint.hxx \ src/SongSave.cxx src/SongSave.hxx \ src/resolver.c src/resolver.h \ diff --git a/src/song_update.c b/src/SongUpdate.cxx similarity index 96% rename from src/song_update.c rename to src/SongUpdate.cxx index 37f502a20..114ad875c 100644 --- a/src/song_update.c +++ b/src/SongUpdate.cxx @@ -1,5 +1,5 @@ /* - * Copyright (C) 2003-2011 The Music Player Daemon Project + * Copyright (C) 2003-2013 The Music Player Daemon Project * http://www.musicpd.org * * This program is free software; you can redistribute it and/or modify @@ -18,9 +18,15 @@ */ #include "config.h" /* must be first for large file support */ + +extern "C" { #include "song.h" #include "uri.h" +} + #include "directory.h" + +extern "C" { #include "mapper.h" #include "decoder_list.h" #include "decoder_plugin.h" @@ -29,6 +35,7 @@ #include "tag.h" #include "tag_handler.h" #include "input_stream.h" +} #include @@ -187,7 +194,7 @@ song_file_update_inarchive(struct song *song) if (suffix == NULL) return false; - plugin = decoder_plugin_from_suffix(suffix, false); + plugin = decoder_plugin_from_suffix(suffix, nullptr); if (plugin == NULL) return false;