aboutsummaryrefslogtreecommitdiffstats
path: root/src/DetachedSong.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-02-04 00:38:52 +0100
committerMax Kellermann <max@duempel.org>2014-02-04 00:38:52 +0100
commitdb69ceade64c1e1a9c3d7a7c634f8b8b05ce73b9 (patch)
treebc949afdd343c881993e2faf9003ac1b171fdab0 /src/DetachedSong.cxx
parentb9c248e7e7a451aa8aa2718323abd02a73d3dab5 (diff)
downloadmpd-db69ceade64c1e1a9c3d7a7c634f8b8b05ce73b9.tar.gz
mpd-db69ceade64c1e1a9c3d7a7c634f8b8b05ce73b9.tar.xz
mpd-db69ceade64c1e1a9c3d7a7c634f8b8b05ce73b9.zip
db/LightSong: make "real_uri" a pointer
Reduce overhead. LightSong can always point to the "real" allocated string.
Diffstat (limited to 'src/DetachedSong.cxx')
-rw-r--r--src/DetachedSong.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/DetachedSong.cxx b/src/DetachedSong.cxx
index 2fff9b70f..eb377e591 100644
--- a/src/DetachedSong.cxx
+++ b/src/DetachedSong.cxx
@@ -25,7 +25,7 @@
DetachedSong::DetachedSong(const LightSong &other)
:uri(other.GetURI().c_str()),
- real_uri(other.real_uri),
+ real_uri(other.real_uri != nullptr ? other.real_uri : ""),
tag(*other.tag),
mtime(other.mtime),
start_ms(other.start_ms), end_ms(other.end_ms) {}