diff options
author | Max Kellermann <max@duempel.org> | 2014-12-03 21:38:06 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2014-12-03 21:38:06 +0100 |
commit | 050f0c3d8f374011eb8199254714fdba9a78c49f (patch) | |
tree | 511d9e6acc9dc09d801a937d92b0bd723298a011 | |
parent | 90e6c727da8ccfbc5c82fbca4c58a7c12a9c11f0 (diff) | |
download | mpd-050f0c3d8f374011eb8199254714fdba9a78c49f.tar.gz mpd-050f0c3d8f374011eb8199254714fdba9a78c49f.tar.xz mpd-050f0c3d8f374011eb8199254714fdba9a78c49f.zip |
util/SplitString: rename to DivideString
Diffstat (limited to '')
-rw-r--r-- | Makefile.am | 2 | ||||
-rw-r--r-- | src/decoder/plugins/FlacMetadata.cxx | 4 | ||||
-rw-r--r-- | src/decoder/plugins/VorbisComments.cxx | 4 | ||||
-rw-r--r-- | src/output/plugins/AoOutputPlugin.cxx | 4 | ||||
-rw-r--r-- | src/util/DivideString.cxx (renamed from src/util/SplitString.cxx) | 4 | ||||
-rw-r--r-- | src/util/DivideString.hxx (renamed from src/util/SplitString.hxx) | 10 |
6 files changed, 14 insertions, 14 deletions
diff --git a/Makefile.am b/Makefile.am index 023f7e45a..339f27e2e 100644 --- a/Makefile.am +++ b/Makefile.am @@ -374,7 +374,7 @@ libutil_a_SOURCES = \ src/util/CharUtil.hxx \ src/util/NumberParser.hxx \ src/util/StringUtil.cxx src/util/StringUtil.hxx \ - src/util/SplitString.cxx src/util/SplitString.hxx \ + src/util/DivideString.cxx src/util/DivideString.hxx \ src/util/FormatString.cxx src/util/FormatString.hxx \ src/util/Tokenizer.cxx src/util/Tokenizer.hxx \ src/util/TextFile.hxx \ diff --git a/src/decoder/plugins/FlacMetadata.cxx b/src/decoder/plugins/FlacMetadata.cxx index 03e276dce..86c6da04b 100644 --- a/src/decoder/plugins/FlacMetadata.cxx +++ b/src/decoder/plugins/FlacMetadata.cxx @@ -30,7 +30,7 @@ #include "tag/MixRamp.hxx" #include "ReplayGainInfo.hxx" #include "util/ASCII.hxx" -#include "util/SplitString.hxx" +#include "util/DivideString.hxx" bool flac_parse_replay_gain(ReplayGainInfo &rgi, @@ -97,7 +97,7 @@ flac_scan_comment(const FLAC__StreamMetadata_VorbisComment_Entry *entry, { if (handler->pair != nullptr) { const char *comment = (const char *)entry->entry; - const SplitString split(comment, '='); + const DivideString split(comment, '='); if (split.IsDefined() && !split.IsEmpty()) tag_handler_invoke_pair(handler, handler_ctx, split.GetFirst(), diff --git a/src/decoder/plugins/VorbisComments.cxx b/src/decoder/plugins/VorbisComments.cxx index 062f46acf..10652f129 100644 --- a/src/decoder/plugins/VorbisComments.cxx +++ b/src/decoder/plugins/VorbisComments.cxx @@ -27,7 +27,7 @@ #include "tag/ReplayGain.hxx" #include "ReplayGainInfo.hxx" #include "util/ASCII.hxx" -#include "util/SplitString.hxx" +#include "util/DivideString.hxx" #include <stddef.h> #include <stdlib.h> @@ -74,7 +74,7 @@ vorbis_scan_comment(const char *comment, const struct tag_handler *handler, void *handler_ctx) { if (handler->pair != nullptr) { - const SplitString split(comment, '='); + const DivideString split(comment, '='); if (split.IsDefined() && !split.IsEmpty()) tag_handler_invoke_pair(handler, handler_ctx, split.GetFirst(), diff --git a/src/output/plugins/AoOutputPlugin.cxx b/src/output/plugins/AoOutputPlugin.cxx index 2b66fb8db..6faa30b1b 100644 --- a/src/output/plugins/AoOutputPlugin.cxx +++ b/src/output/plugins/AoOutputPlugin.cxx @@ -20,7 +20,7 @@ #include "config.h" #include "AoOutputPlugin.hxx" #include "../OutputAPI.hxx" -#include "util/SplitString.hxx" +#include "util/DivideString.hxx" #include "util/Error.hxx" #include "util/Domain.hxx" #include "Log.hxx" @@ -130,7 +130,7 @@ AoOutput::Configure(const config_param ¶m, Error &error) gchar **_options = g_strsplit(value, ";", 0); for (unsigned i = 0; _options[i] != nullptr; ++i) { - const SplitString ss(_options[i], '='); + const DivideString ss(_options[i], '='); if (!ss.IsDefined()) { error.Format(ao_output_domain, diff --git a/src/util/SplitString.cxx b/src/util/DivideString.cxx index 75e799279..d30dfaa16 100644 --- a/src/util/SplitString.cxx +++ b/src/util/DivideString.cxx @@ -17,11 +17,11 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -#include "SplitString.hxx" +#include "DivideString.hxx" #include <string.h> -SplitString::SplitString(const char *s, char separator) +DivideString::DivideString(const char *s, char separator) :first(nullptr) { const char *x = strchr(s, separator); diff --git a/src/util/SplitString.hxx b/src/util/DivideString.hxx index 96ffb21ec..d8d911691 100644 --- a/src/util/SplitString.hxx +++ b/src/util/DivideString.hxx @@ -17,8 +17,8 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -#ifndef MPD_SPLIT_STRING_HXX -#define MPD_SPLIT_STRING_HXX +#ifndef MPD_DIVIDE_STRING_HXX +#define MPD_DIVIDE_STRING_HXX #include "Compiler.h" @@ -28,14 +28,14 @@ * Split a given constant string at a separator character. Duplicates * the first part to be able to null-terminate it. */ -class SplitString { +class DivideString { char *first; const char *second; public: - SplitString(const char *s, char separator); + DivideString(const char *s, char separator); - ~SplitString() { + ~DivideString() { delete[] first; } |