aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-10-18 12:24:09 +0200
committerMax Kellermann <max@duempel.org>2013-10-18 12:24:47 +0200
commit58fe352fdaff93737d067a0cb90d83ebd5cbe180 (patch)
tree31ebf5e04b4cbc85258d0b8a059a5cf323427836 /src
parentb105093dcdfc3f860a2d8f0c84bc94997efa50c4 (diff)
downloadmpd-58fe352fdaff93737d067a0cb90d83ebd5cbe180.tar.gz
mpd-58fe352fdaff93737d067a0cb90d83ebd5cbe180.tar.xz
mpd-58fe352fdaff93737d067a0cb90d83ebd5cbe180.zip
util/StringUtil: rename strchug_fast_c() to strchug_fast()
Overload the name.
Diffstat (limited to 'src')
-rw-r--r--src/PlaylistDatabase.cxx2
-rw-r--r--src/SongSave.cxx2
-rw-r--r--src/playlist/ExtM3uPlaylistPlugin.cxx2
-rw-r--r--src/util/StringUtil.cxx2
-rw-r--r--src/util/StringUtil.hxx7
5 files changed, 6 insertions, 9 deletions
diff --git a/src/PlaylistDatabase.cxx b/src/PlaylistDatabase.cxx
index 3810d8866..a6d15e755 100644
--- a/src/PlaylistDatabase.cxx
+++ b/src/PlaylistDatabase.cxx
@@ -59,7 +59,7 @@ playlist_metadata_load(TextFile &file, PlaylistVector &pv, const char *name,
}
*colon++ = 0;
- value = strchug_fast_c(colon);
+ value = strchug_fast(colon);
if (strcmp(line, "mtime") == 0)
pm.mtime = strtol(value, nullptr, 10);
diff --git a/src/SongSave.cxx b/src/SongSave.cxx
index 8005885eb..4992b5ead 100644
--- a/src/SongSave.cxx
+++ b/src/SongSave.cxx
@@ -78,7 +78,7 @@ song_load(TextFile &file, Directory *parent, const char *uri,
}
*colon++ = 0;
- value = strchug_fast_c(colon);
+ value = strchug_fast(colon);
if ((type = tag_name_parse(line)) != TAG_NUM_OF_ITEM_TYPES) {
tag.AddItem(type, value);
diff --git a/src/playlist/ExtM3uPlaylistPlugin.cxx b/src/playlist/ExtM3uPlaylistPlugin.cxx
index 177e8857d..c6f6e5bf7 100644
--- a/src/playlist/ExtM3uPlaylistPlugin.cxx
+++ b/src/playlist/ExtM3uPlaylistPlugin.cxx
@@ -85,7 +85,7 @@ extm3u_parse_tag(const char *line)
/* 0 means unknown duration */
duration = 0;
- name = strchug_fast_c(endptr + 1);
+ name = strchug_fast(endptr + 1);
if (*name == 0 && duration == 0)
/* no information available; don't allocate a tag
object */
diff --git a/src/util/StringUtil.cxx b/src/util/StringUtil.cxx
index 87d032735..26aa7825e 100644
--- a/src/util/StringUtil.cxx
+++ b/src/util/StringUtil.cxx
@@ -24,7 +24,7 @@
#include <assert.h>
const char *
-strchug_fast_c(const char *p)
+strchug_fast(const char *p)
{
while (*p != 0 && g_ascii_isspace(*p))
++p;
diff --git a/src/util/StringUtil.hxx b/src/util/StringUtil.hxx
index dc3e101b3..1c67910a9 100644
--- a/src/util/StringUtil.hxx
+++ b/src/util/StringUtil.hxx
@@ -31,16 +31,13 @@
*/
gcc_pure
const char *
-strchug_fast_c(const char *p);
+strchug_fast(const char *p);
-/**
- * Same as strchug_fast_c(), but works with a writable pointer.
- */
gcc_pure
static inline char *
strchug_fast(char *p)
{
- return const_cast<char *>(strchug_fast_c(p));
+ return const_cast<char *>(strchug_fast((const char *)p));
}
/**