From db69ceade64c1e1a9c3d7a7c634f8b8b05ce73b9 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 4 Feb 2014 00:38:52 +0100 Subject: db/LightSong: make "real_uri" a pointer Reduce overhead. LightSong can always point to the "real" allocated string. --- src/DetachedSong.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/DetachedSong.cxx') 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) {} -- cgit v1.2.3