aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-02-07 00:29:59 +0100
committerMax Kellermann <max@duempel.org>2014-02-07 00:42:14 +0100
commit19a982cf693e660ce296a29a9830f1e94d9f1b4c (patch)
tree57f04501c4e5ba1d791433aa790b157b4e6f9683 /src
parent746a47982bb650fe37f28606406ab03e5f977585 (diff)
downloadmpd-19a982cf693e660ce296a29a9830f1e94d9f1b4c.tar.gz
mpd-19a982cf693e660ce296a29a9830f1e94d9f1b4c.tar.xz
mpd-19a982cf693e660ce296a29a9830f1e94d9f1b4c.zip
Mapper: convert IsInDatabase() check to assertion in map_song_detach()
Diffstat (limited to 'src')
-rw-r--r--src/Mapper.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Mapper.cxx b/src/Mapper.cxx
index 786634ebb..1178313d9 100644
--- a/src/Mapper.cxx
+++ b/src/Mapper.cxx
@@ -238,8 +238,9 @@ DetachedSong
map_song_detach(const LightSong &song)
{
DetachedSong detached(song);
+ assert(detached.IsInDatabase());
- if (detached.IsInDatabase() && !detached.HasRealURI()) {
+ if (!detached.HasRealURI()) {
const auto uri = song.GetURI();
detached.SetRealURI(PathTraitsUTF8::Build(music_dir_utf8.c_str(),
uri.c_str()));