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
29ae84e1
Commit
29ae84e1
authored
Nov 11, 2021
by
Rosen Penev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
manual braced init
Signed-off-by:
Rosen Penev
<
rosenp@gmail.com
>
parent
250011f0
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
8 additions
and
12 deletions
+8
-12
MusicBuffer.cxx
src/MusicBuffer.cxx
+1
-1
AllocatedPath.cxx
src/fs/AllocatedPath.cxx
+2
-2
Discovery.cxx
src/lib/upnp/Discovery.cxx
+1
-2
ArgParser.cxx
src/protocol/ArgParser.cxx
+1
-1
Filter.cxx
src/song/Filter.cxx
+3
-6
No files found.
src/MusicBuffer.cxx
View file @
29ae84e1
...
...
@@ -30,7 +30,7 @@ MusicChunkPtr
MusicBuffer
::
Allocate
()
noexcept
{
const
std
::
scoped_lock
<
Mutex
>
protect
(
mutex
);
return
MusicChunkPtr
(
buffer
.
Allocate
(),
MusicChunkDeleter
(
*
this
))
;
return
{
buffer
.
Allocate
(),
MusicChunkDeleter
(
*
this
)}
;
}
void
...
...
src/fs/AllocatedPath.cxx
View file @
29ae84e1
...
...
@@ -31,7 +31,7 @@ AllocatedPath::FromUTF8(std::string_view path_utf8) noexcept
return
FromFS
(
path_utf8
);
#else
try
{
return
AllocatedPath
(
::
PathFromUTF8
(
path_utf8
))
;
return
{
::
PathFromUTF8
(
path_utf8
)}
;
}
catch
(...)
{
return
nullptr
;
}
...
...
@@ -44,7 +44,7 @@ AllocatedPath::FromUTF8Throw(std::string_view path_utf8)
#ifdef FS_CHARSET_ALWAYS_UTF8
return
FromFS
(
path_utf8
);
#else
return
AllocatedPath
(
::
PathFromUTF8
(
path_utf8
))
;
return
{
::
PathFromUTF8
(
path_utf8
)}
;
#endif
}
...
...
src/lib/upnp/Discovery.cxx
View file @
29ae84e1
...
...
@@ -339,8 +339,7 @@ UPnPDeviceDirectory::GetServer(std::string_view friendly_name)
for
(
const
auto
&
service
:
device
.
services
)
if
(
isCDService
(
service
.
serviceType
.
c_str
()))
return
ContentDirectoryService
(
device
,
service
);
return
{
device
,
service
};
}
throw
std
::
runtime_error
(
"Server not found"
);
...
...
src/protocol/ArgParser.cxx
View file @
29ae84e1
...
...
@@ -31,7 +31,7 @@ MakeArgError(const char *msg, const char *value) noexcept
{
char
buffer
[
256
];
snprintf
(
buffer
,
sizeof
(
buffer
),
"%s: %s"
,
msg
,
value
);
return
ProtocolError
(
ACK_ERROR_ARG
,
buffer
)
;
return
{
ACK_ERROR_ARG
,
buffer
}
;
}
uint32_t
...
...
src/song/Filter.cxx
View file @
29ae84e1
...
...
@@ -206,15 +206,13 @@ ParseStringFilter(const char *&s, bool fold_case)
if
(
auto
after_contains
=
StringAfterPrefixIgnoreCase
(
s
,
"contains "
))
{
s
=
StripLeft
(
after_contains
);
auto
value
=
ExpectQuoted
(
s
);
return
StringFilter
(
std
::
move
(
value
),
fold_case
,
true
,
false
);
return
{
std
::
move
(
value
),
fold_case
,
true
,
false
};
}
if
(
auto
after_not_contains
=
StringAfterPrefixIgnoreCase
(
s
,
"!contains "
))
{
s
=
StripLeft
(
after_not_contains
);
auto
value
=
ExpectQuoted
(
s
);
return
StringFilter
(
std
::
move
(
value
),
fold_case
,
true
,
true
);
return
{
std
::
move
(
value
),
fold_case
,
true
,
true
};
}
bool
negated
=
false
;
...
...
@@ -240,8 +238,7 @@ ParseStringFilter(const char *&s, bool fold_case)
s
=
StripLeft
(
s
+
2
);
auto
value
=
ExpectQuoted
(
s
);
return
StringFilter
(
std
::
move
(
value
),
fold_case
,
false
,
negated
);
return
{
std
::
move
(
value
),
fold_case
,
false
,
negated
};
}
ISongFilterPtr
...
...
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