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/Mapper.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/Mapper.cxx | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/Mapper.cxx b/src/Mapper.cxx index e19117feb..ebc9f89df 100644 --- a/src/Mapper.cxx +++ b/src/Mapper.cxx @@ -170,18 +170,18 @@ map_uri_fs(const char *uri) } AllocatedPath -map_directory_fs(const Directory *directory) +map_directory_fs(const Directory &directory) { assert(!music_dir_fs.IsNull()); - if (directory->IsRoot()) + if (directory.IsRoot()) return music_dir_fs; - return map_uri_fs(directory->GetPath()); + return map_uri_fs(directory.GetPath()); } AllocatedPath -map_directory_child_fs(const Directory *directory, const char *name) +map_directory_child_fs(const Directory &directory, const char *name) { assert(!music_dir_fs.IsNull()); @@ -217,16 +217,16 @@ map_detached_song_fs(const char *uri_utf8) } AllocatedPath -map_song_fs(const Song *song) +map_song_fs(const Song &song) { - assert(song->IsFile()); + assert(song.IsFile()); - if (song->IsInDatabase()) - return song->IsDetached() - ? map_detached_song_fs(song->uri) - : map_directory_child_fs(song->parent, song->uri); + if (song.IsInDatabase()) + return song.IsDetached() + ? map_detached_song_fs(song.uri) + : map_directory_child_fs(*song.parent, song.uri); else - return AllocatedPath::FromUTF8(song->uri); + return AllocatedPath::FromUTF8(song.uri); } std::string |