aboutsummaryrefslogtreecommitdiffstats
path: root/src/Volume.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-11-28 18:48:35 +0100
committerMax Kellermann <max@duempel.org>2013-11-28 18:48:35 +0100
commitaf4133e3c92c78cc19ff14b876be6afcab1db091 (patch)
treeda38387995bde630b20f81a717862ae21d19bb48 /src/Volume.cxx
parenta788b7e747bc21b9aadee45dd028fa6198af794e (diff)
downloadmpd-af4133e3c92c78cc19ff14b876be6afcab1db091.tar.gz
mpd-af4133e3c92c78cc19ff14b876be6afcab1db091.tar.xz
mpd-af4133e3c92c78cc19ff14b876be6afcab1db091.zip
Util/StringUtil: add StringStartsWith()
Replaces GLib's g_str_has_prefix().
Diffstat (limited to 'src/Volume.cxx')
-rw-r--r--src/Volume.cxx5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/Volume.cxx b/src/Volume.cxx
index 3f7210f6c..a4112a4cc 100644
--- a/src/Volume.cxx
+++ b/src/Volume.cxx
@@ -22,12 +22,11 @@
#include "MixerAll.hxx"
#include "Idle.hxx"
#include "GlobalEvents.hxx"
+#include "util/StringUtil.hxx"
#include "util/Domain.hxx"
#include "system/PeriodClock.hxx"
#include "Log.hxx"
-#include <glib.h>
-
#include <assert.h>
#include <stdlib.h>
@@ -106,7 +105,7 @@ read_sw_volume_state(const char *line)
char *end = nullptr;
long int sv;
- if (!g_str_has_prefix(line, SW_VOLUME_STATE))
+ if (!StringStartsWith(line, SW_VOLUME_STATE))
return false;
line += sizeof(SW_VOLUME_STATE) - 1;