diff options
author | Max Kellermann <max@duempel.org> | 2013-10-20 23:09:51 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2013-10-20 23:09:51 +0200 |
commit | 0e4d2e7277bc2adf18dd1e719ec4ce684f86d72b (patch) | |
tree | 181aa272821ace382565b3c3465949101b98e253 /src/tag/ApeReplayGain.cxx | |
parent | 2bbff77e489ae72a332b18b122844bd761d75764 (diff) | |
download | mpd-0e4d2e7277bc2adf18dd1e719ec4ce684f86d72b.tar.gz mpd-0e4d2e7277bc2adf18dd1e719ec4ce684f86d72b.tar.xz mpd-0e4d2e7277bc2adf18dd1e719ec4ce684f86d72b.zip |
Util/ASCII: add function StringEqualsCaseASCII()
Replaces GLib's g_ascii_strcasecmp().
Diffstat (limited to 'src/tag/ApeReplayGain.cxx')
-rw-r--r-- | src/tag/ApeReplayGain.cxx | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/tag/ApeReplayGain.cxx b/src/tag/ApeReplayGain.cxx index 817eca349..15526d2d9 100644 --- a/src/tag/ApeReplayGain.cxx +++ b/src/tag/ApeReplayGain.cxx @@ -21,8 +21,7 @@ #include "ApeReplayGain.hxx" #include "ApeLoader.hxx" #include "ReplayGainInfo.hxx" - -#include <glib.h> +#include "util/ASCII.hxx" #include <string.h> #include <stdlib.h> @@ -43,16 +42,16 @@ replay_gain_ape_callback(unsigned long flags, const char *key, memcpy(value, _value, value_length); value[value_length] = 0; - if (g_ascii_strcasecmp(key, "replaygain_track_gain") == 0) { + if (StringEqualsCaseASCII(key, "replaygain_track_gain")) { info->tuples[REPLAY_GAIN_TRACK].gain = atof(value); return true; - } else if (g_ascii_strcasecmp(key, "replaygain_album_gain") == 0) { + } else if (StringEqualsCaseASCII(key, "replaygain_album_gain")) { info->tuples[REPLAY_GAIN_ALBUM].gain = atof(value); return true; - } else if (g_ascii_strcasecmp(key, "replaygain_track_peak") == 0) { + } else if (StringEqualsCaseASCII(key, "replaygain_track_peak")) { info->tuples[REPLAY_GAIN_TRACK].peak = atof(value); return true; - } else if (g_ascii_strcasecmp(key, "replaygain_album_peak") == 0) { + } else if (StringEqualsCaseASCII(key, "replaygain_album_peak")) { info->tuples[REPLAY_GAIN_ALBUM].peak = atof(value); return true; } else |