*: remove remaining __cplusplus checks

This commit is contained in:
Max Kellermann 2013-08-07 19:58:52 +02:00
parent dff05c71e6
commit abe090ec1f
8 changed files with 1 additions and 77 deletions

View File

@ -30,9 +30,7 @@
#define DEFAULT_PLAYLIST_MAX_LENGTH (1024*16)
#define DEFAULT_PLAYLIST_SAVE_ABSOLUTE_PATHS false
#ifdef __cplusplus
class Path;
#endif
void config_global_init(void);
void config_global_finish(void);
@ -43,17 +41,9 @@ void config_global_finish(void);
*/
void config_global_check(void);
#ifdef __cplusplus
bool
ReadConfigFile(const Path &path, GError **error_r);
#endif
#ifdef __cplusplus
extern "C" {
#endif
/* don't free the returned value
set _last_ to NULL to get first entry */
gcc_pure
@ -102,8 +92,4 @@ config_get_positive(enum ConfigOption option, unsigned default_value);
gcc_pure
bool config_get_bool(enum ConfigOption option, bool default_value);
#ifdef __cplusplus
}
#endif
#endif

View File

@ -82,8 +82,6 @@ db_unlock(void)
db_mutex.unlock();
}
#ifdef __cplusplus
class ScopeDatabaseLock {
public:
ScopeDatabaseLock() {
@ -96,5 +94,3 @@ public:
};
#endif
#endif

View File

@ -187,10 +187,6 @@ decoder_plugin_container_scan( const struct decoder_plugin *plugin,
return plugin->container_scan(pathname, tnum);
}
#ifdef __cplusplus
extern "C" {
#endif
/**
* Does the plugin announce the specified file name suffix?
*/
@ -205,8 +201,4 @@ bool
decoder_plugin_supports_mime_type(const struct decoder_plugin *plugin,
const char *mime_type);
#ifdef __cplusplus
}
#endif
#endif

View File

@ -31,10 +31,6 @@ class Mixer;
struct mixer_plugin;
struct config_param;
#ifdef __cplusplus
extern "C" {
#endif
Mixer *
mixer_new(const struct mixer_plugin *plugin, void *ao,
const config_param &param,
@ -62,8 +58,4 @@ mixer_get_volume(Mixer *mixer, GError **error_r);
bool
mixer_set_volume(Mixer *mixer, unsigned volume, GError **error_r);
#ifdef __cplusplus
}
#endif
#endif

View File

@ -39,8 +39,6 @@ extern bool playlist_saveAbsolutePaths;
void
spl_global_init(void);
#ifdef __cplusplus
/**
* Determines whether the specified string is a valid name for a
* stored playlist.
@ -81,5 +79,3 @@ bool
spl_rename(const char *utf8from, const char *utf8to, GError **error_r);
#endif
#endif

View File

@ -26,10 +26,6 @@ struct PulseMixer;
struct pa_context;
struct pa_stream;
#ifdef __cplusplus
extern "C" {
#endif
void
pulse_mixer_on_connect(PulseMixer *pm, struct pa_context *context);
@ -40,8 +36,4 @@ void
pulse_mixer_on_change(PulseMixer *pm,
struct pa_context *context, struct pa_stream *stream);
#ifdef __cplusplus
}
#endif
#endif

View File

@ -28,10 +28,6 @@ struct pa_cvolume;
extern const struct audio_output_plugin pulse_output_plugin;
#ifdef __cplusplus
extern "C" {
#endif
void
pulse_output_lock(PulseOutput *po);
@ -48,8 +44,4 @@ bool
pulse_output_set_volume(PulseOutput *po,
const struct pa_cvolume *volume, GError **error_r);
#ifdef __cplusplus
}
#endif
#endif

View File

@ -22,28 +22,6 @@
#include "gcc.h"
/**
* Remove the "const" attribute from a string pointer. This is a
* dirty hack, don't use it unless you know what you're doing!
*/
gcc_const
static inline char *
deconst_string(const char *p)
{
#ifdef __cplusplus
return const_cast<char *>(p);
#else
union {
const char *in;
char *out;
} u = {
.in = p,
};
return u.out;
#endif
}
/**
* Returns a pointer to the first non-whitespace character in the
* string, or to the end of the string.
@ -62,7 +40,7 @@ gcc_pure
static inline char *
strchug_fast(char *p)
{
return deconst_string(strchug_fast_c(p));
return const_cast<char *>(strchug_fast_c(p));
}
/**