Commit abe090ec authored by Max Kellermann's avatar Max Kellermann

*: remove remaining __cplusplus checks

parent dff05c71
......@@ -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
......@@ -82,8 +82,6 @@ db_unlock(void)
db_mutex.unlock();
}
#ifdef __cplusplus
class ScopeDatabaseLock {
public:
ScopeDatabaseLock() {
......@@ -96,5 +94,3 @@ public:
};
#endif
#endif
......@@ -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
......@@ -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
......@@ -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
......@@ -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
......@@ -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
......@@ -23,28 +23,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));
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment