Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
5ed9f02c
Commit
5ed9f02c
authored
Jan 30, 2013
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
TagPool, ...: include cleanup
parent
378ebad1
Show whitespace changes
Inline
Side-by-side
Showing
26 changed files
with
49 additions
and
80 deletions
+49
-80
ClientInternal.hxx
src/ClientInternal.hxx
+0
-12
CommandError.hxx
src/CommandError.hxx
+1
-2
DatabaseSimple.hxx
src/DatabaseSimple.hxx
+1
-3
Directory.hxx
src/Directory.hxx
+1
-1
DirectorySave.hxx
src/DirectorySave.hxx
+1
-1
InotifySource.hxx
src/InotifySource.hxx
+0
-2
OutputControl.hxx
src/OutputControl.hxx
+0
-8
OutputInit.cxx
src/OutputInit.cxx
+6
-5
PlaylistDatabase.hxx
src/PlaylistDatabase.hxx
+1
-1
PlaylistFile.hxx
src/PlaylistFile.hxx
+2
-3
PlaylistPrint.hxx
src/PlaylistPrint.hxx
+2
-1
PlaylistRegistry.hxx
src/PlaylistRegistry.hxx
+0
-4
PlaylistState.hxx
src/PlaylistState.hxx
+0
-1
QueueSave.hxx
src/QueueSave.hxx
+0
-1
SongPrint.cxx
src/SongPrint.cxx
+2
-0
SongSave.hxx
src/SongSave.hxx
+1
-1
SongSticker.cxx
src/SongSticker.cxx
+5
-5
SongSticker.hxx
src/SongSticker.hxx
+3
-3
TagPool.cxx
src/TagPool.cxx
+2
-0
TagPool.hxx
src/TagPool.hxx
+0
-2
UpdateArchive.hxx
src/UpdateArchive.hxx
+0
-2
HttpdClient.hxx
src/output/HttpdClient.hxx
+0
-2
HttpdInternal.hxx
src/output/HttpdInternal.hxx
+0
-2
pcm_utils.h
src/pcm_utils.h
+13
-13
tag_table.h
src/tag_table.h
+3
-2
test_queue_priority.cxx
test/test_queue_priority.cxx
+5
-3
No files found.
src/ClientInternal.hxx
View file @
5ed9f02c
...
...
@@ -32,8 +32,6 @@
#include <string>
#include <list>
#include <glib.h>
#undef G_LOG_DOMAIN
#define G_LOG_DOMAIN "client"
...
...
@@ -130,16 +128,6 @@ extern size_t client_max_command_list_size;
extern
size_t
client_max_output_buffer_size
;
enum
command_return
client_read
(
Client
*
client
);
enum
command_return
client_process_line
(
Client
*
client
,
char
*
line
);
void
client_write_output
(
Client
*
client
);
gboolean
client_in_event
(
GIOChannel
*
source
,
GIOCondition
condition
,
gpointer
data
);
#endif
src/CommandError.hxx
View file @
5ed9f02c
...
...
@@ -22,8 +22,7 @@
#include "command.h"
#include "playlist_error.h"
#include <glib.h>
#include "gerror.h"
class
Client
;
...
...
src/DatabaseSimple.hxx
View file @
5ed9f02c
...
...
@@ -21,11 +21,9 @@
#define MPD_DATABASE_SIMPLE_HXX
#include "gcc.h"
#include <glib.h>
#include "gerror.h"
#include <sys/time.h>
#include <stdbool.h>
struct
config_param
;
struct
Directory
;
...
...
src/Directory.hxx
View file @
5ed9f02c
...
...
@@ -25,8 +25,8 @@
#include "gcc.h"
#include "DatabaseVisitor.hxx"
#include "PlaylistVector.hxx"
#include "gerror.h"
#include <glib.h>
#include <stdbool.h>
#include <sys/types.h>
...
...
src/DirectorySave.hxx
View file @
5ed9f02c
...
...
@@ -20,7 +20,7 @@
#ifndef MPD_DIRECTORY_SAVE_HXX
#define MPD_DIRECTORY_SAVE_HXX
#include
<glib.h>
#include
"gerror.h"
#include <stdio.h>
...
...
src/InotifySource.hxx
View file @
5ed9f02c
...
...
@@ -24,8 +24,6 @@
#include "gerror.h"
#include "gcc.h"
#include <glib.h>
typedef
void
(
*
mpd_inotify_callback_t
)(
int
wd
,
unsigned
mask
,
const
char
*
name
,
void
*
ctx
);
...
...
src/OutputControl.hxx
View file @
5ed9f02c
...
...
@@ -22,8 +22,6 @@
#include "replay_gain_info.h"
#include <glib.h>
#include <stddef.h>
struct
audio_output
;
...
...
@@ -32,12 +30,6 @@ struct config_param;
struct
music_pipe
;
struct
player_control
;
static
inline
GQuark
audio_output_quark
(
void
)
{
return
g_quark_from_static_string
(
"audio_output"
);
}
void
audio_output_set_replay_gain_mode
(
struct
audio_output
*
ao
,
enum
replay_gain_mode
mode
);
...
...
src/OutputInit.cxx
View file @
5ed9f02c
...
...
@@ -20,6 +20,7 @@
#include "config.h"
#include "OutputControl.hxx"
#include "OutputList.hxx"
#include "OutputError.hxx"
#include "FilterConfig.hxx"
#include "output_api.h"
#include "AudioParser.hxx"
...
...
@@ -65,7 +66,7 @@ audio_output_detect(GError **error)
return
plugin
;
}
g_set_error
(
error
,
audio_
output_quark
(),
0
,
g_set_error
(
error
,
output_quark
(),
0
,
"Unable to detect an audio device"
);
return
NULL
;
}
...
...
@@ -148,7 +149,7 @@ ao_base_init(struct audio_output *ao,
ao
->
name
=
config_get_block_string
(
param
,
AUDIO_OUTPUT_NAME
,
NULL
);
if
(
ao
->
name
==
NULL
)
{
g_set_error
(
error_r
,
audio_
output_quark
(),
0
,
g_set_error
(
error_r
,
output_quark
(),
0
,
"Missing
\"
name
\"
configuration"
);
return
false
;
}
...
...
@@ -274,7 +275,7 @@ audio_output_setup(struct audio_output *ao, const struct config_param *param,
g_warning
(
"No such mixer for output '%s'"
,
ao
->
name
);
}
else
if
(
strcmp
(
replay_gain_handler
,
"software"
)
!=
0
&&
ao
->
replay_gain_filter
!=
NULL
)
{
g_set_error
(
error_r
,
audio_
output_quark
(),
0
,
g_set_error
(
error_r
,
output_quark
(),
0
,
"Invalid
\"
replay_gain_handler
\"
value"
);
return
false
;
}
...
...
@@ -301,14 +302,14 @@ audio_output_new(const struct config_param *param,
p
=
config_get_block_string
(
param
,
AUDIO_OUTPUT_TYPE
,
NULL
);
if
(
p
==
NULL
)
{
g_set_error
(
error_r
,
audio_
output_quark
(),
0
,
g_set_error
(
error_r
,
output_quark
(),
0
,
"Missing
\"
type
\"
configuration"
);
return
nullptr
;
}
plugin
=
audio_output_plugin_get
(
p
);
if
(
plugin
==
NULL
)
{
g_set_error
(
error_r
,
audio_
output_quark
(),
0
,
g_set_error
(
error_r
,
output_quark
(),
0
,
"No such audio output plugin: %s"
,
p
);
return
nullptr
;
}
...
...
src/PlaylistDatabase.hxx
View file @
5ed9f02c
...
...
@@ -21,9 +21,9 @@
#define MPD_PLAYLIST_DATABASE_HXX
#include "check.h"
#include "gerror.h"
#include <stdio.h>
#include <glib.h>
#define PLAYLIST_META_BEGIN "playlist_begin: "
...
...
src/PlaylistFile.hxx
View file @
5ed9f02c
...
...
@@ -20,12 +20,11 @@
#ifndef MPD_PLAYLIST_FILE_HXX
#define MPD_PLAYLIST_FILE_HXX
#include "gerror.h"
#include <vector>
#include <string>
#include <glib.h>
#include <time.h>
struct
song
;
struct
PlaylistInfo
;
class
PlaylistVector
;
...
...
src/PlaylistPrint.hxx
View file @
5ed9f02c
...
...
@@ -20,7 +20,8 @@
#ifndef MPD_PLAYLIST_PRINT_HXX
#define MPD_PLAYLIST_PRINT_HXX
#include <glib.h>
#include "gerror.h"
#include <stdint.h>
struct
playlist
;
...
...
src/PlaylistRegistry.hxx
View file @
5ed9f02c
...
...
@@ -23,10 +23,6 @@
#include "thread/Mutex.hxx"
#include "thread/Cond.hxx"
#include <glib.h>
#include <stdbool.h>
struct
playlist_provider
;
struct
input_stream
;
...
...
src/PlaylistState.hxx
View file @
5ed9f02c
...
...
@@ -25,7 +25,6 @@
#ifndef MPD_PLAYLIST_STATE_HXX
#define MPD_PLAYLIST_STATE_HXX
#include <glib.h>
#include <stdio.h>
struct
playlist
;
...
...
src/QueueSave.hxx
View file @
5ed9f02c
...
...
@@ -25,7 +25,6 @@
#ifndef MPD_QUEUE_SAVE_HXX
#define MPD_QUEUE_SAVE_HXX
#include <glib.h>
#include <stdio.h>
struct
queue
;
...
...
src/SongPrint.cxx
View file @
5ed9f02c
...
...
@@ -30,6 +30,8 @@ extern "C" {
#include "uri.h"
}
#include <glib.h>
void
song_print_uri
(
Client
*
client
,
struct
song
*
song
)
{
...
...
src/SongSave.hxx
View file @
5ed9f02c
...
...
@@ -20,7 +20,7 @@
#ifndef MPD_SONG_SAVE_HXX
#define MPD_SONG_SAVE_HXX
#include
<glib.h>
#include
"gerror.h"
#include <stdio.h>
...
...
src/SongSticker.cxx
View file @
5ed9f02c
...
...
@@ -114,12 +114,12 @@ struct sticker_song_find_data {
size_t
base_uri_length
;
void
(
*
func
)(
struct
song
*
song
,
const
char
*
value
,
gpointer
user_data
);
gpointer
user_data
;
void
*
user_data
);
void
*
user_data
;
};
static
void
sticker_song_find_cb
(
const
char
*
uri
,
const
char
*
value
,
gpointer
user_data
)
sticker_song_find_cb
(
const
char
*
uri
,
const
char
*
value
,
void
*
user_data
)
{
struct
sticker_song_find_data
*
data
=
(
struct
sticker_song_find_data
*
)
user_data
;
...
...
@@ -136,8 +136,8 @@ sticker_song_find_cb(const char *uri, const char *value, gpointer user_data)
bool
sticker_song_find
(
Directory
*
directory
,
const
char
*
name
,
void
(
*
func
)(
struct
song
*
song
,
const
char
*
value
,
gpointer
user_data
),
gpointer
user_data
)
void
*
user_data
),
void
*
user_data
)
{
struct
sticker_song_find_data
data
;
data
.
directory
=
directory
;
...
...
src/SongSticker.hxx
View file @
5ed9f02c
...
...
@@ -20,7 +20,7 @@
#ifndef MPD_SONG_STICKER_HXX
#define MPD_SONG_STICKER_HXX
#include
<glib.h>
#include
"gerror.h"
struct
song
;
struct
Directory
;
...
...
@@ -77,7 +77,7 @@ sticker_song_get(const struct song *song);
bool
sticker_song_find
(
Directory
*
directory
,
const
char
*
name
,
void
(
*
func
)(
struct
song
*
song
,
const
char
*
value
,
gpointer
user_data
),
gpointer
user_data
);
void
*
user_data
),
void
*
user_data
);
#endif
src/TagPool.cxx
View file @
5ed9f02c
...
...
@@ -20,6 +20,8 @@
#include "config.h"
#include "TagPool.hxx"
#include <glib.h>
#include <assert.h>
Mutex
tag_pool_lock
;
...
...
src/TagPool.hxx
View file @
5ed9f02c
...
...
@@ -23,8 +23,6 @@
#include "tag.h"
#include "thread/Mutex.hxx"
#include <glib.h>
extern
Mutex
tag_pool_lock
;
struct
tag_item
;
...
...
src/UpdateArchive.hxx
View file @
5ed9f02c
...
...
@@ -37,8 +37,6 @@ update_archive_file(Directory *directory,
#else
#include <glib.h>
static
inline
bool
update_archive_file
(
gcc_unused
Directory
*
directory
,
gcc_unused
const
char
*
name
,
...
...
src/output/HttpdClient.hxx
View file @
5ed9f02c
...
...
@@ -23,8 +23,6 @@
#include "event/BufferedSocket.hxx"
#include "gcc.h"
#include <glib.h>
#include <list>
#include <stddef.h>
...
...
src/output/HttpdInternal.hxx
View file @
5ed9f02c
...
...
@@ -30,8 +30,6 @@
#include "thread/Mutex.hxx"
#include "event/ServerSocket.hxx"
#include <glib.h>
#include <forward_list>
struct
config_param
;
...
...
src/pcm_utils.h
View file @
5ed9f02c
...
...
@@ -20,7 +20,7 @@
#ifndef MPD_PCM_UTILS_H
#define MPD_PCM_UTILS_H
#include
<glib.h>
#include
"gcc.h"
#include <stdint.h>
...
...
@@ -42,9 +42,9 @@ pcm_end_pointer(const void *p, size_t size)
static
inline
int32_t
pcm_range
(
int32_t
sample
,
unsigned
bits
)
{
if
(
G_UNLIKELY
(
sample
<
(
-
1
<<
(
bits
-
1
))))
if
(
gcc_unlikely
(
sample
<
(
-
1
<<
(
bits
-
1
))))
return
-
1
<<
(
bits
-
1
);
if
(
G_UNLIKELY
(
sample
>=
(
1
<<
(
bits
-
1
))))
if
(
gcc_unlikely
(
sample
>=
(
1
<<
(
bits
-
1
))))
return
(
1
<<
(
bits
-
1
))
-
1
;
return
sample
;
}
...
...
@@ -56,37 +56,37 @@ pcm_range(int32_t sample, unsigned bits)
static
inline
int64_t
pcm_range_64
(
int64_t
sample
,
unsigned
bits
)
{
if
(
G_UNLIKELY
(
sample
<
((
int64_t
)
-
1
<<
(
bits
-
1
))))
if
(
gcc_unlikely
(
sample
<
((
int64_t
)
-
1
<<
(
bits
-
1
))))
return
(
int64_t
)
-
1
<<
(
bits
-
1
);
if
(
G_UNLIKELY
(
sample
>=
((
int64_t
)
1
<<
(
bits
-
1
))))
if
(
gcc_unlikely
(
sample
>=
((
int64_t
)
1
<<
(
bits
-
1
))))
return
((
int64_t
)
1
<<
(
bits
-
1
))
-
1
;
return
sample
;
}
G_GNUC_CONST
gcc_const
static
inline
int16_t
pcm_clamp_16
(
int
x
)
{
static
const
int32_t
MIN_VALUE
=
G_MININT16
;
static
const
int32_t
MAX_VALUE
=
G_MAXINT16
;
static
const
int32_t
MIN_VALUE
=
-
(
1
<<
15
)
;
static
const
int32_t
MAX_VALUE
=
(
1
<<
15
)
-
1
;
if
(
G_UNLIKELY
(
x
<
MIN_VALUE
))
if
(
gcc_unlikely
(
x
<
MIN_VALUE
))
return
MIN_VALUE
;
if
(
G_UNLIKELY
(
x
>
MAX_VALUE
))
if
(
gcc_unlikely
(
x
>
MAX_VALUE
))
return
MAX_VALUE
;
return
x
;
}
G_GNUC_CONST
gcc_const
static
inline
int32_t
pcm_clamp_24
(
int
x
)
{
static
const
int32_t
MIN_VALUE
=
-
(
1
<<
23
);
static
const
int32_t
MAX_VALUE
=
(
1
<<
23
)
-
1
;
if
(
G_UNLIKELY
(
x
<
MIN_VALUE
))
if
(
gcc_unlikely
(
x
<
MIN_VALUE
))
return
MIN_VALUE
;
if
(
G_UNLIKELY
(
x
>
MAX_VALUE
))
if
(
gcc_unlikely
(
x
>
MAX_VALUE
))
return
MAX_VALUE
;
return
x
;
}
...
...
src/tag_table.h
View file @
5ed9f02c
...
...
@@ -21,6 +21,7 @@
#define MPD_TAG_TABLE_H
#include "tag.h"
#include "gcc.h"
#include <glib.h>
...
...
@@ -35,7 +36,7 @@ struct tag_table {
* Returns TAG_NUM_OF_ITEM_TYPES if the specified name was not found
* in the table.
*/
G_GNUC_PURE
gcc_pure
static
inline
enum
tag_type
tag_table_lookup
(
const
struct
tag_table
*
table
,
const
char
*
name
)
{
...
...
@@ -51,7 +52,7 @@ tag_table_lookup(const struct tag_table *table, const char *name)
* Returns TAG_NUM_OF_ITEM_TYPES if the specified name was not found
* in the table.
*/
G_GNUC_PURE
gcc_pure
static
inline
enum
tag_type
tag_table_lookup_i
(
const
struct
tag_table
*
table
,
const
char
*
name
)
{
...
...
test/test_queue_priority.cxx
View file @
5ed9f02c
...
...
@@ -3,6 +3,8 @@
#include "song.h"
#include "Directory.hxx"
#include <glib.h>
Directory
detached_root
;
Directory
::
Directory
()
{}
...
...
@@ -15,11 +17,11 @@ song_dup_detached(const struct song *src)
}
void
song_free
(
G_GNUC_UNUSED
struct
song
*
song
)
song_free
(
gcc_unused
struct
song
*
song
)
{
}
G_GNUC_UNUSED
gcc_unused
static
void
dump_order
(
const
struct
queue
*
queue
)
{
...
...
@@ -46,7 +48,7 @@ check_descending_priority(const struct queue *queue,
}
int
main
(
G_GNUC_UNUSED
int
argc
,
G_GNUC_UNUSED
char
**
argv
)
main
(
gcc_unused
int
argc
,
gcc_unused
char
**
argv
)
{
static
struct
song
songs
[
16
];
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment