Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
050f0c3d
Commit
050f0c3d
authored
Dec 03, 2014
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
util/SplitString: rename to DivideString
parent
90e6c727
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
14 additions
and
14 deletions
+14
-14
Makefile.am
Makefile.am
+1
-1
FlacMetadata.cxx
src/decoder/plugins/FlacMetadata.cxx
+2
-2
VorbisComments.cxx
src/decoder/plugins/VorbisComments.cxx
+2
-2
AoOutputPlugin.cxx
src/output/plugins/AoOutputPlugin.cxx
+2
-2
DivideString.cxx
src/util/DivideString.cxx
+2
-2
DivideString.hxx
src/util/DivideString.hxx
+5
-5
No files found.
Makefile.am
View file @
050f0c3d
...
...
@@ -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/Split
String.hxx
\
src/util/
DivideString.cxx src/util/Divide
String.hxx
\
src/util/FormatString.cxx src/util/FormatString.hxx
\
src/util/Tokenizer.cxx src/util/Tokenizer.hxx
\
src/util/TextFile.hxx
\
...
...
src/decoder/plugins/FlacMetadata.cxx
View file @
050f0c3d
...
...
@@ -30,7 +30,7 @@
#include "tag/MixRamp.hxx"
#include "ReplayGainInfo.hxx"
#include "util/ASCII.hxx"
#include "util/
Split
String.hxx"
#include "util/
Divide
String.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
Split
String
split
(
comment
,
'='
);
const
Divide
String
split
(
comment
,
'='
);
if
(
split
.
IsDefined
()
&&
!
split
.
IsEmpty
())
tag_handler_invoke_pair
(
handler
,
handler_ctx
,
split
.
GetFirst
(),
...
...
src/decoder/plugins/VorbisComments.cxx
View file @
050f0c3d
...
...
@@ -27,7 +27,7 @@
#include "tag/ReplayGain.hxx"
#include "ReplayGainInfo.hxx"
#include "util/ASCII.hxx"
#include "util/
Split
String.hxx"
#include "util/
Divide
String.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
Split
String
split
(
comment
,
'='
);
const
Divide
String
split
(
comment
,
'='
);
if
(
split
.
IsDefined
()
&&
!
split
.
IsEmpty
())
tag_handler_invoke_pair
(
handler
,
handler_ctx
,
split
.
GetFirst
(),
...
...
src/output/plugins/AoOutputPlugin.cxx
View file @
050f0c3d
...
...
@@ -20,7 +20,7 @@
#include "config.h"
#include "AoOutputPlugin.hxx"
#include "../OutputAPI.hxx"
#include "util/
Split
String.hxx"
#include "util/
Divide
String.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
Split
String
ss
(
_options
[
i
],
'='
);
const
Divide
String
ss
(
_options
[
i
],
'='
);
if
(
!
ss
.
IsDefined
())
{
error
.
Format
(
ao_output_domain
,
...
...
src/util/
Split
String.cxx
→
src/util/
Divide
String.cxx
View file @
050f0c3d
...
...
@@ -17,11 +17,11 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include "
Split
String.hxx"
#include "
Divide
String.hxx"
#include <string.h>
SplitString
::
Split
String
(
const
char
*
s
,
char
separator
)
DivideString
::
Divide
String
(
const
char
*
s
,
char
separator
)
:
first
(
nullptr
)
{
const
char
*
x
=
strchr
(
s
,
separator
);
...
...
src/util/
Split
String.hxx
→
src/util/
Divide
String.hxx
View file @
050f0c3d
...
...
@@ -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
Split
String
{
class
Divide
String
{
char
*
first
;
const
char
*
second
;
public
:
Split
String
(
const
char
*
s
,
char
separator
);
Divide
String
(
const
char
*
s
,
char
separator
);
~
Split
String
()
{
~
Divide
String
()
{
delete
[]
first
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment