db/simple/Song: convert "uri" to a std::string

No longer allocate it as a "VarSize".  This used to be a clever trick
to save memory 10 years ago, but these days, keeping the code
maintainable seems more important than saving a few kilobytes of
memory.
This commit is contained in:
Max Kellermann
2019-09-03 20:23:46 +02:00
parent af3f637d3f
commit 7f9a8b8748
10 changed files with 17 additions and 78 deletions

View File

@@ -52,7 +52,7 @@ range_save(BufferedOutputStream &os, unsigned start_ms, unsigned end_ms)
void
song_save(BufferedOutputStream &os, const Song &song)
{
os.Format(SONG_BEGIN "%s\n", song.uri);
os.Format(SONG_BEGIN "%s\n", song.uri.c_str());
range_save(os, song.start_time.ToMS(), song.end_time.ToMS());