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
4e276256
Commit
4e276256
authored
Nov 23, 2021
by
Rosen Penev
Committed by
Max Kellermann
Dec 06, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
more braced init list conversion
Signed-off-by:
Rosen Penev
<
rosenp@gmail.com
>
parent
d0f9062b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
9 deletions
+6
-9
LocateUri.cxx
src/LocateUri.cxx
+4
-6
Escape.cxx
src/lib/curl/Escape.cxx
+1
-1
LibsamplerateResampler.cxx
src/pcm/LibsamplerateResampler.cxx
+1
-2
No files found.
src/LocateUri.cxx
View file @
4e276256
...
...
@@ -48,15 +48,14 @@ LocateFileUri(const char *uri, const Client *client
/* this path was relative to the music
directory */
// TODO: don't use suffix.data() (ok for now because we know it's null-terminated)
return
LocatedUri
(
LocatedUri
::
Type
::
RELATIVE
,
suffix
.
data
());
return
{
LocatedUri
::
Type
::
RELATIVE
,
suffix
.
data
()};
}
#endif
if
(
client
!=
nullptr
)
client
->
AllowFile
(
path
);
return
LocatedUri
(
LocatedUri
::
Type
::
PATH
,
uri
,
std
::
move
(
path
))
;
return
{
LocatedUri
::
Type
::
PATH
,
uri
,
std
::
move
(
path
)}
;
}
static
LocatedUri
...
...
@@ -90,8 +89,7 @@ LocateAbsoluteUri(UriPluginKind kind, const char *uri
const
auto
suffix
=
storage
->
MapToRelativeUTF8
(
uri
);
if
(
suffix
.
data
()
!=
nullptr
)
// TODO: don't use suffix.data() (ok for now because we know it's null-terminated)
return
LocatedUri
(
LocatedUri
::
Type
::
RELATIVE
,
suffix
.
data
());
return
{
LocatedUri
::
Type
::
RELATIVE
,
suffix
.
data
()};
}
if
(
kind
==
UriPluginKind
::
STORAGE
&&
...
...
@@ -99,7 +97,7 @@ LocateAbsoluteUri(UriPluginKind kind, const char *uri
throw
std
::
invalid_argument
(
"Unsupported URI scheme"
);
#endif
return
LocatedUri
(
LocatedUri
::
Type
::
ABSOLUTE
,
uri
)
;
return
{
LocatedUri
::
Type
::
ABSOLUTE
,
uri
}
;
}
LocatedUri
...
...
src/lib/curl/Escape.cxx
View file @
4e276256
...
...
@@ -60,7 +60,7 @@ CurlUnescape(CURL *curl, StringView src) noexcept
int
outlength
;
CurlString
tmp
(
curl_easy_unescape
(
curl
,
src
.
data
,
src
.
size
,
&
outlength
));
return
std
::
string
(
tmp
.
c_str
(),
outlength
)
;
return
{
tmp
.
c_str
(),
size_t
(
outlength
)}
;
}
std
::
string
...
...
src/pcm/LibsamplerateResampler.cxx
View file @
4e276256
...
...
@@ -140,8 +140,7 @@ LibsampleratePcmResampler::Resample2(ConstBuffer<float> src)
throw
FormatRuntimeError
(
"libsamplerate has failed: %s"
,
src_strerror
(
result
));
return
ConstBuffer
<
float
>
(
data
.
data_out
,
data
.
output_frames_gen
*
channels
);
return
{
data
.
data_out
,
size_t
(
data
.
output_frames_gen
*
channels
)};
}
ConstBuffer
<
void
>
...
...
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