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
d4135935
Commit
d4135935
authored
Mar 13, 2020
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lib/upnp/Util: remove unused function stringToTokens()
parent
569773cc
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
41 deletions
+0
-41
Util.cxx
src/lib/upnp/Util.cxx
+0
-34
Util.hxx
src/lib/upnp/Util.hxx
+0
-7
No files found.
src/lib/upnp/Util.cxx
View file @
d4135935
...
...
@@ -66,37 +66,3 @@ path_getfather(const std::string &s) noexcept
path_catslash
(
father
);
return
father
;
}
std
::
list
<
std
::
string
>
stringToTokens
(
const
std
::
string
&
str
,
const
char
delim
)
noexcept
{
std
::
list
<
std
::
string
>
tokens
;
std
::
string
::
size_type
startPos
=
str
.
find_first_not_of
(
delim
,
0
);
// Skip initial delims, return empty if this eats all.
if
(
startPos
==
std
::
string
::
npos
)
return
tokens
;
while
(
startPos
<
str
.
size
())
{
// Find next delimiter or end of string (end of token)
auto
pos
=
str
.
find_first_of
(
delim
,
startPos
);
// Add token to the vector and adjust start
if
(
pos
==
std
::
string
::
npos
)
{
tokens
.
emplace_back
(
str
,
startPos
);
break
;
}
else
if
(
pos
==
startPos
)
{
// Dont' push empty tokens after first
if
(
tokens
.
empty
())
tokens
.
emplace_back
();
startPos
=
++
pos
;
}
else
{
tokens
.
emplace_back
(
str
,
startPos
,
pos
-
startPos
);
startPos
=
++
pos
;
}
}
return
tokens
;
}
src/lib/upnp/Util.hxx
View file @
d4135935
...
...
@@ -20,10 +20,7 @@
#ifndef MPD_UPNP_UTIL_HXX
#define MPD_UPNP_UTIL_HXX
#include "util/Compiler.h"
#include <string>
#include <list>
void
trimstring
(
std
::
string
&
s
,
const
char
*
ws
=
"
\t\n
"
)
noexcept
;
...
...
@@ -31,8 +28,4 @@ trimstring(std::string &s, const char *ws = " \t\n") noexcept;
std
::
string
path_getfather
(
const
std
::
string
&
s
)
noexcept
;
gcc_pure
std
::
list
<
std
::
string
>
stringToTokens
(
const
std
::
string
&
str
,
char
delim
)
noexcept
;
#endif
/* _UPNPP_H_X_INCLUDED_ */
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