summaryrefslogtreecommitdiff
path: root/src/Mapper.cxx
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/Mapper.cxx
parent746a47982bb650fe37f28606406ab03e5f977585 (diff)
Mapper: convert IsInDatabase() check to assertion in map_song_detach()
Diffstat (limited to 'src/Mapper.cxx')
-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()));