aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-10-17 10:06:31 +0200
committerMax Kellermann <max@duempel.org>2013-10-17 10:06:31 +0200
commit7c1cf617282c591dff85df164c178198a0ce7738 (patch)
treec94cfbbeaefd9eb380ac44de7bb3c6e7c8c59ce1 /src
parenteb10d08671f3c3db2049b19a9959fe8c62532f35 (diff)
downloadmpd-7c1cf617282c591dff85df164c178198a0ce7738.tar.gz
mpd-7c1cf617282c591dff85df164c178198a0ce7738.tar.xz
mpd-7c1cf617282c591dff85df164c178198a0ce7738.zip
thread/{Cond,Mutex}: use "class" instead of "typedef"
Allows forward-declaration.
Diffstat (limited to '')
-rw-r--r--src/ArchiveFile.hxx2
-rw-r--r--src/ArchivePlugin.hxx3
-rw-r--r--src/InputInternal.cxx1
-rw-r--r--src/InputStream.hxx2
-rw-r--r--src/PlaylistAny.hxx5
-rw-r--r--src/PlaylistMapper.hxx5
-rw-r--r--src/PlaylistPlugin.hxx5
-rw-r--r--src/PlaylistPrint.cxx1
-rw-r--r--src/PlaylistQueue.cxx1
-rw-r--r--src/PlaylistRegistry.hxx5
-rw-r--r--src/SongUpdate.cxx1
-rw-r--r--src/TagFile.cxx1
-rw-r--r--src/thread/Cond.hxx4
-rw-r--r--src/thread/Mutex.hxx5
14 files changed, 20 insertions, 21 deletions
diff --git a/src/ArchiveFile.hxx b/src/ArchiveFile.hxx
index de0ecc1e8..5f8dc54f5 100644
--- a/src/ArchiveFile.hxx
+++ b/src/ArchiveFile.hxx
@@ -20,6 +20,8 @@
#ifndef MPD_ARCHIVE_FILE_HXX
#define MPD_ARCHIVE_FILE_HXX
+class Mutex;
+class Cond;
class Error;
class ArchiveFile {
diff --git a/src/ArchivePlugin.hxx b/src/ArchivePlugin.hxx
index ac8c1c8e3..38b7bccc3 100644
--- a/src/ArchivePlugin.hxx
+++ b/src/ArchivePlugin.hxx
@@ -20,9 +20,6 @@
#ifndef MPD_ARCHIVE_PLUGIN_HXX
#define MPD_ARCHIVE_PLUGIN_HXX
-#include "thread/Mutex.hxx"
-#include "thread/Cond.hxx"
-
struct input_stream;
class ArchiveFile;
class ArchiveVisitor;
diff --git a/src/InputInternal.cxx b/src/InputInternal.cxx
index e110ebf0a..93a8b9b51 100644
--- a/src/InputInternal.cxx
+++ b/src/InputInternal.cxx
@@ -20,6 +20,7 @@
#include "config.h"
#include "InputInternal.hxx"
#include "InputStream.hxx"
+#include "thread/Cond.hxx"
void
input_stream_signal_client(struct input_stream *is)
diff --git a/src/InputStream.hxx b/src/InputStream.hxx
index 2addd1a09..aee2bc426 100644
--- a/src/InputStream.hxx
+++ b/src/InputStream.hxx
@@ -22,7 +22,6 @@
#include "check.h"
#include "thread/Mutex.hxx"
-#include "thread/Cond.hxx"
#include "Compiler.h"
#include <string>
@@ -31,6 +30,7 @@
#include <assert.h>
+class Cond;
class Error;
struct Tag;
diff --git a/src/PlaylistAny.hxx b/src/PlaylistAny.hxx
index 951fa1099..898057cdd 100644
--- a/src/PlaylistAny.hxx
+++ b/src/PlaylistAny.hxx
@@ -20,9 +20,8 @@
#ifndef MPD_PLAYLIST_ANY_HXX
#define MPD_PLAYLIST_ANY_HXX
-#include "thread/Mutex.hxx"
-#include "thread/Cond.hxx"
-
+class Mutex;
+class Cond;
class SongEnumerator;
struct input_stream;
diff --git a/src/PlaylistMapper.hxx b/src/PlaylistMapper.hxx
index b966e6c39..69ed01d02 100644
--- a/src/PlaylistMapper.hxx
+++ b/src/PlaylistMapper.hxx
@@ -20,9 +20,8 @@
#ifndef MPD_PLAYLIST_MAPPER_HXX
#define MPD_PLAYLIST_MAPPER_HXX
-#include "thread/Mutex.hxx"
-#include "thread/Cond.hxx"
-
+class Mutex;
+class Cond;
class SongEnumerator;
struct input_stream;
diff --git a/src/PlaylistPlugin.hxx b/src/PlaylistPlugin.hxx
index ce380d886..af2ceac47 100644
--- a/src/PlaylistPlugin.hxx
+++ b/src/PlaylistPlugin.hxx
@@ -20,12 +20,11 @@
#ifndef MPD_PLAYLIST_PLUGIN_HXX
#define MPD_PLAYLIST_PLUGIN_HXX
-#include "thread/Mutex.hxx"
-#include "thread/Cond.hxx"
-
struct config_param;
struct input_stream;
struct Tag;
+class Mutex;
+class Cond;
class SongEnumerator;
struct playlist_plugin {
diff --git a/src/PlaylistPrint.cxx b/src/PlaylistPrint.cxx
index 981cdc82f..791a600c5 100644
--- a/src/PlaylistPrint.cxx
+++ b/src/PlaylistPrint.cxx
@@ -34,6 +34,7 @@
#include "InputStream.hxx"
#include "Song.hxx"
#include "util/Error.hxx"
+#include "thread/Cond.hxx"
void
playlist_print_uris(Client *client, const struct playlist *playlist)
diff --git a/src/PlaylistQueue.cxx b/src/PlaylistQueue.cxx
index 2b9e346ea..183237b5f 100644
--- a/src/PlaylistQueue.cxx
+++ b/src/PlaylistQueue.cxx
@@ -26,6 +26,7 @@
#include "InputStream.hxx"
#include "SongEnumerator.hxx"
#include "Song.hxx"
+#include "thread/Cond.hxx"
enum playlist_result
playlist_load_into_queue(const char *uri, SongEnumerator &e,
diff --git a/src/PlaylistRegistry.hxx b/src/PlaylistRegistry.hxx
index aa6c36b85..72cd7222f 100644
--- a/src/PlaylistRegistry.hxx
+++ b/src/PlaylistRegistry.hxx
@@ -20,9 +20,8 @@
#ifndef MPD_PLAYLIST_REGISTRY_HXX
#define MPD_PLAYLIST_REGISTRY_HXX
-#include "thread/Mutex.hxx"
-#include "thread/Cond.hxx"
-
+class Mutex;
+class Cond;
class SongEnumerator;
struct input_stream;
diff --git a/src/SongUpdate.cxx b/src/SongUpdate.cxx
index b6e0acb60..ecee456ec 100644
--- a/src/SongUpdate.cxx
+++ b/src/SongUpdate.cxx
@@ -33,6 +33,7 @@
#include "tag/TagHandler.hxx"
#include "tag/TagId3.hxx"
#include "tag/ApeTag.hxx"
+#include "thread/Cond.hxx"
#include <assert.h>
#include <sys/types.h>
diff --git a/src/TagFile.cxx b/src/TagFile.cxx
index d5ba40d9e..4f7284903 100644
--- a/src/TagFile.cxx
+++ b/src/TagFile.cxx
@@ -24,6 +24,7 @@
#include "DecoderList.hxx"
#include "DecoderPlugin.hxx"
#include "InputStream.hxx"
+#include "thread/Cond.hxx"
#include <assert.h>
#include <unistd.h> /* for SEEK_SET */
diff --git a/src/thread/Cond.hxx b/src/thread/Cond.hxx
index bbaabddc2..ed663dc9d 100644
--- a/src/thread/Cond.hxx
+++ b/src/thread/Cond.hxx
@@ -25,12 +25,12 @@
/* mingw-w64 4.6.3 lacks a std::cond implementation */
#include "WindowsCond.hxx"
-typedef WindowsCond Cond;
+class Cond : public WindowsCond {};
#else
#include "PosixCond.hxx"
-typedef PosixCond Cond;
+class Cond : public PosixCond {};
#endif
diff --git a/src/thread/Mutex.hxx b/src/thread/Mutex.hxx
index 675af74b1..4ed48c972 100644
--- a/src/thread/Mutex.hxx
+++ b/src/thread/Mutex.hxx
@@ -25,13 +25,12 @@
/* mingw-w64 4.6.3 lacks a std::mutex implementation */
#include "CriticalSection.hxx"
-typedef CriticalSection Mutex;
+class Mutex : public CriticalSection {};
#else
#include "PosixMutex.hxx"
-
-typedef PosixMutex Mutex;
+class Mutex : public PosixMutex {};
#endif