From 19a982cf693e660ce296a29a9830f1e94d9f1b4c Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 7 Feb 2014 00:29:59 +0100 Subject: Mapper: convert IsInDatabase() check to assertion in map_song_detach() --- src/Mapper.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/Mapper.cxx') 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())); -- cgit v1.2.3