aboutsummaryrefslogtreecommitdiffstats
path: root/src/QueueSave.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'src/QueueSave.cxx')
-rw-r--r--src/QueueSave.cxx11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/QueueSave.cxx b/src/QueueSave.cxx
index 6a1a51992..f3fc7c6d1 100644
--- a/src/QueueSave.cxx
+++ b/src/QueueSave.cxx
@@ -25,14 +25,13 @@
#include "SongSave.hxx"
#include "DatabasePlugin.hxx"
#include "DatabaseGlue.hxx"
-#include "TextFile.hxx"
+#include "fs/TextFile.hxx"
+#include "util/StringUtil.hxx"
#include "util/UriUtil.hxx"
#include "util/Error.hxx"
#include "fs/Traits.hxx"
#include "Log.hxx"
-#include <glib.h>
-
#include <stdlib.h>
#define PRIO_LABEL "Prio: "
@@ -78,7 +77,7 @@ queue_load_song(TextFile &file, const char *line, queue &queue)
return;
uint8_t priority = 0;
- if (g_str_has_prefix(line, PRIO_LABEL)) {
+ if (StringStartsWith(line, PRIO_LABEL)) {
priority = strtoul(line + sizeof(PRIO_LABEL) - 1, nullptr, 10);
line = file.ReadLine();
@@ -89,9 +88,9 @@ queue_load_song(TextFile &file, const char *line, queue &queue)
const Database *db = nullptr;
Song *song;
- if (g_str_has_prefix(line, SONG_BEGIN)) {
+ if (StringStartsWith(line, SONG_BEGIN)) {
const char *uri = line + sizeof(SONG_BEGIN) - 1;
- if (!uri_has_scheme(uri) && !PathTraits::IsAbsoluteUTF8(uri))
+ if (!uri_has_scheme(uri) && !PathTraitsUTF8::IsAbsolute(uri))
return;
Error error;