aboutsummaryrefslogtreecommitdiffstats
path: root/src/StickerCommands.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-10-19 18:48:38 +0200
committerMax Kellermann <max@duempel.org>2013-10-19 18:48:38 +0200
commitff626ac76357940b2f0ac5cb243a68ac13df0f8a (patch)
tree493888a28950f75f5e254c0ded9dc9703ee83dc3 /src/StickerCommands.cxx
parent59f8144c50765189594d5932fc25869f9ea6e265 (diff)
downloadmpd-ff626ac76357940b2f0ac5cb243a68ac13df0f8a.tar.gz
mpd-ff626ac76357940b2f0ac5cb243a68ac13df0f8a.tar.xz
mpd-ff626ac76357940b2f0ac5cb243a68ac13df0f8a.zip
*: use references instead of pointers
Diffstat (limited to 'src/StickerCommands.cxx')
-rw-r--r--src/StickerCommands.cxx12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/StickerCommands.cxx b/src/StickerCommands.cxx
index 3a212a48b..6688c0820 100644
--- a/src/StickerCommands.cxx
+++ b/src/StickerCommands.cxx
@@ -36,12 +36,12 @@
#include <string.h>
struct sticker_song_find_data {
- Client *client;
+ Client &client;
const char *name;
};
static void
-sticker_song_find_print_cb(Song *song, const char *value,
+sticker_song_find_print_cb(Song &song, const char *value,
void *user_data)
{
struct sticker_song_find_data *data =
@@ -52,7 +52,7 @@ sticker_song_find_print_cb(Song *song, const char *value,
}
static enum command_return
-handle_sticker_song(Client *client, int argc, char *argv[])
+handle_sticker_song(Client &client, int argc, char *argv[])
{
Error error;
const Database *db = GetDatabase(error);
@@ -85,7 +85,7 @@ handle_sticker_song(Client *client, int argc, char *argv[])
sticker *sticker = sticker_song_get(song);
db->ReturnSong(song);
if (sticker) {
- sticker_print(client, sticker);
+ sticker_print(client, *sticker);
sticker_free(sticker);
}
@@ -141,7 +141,7 @@ handle_sticker_song(Client *client, int argc, char *argv[])
return COMMAND_RETURN_ERROR;
}
- success = sticker_song_find(directory, data.name,
+ success = sticker_song_find(*directory, data.name,
sticker_song_find_print_cb, &data);
db_unlock();
if (!success) {
@@ -158,7 +158,7 @@ handle_sticker_song(Client *client, int argc, char *argv[])
}
enum command_return
-handle_sticker(Client *client, int argc, char *argv[])
+handle_sticker(Client &client, int argc, char *argv[])
{
assert(argc >= 4);