util/StringUtil: rename strchug_fast_c() to strchug_fast()
Overload the name.
This commit is contained in:
@ -59,7 +59,7 @@ playlist_metadata_load(TextFile &file, PlaylistVector &pv, const char *name,
|
|||||||
}
|
}
|
||||||
|
|
||||||
*colon++ = 0;
|
*colon++ = 0;
|
||||||
value = strchug_fast_c(colon);
|
value = strchug_fast(colon);
|
||||||
|
|
||||||
if (strcmp(line, "mtime") == 0)
|
if (strcmp(line, "mtime") == 0)
|
||||||
pm.mtime = strtol(value, nullptr, 10);
|
pm.mtime = strtol(value, nullptr, 10);
|
||||||
|
@ -78,7 +78,7 @@ song_load(TextFile &file, Directory *parent, const char *uri,
|
|||||||
}
|
}
|
||||||
|
|
||||||
*colon++ = 0;
|
*colon++ = 0;
|
||||||
value = strchug_fast_c(colon);
|
value = strchug_fast(colon);
|
||||||
|
|
||||||
if ((type = tag_name_parse(line)) != TAG_NUM_OF_ITEM_TYPES) {
|
if ((type = tag_name_parse(line)) != TAG_NUM_OF_ITEM_TYPES) {
|
||||||
tag.AddItem(type, value);
|
tag.AddItem(type, value);
|
||||||
|
@ -85,7 +85,7 @@ extm3u_parse_tag(const char *line)
|
|||||||
/* 0 means unknown duration */
|
/* 0 means unknown duration */
|
||||||
duration = 0;
|
duration = 0;
|
||||||
|
|
||||||
name = strchug_fast_c(endptr + 1);
|
name = strchug_fast(endptr + 1);
|
||||||
if (*name == 0 && duration == 0)
|
if (*name == 0 && duration == 0)
|
||||||
/* no information available; don't allocate a tag
|
/* no information available; don't allocate a tag
|
||||||
object */
|
object */
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|
||||||
const char *
|
const char *
|
||||||
strchug_fast_c(const char *p)
|
strchug_fast(const char *p)
|
||||||
{
|
{
|
||||||
while (*p != 0 && g_ascii_isspace(*p))
|
while (*p != 0 && g_ascii_isspace(*p))
|
||||||
++p;
|
++p;
|
||||||
|
@ -31,16 +31,13 @@
|
|||||||
*/
|
*/
|
||||||
gcc_pure
|
gcc_pure
|
||||||
const char *
|
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
|
gcc_pure
|
||||||
static inline char *
|
static inline char *
|
||||||
strchug_fast(char *p)
|
strchug_fast(char *p)
|
||||||
{
|
{
|
||||||
return const_cast<char *>(strchug_fast_c(p));
|
return const_cast<char *>(strchug_fast((const char *)p));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user