aboutsummaryrefslogtreecommitdiffstats
path: root/src/SongUpdate.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2015-03-01 00:25:30 +0100
committerMax Kellermann <max@duempel.org>2015-03-01 00:25:30 +0100
commit605af61a0fe77e7155446dab82666d6517d9e4a3 (patch)
tree367662bc67c38f8770a390ddfdb1ea46a447224a /src/SongUpdate.cxx
parent77e163e5b859326c1be2a3649c38542881475d26 (diff)
downloadmpd-605af61a0fe77e7155446dab82666d6517d9e4a3.tar.gz
mpd-605af61a0fe77e7155446dab82666d6517d9e4a3.tar.xz
mpd-605af61a0fe77e7155446dab82666d6517d9e4a3.zip
db/simple: eliminate UpdateFileInArchive() if archive API is disabled
Reduce some unnecessary overhead.
Diffstat (limited to '')
-rw-r--r--src/SongUpdate.cxx12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/SongUpdate.cxx b/src/SongUpdate.cxx
index 6d51055c2..2df429175 100644
--- a/src/SongUpdate.cxx
+++ b/src/SongUpdate.cxx
@@ -52,9 +52,13 @@ Song::LoadFile(Storage &storage, const char *path_utf8, Directory &parent)
Song *song = NewFile(path_utf8, parent);
//in archive ?
- bool success = parent.device == DEVICE_INARCHIVE
+ bool success =
+#ifdef ENABLE_ARCHIVE
+ parent.device == DEVICE_INARCHIVE
? song->UpdateFileInArchive(storage)
- : song->UpdateFile(storage);
+ :
+#endif
+ song->UpdateFile(storage);
if (!success) {
song->Free();
return nullptr;
@@ -113,6 +117,10 @@ Song::UpdateFile(Storage &storage)
return true;
}
+#endif
+
+#ifdef ENABLE_ARCHIVE
+
bool
Song::UpdateFileInArchive(const Storage &storage)
{