diff options
author | Max Kellermann <max@duempel.org> | 2013-10-19 18:48:38 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2013-10-19 18:48:38 +0200 |
commit | ff626ac76357940b2f0ac5cb243a68ac13df0f8a (patch) | |
tree | 493888a28950f75f5e254c0ded9dc9703ee83dc3 /src/SongSticker.cxx | |
parent | 59f8144c50765189594d5932fc25869f9ea6e265 (diff) | |
download | mpd-ff626ac76357940b2f0ac5cb243a68ac13df0f8a.tar.gz mpd-ff626ac76357940b2f0ac5cb243a68ac13df0f8a.tar.xz mpd-ff626ac76357940b2f0ac5cb243a68ac13df0f8a.zip |
*: use references instead of pointers
Diffstat (limited to '')
-rw-r--r-- | src/SongSticker.cxx | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/SongSticker.cxx b/src/SongSticker.cxx index 47ddc85b0..a0c4d3585 100644 --- a/src/SongSticker.cxx +++ b/src/SongSticker.cxx @@ -84,7 +84,7 @@ struct sticker_song_find_data { const char *base_uri; size_t base_uri_length; - void (*func)(Song *song, const char *value, + void (*func)(Song &song, const char *value, void *user_data); void *user_data; }; @@ -101,22 +101,22 @@ sticker_song_find_cb(const char *uri, const char *value, void *user_data) Song *song = data->directory->LookupSong(uri + data->base_uri_length); if (song != nullptr) - data->func(song, value, data->user_data); + data->func(*song, value, data->user_data); } bool -sticker_song_find(Directory *directory, const char *name, - void (*func)(Song *song, const char *value, +sticker_song_find(Directory &directory, const char *name, + void (*func)(Song &song, const char *value, void *user_data), void *user_data) { struct sticker_song_find_data data; - data.directory = directory; + data.directory = &directory; data.func = func; data.user_data = user_data; char *allocated; - data.base_uri = directory->GetPath(); + data.base_uri = directory.GetPath(); if (*data.base_uri != 0) /* append slash to base_uri */ data.base_uri = allocated = |