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
a3963de6
Unverified
Commit
a3963de6
authored
Feb 02, 2020
by
Rosen Penev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[clang-tidy] change integer prefixes to uppercase
Found with readability-uppercase-literal-suffix Signed-off-by:
Rosen Penev
<
rosenp@gmail.com
>
parent
140d8547
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
31 additions
and
31 deletions
+31
-31
PlayerCommands.cxx
src/command/PlayerCommands.cxx
+1
-1
ProxyDatabasePlugin.cxx
src/db/plugins/ProxyDatabasePlugin.cxx
+2
-2
AdPlugDecoderPlugin.cxx
src/decoder/plugins/AdPlugDecoderPlugin.cxx
+1
-1
FluidsynthDecoderPlugin.cxx
src/decoder/plugins/FluidsynthDecoderPlugin.cxx
+1
-1
HybridDsdDecoderPlugin.cxx
src/decoder/plugins/HybridDsdDecoderPlugin.cxx
+2
-2
MikmodDecoderPlugin.cxx
src/decoder/plugins/MikmodDecoderPlugin.cxx
+1
-1
SidplayDecoderPlugin.cxx
src/decoder/plugins/SidplayDecoderPlugin.cxx
+2
-2
FlacEncoderPlugin.cxx
src/encoder/plugins/FlacEncoderPlugin.cxx
+1
-1
OpusEncoderPlugin.cxx
src/encoder/plugins/OpusEncoderPlugin.cxx
+1
-1
CdioParanoiaInputPlugin.cxx
src/input/plugins/CdioParanoiaInputPlugin.cxx
+1
-1
CurlInputPlugin.cxx
src/input/plugins/CurlInputPlugin.cxx
+6
-6
Request.cxx
src/lib/curl/Request.cxx
+1
-1
CaseFold.cxx
src/lib/icu/CaseFold.cxx
+1
-1
AlsaOutputPlugin.cxx
src/output/plugins/AlsaOutputPlugin.cxx
+1
-1
AoOutputPlugin.cxx
src/output/plugins/AoOutputPlugin.cxx
+1
-1
JackOutputPlugin.cxx
src/output/plugins/JackOutputPlugin.cxx
+1
-1
ShoutOutputPlugin.cxx
src/output/plugins/ShoutOutputPlugin.cxx
+1
-1
HttpdOutputPlugin.cxx
src/output/plugins/httpd/HttpdOutputPlugin.cxx
+2
-2
CurlStorage.cxx
src/storage/plugins/CurlStorage.cxx
+2
-2
UTF8.cxx
src/util/UTF8.cxx
+2
-2
No files found.
src/command/PlayerCommands.cxx
View file @
a3963de6
...
...
@@ -174,7 +174,7 @@ handle_status(Client &client, gcc_unused Request args, Response &r)
COMMAND_STATUS_BITRATE
": %u
\n
"
,
player_status
.
elapsed_time
.
RoundS
(),
player_status
.
total_time
.
IsNegative
()
?
0
u
?
0
U
:
unsigned
(
player_status
.
total_time
.
RoundS
()),
player_status
.
elapsed_time
.
ToDoubleS
(),
player_status
.
bit_rate
);
...
...
src/db/plugins/ProxyDatabasePlugin.cxx
View file @
a3963de6
...
...
@@ -448,7 +448,7 @@ ProxyDatabase::ProxyDatabase(EventLoop &_loop, DatabaseListener &_listener,
listener
(
_listener
),
host
(
block
.
GetBlockValue
(
"host"
,
""
)),
password
(
block
.
GetBlockValue
(
"password"
,
""
)),
port
(
block
.
GetBlockValue
(
"port"
,
0
u
)),
port
(
block
.
GetBlockValue
(
"port"
,
0
U
)),
keepalive
(
block
.
GetBlockValue
(
"keepalive"
,
false
))
{
}
...
...
@@ -517,7 +517,7 @@ ProxyDatabase::Connect()
(
void
)
keepalive
;
#endif
idle_received
=
~
0
u
;
idle_received
=
~
0
U
;
is_idle
=
false
;
SocketMonitor
::
Open
(
SocketDescriptor
(
mpd_async_get_fd
(
mpd_connection_get_async
(
connection
))));
...
...
src/decoder/plugins/AdPlugDecoderPlugin.cxx
View file @
a3963de6
...
...
@@ -41,7 +41,7 @@ adplug_init(const ConfigBlock &block)
FormatDebug
(
adplug_domain
,
"adplug %s"
,
CAdPlug
::
get_version
().
c_str
());
sample_rate
=
block
.
GetPositiveValue
(
"sample_rate"
,
48000
u
);
sample_rate
=
block
.
GetPositiveValue
(
"sample_rate"
,
48000
U
);
CheckSampleRate
(
sample_rate
);
return
true
;
...
...
src/decoder/plugins/FluidsynthDecoderPlugin.cxx
View file @
a3963de6
...
...
@@ -77,7 +77,7 @@ fluidsynth_mpd_log_function(int level,
static
bool
fluidsynth_init
(
const
ConfigBlock
&
block
)
{
sample_rate
=
block
.
GetPositiveValue
(
"sample_rate"
,
48000
u
);
sample_rate
=
block
.
GetPositiveValue
(
"sample_rate"
,
48000
U
);
CheckSampleRate
(
sample_rate
);
soundfont_path
=
block
.
GetBlockValue
(
"soundfont"
,
...
...
src/decoder/plugins/HybridDsdDecoderPlugin.cxx
View file @
a3963de6
...
...
@@ -186,7 +186,7 @@ HybridDsdDecode(DecoderClient &client, InputStream &input)
client
.
Ready
(
result
.
first
,
true
,
duration
);
frame_size
=
result
.
first
.
GetFrameSize
();
kbit_rate
=
frame_size
*
result
.
first
.
sample_rate
/
(
1024
u
/
8u
);
(
1024
U
/
8U
);
total_frames
=
result
.
second
/
frame_size
;
}
catch
(
UnsupportedFile
)
{
/* not a Hybrid-DSD file; let the next decoder plugin
...
...
@@ -236,7 +236,7 @@ HybridDsdDecode(DecoderClient &client, InputStream &input)
/* fill the buffer */
auto
w
=
buffer
.
Write
();
if
(
!
w
.
empty
())
{
if
(
remaining_bytes
<
(
1
<<
30
ull
)
&&
if
(
remaining_bytes
<
(
1
<<
30
ULL
)
&&
w
.
size
>
size_t
(
remaining_bytes
))
w
.
size
=
remaining_bytes
;
...
...
src/decoder/plugins/MikmodDecoderPlugin.cxx
View file @
a3963de6
...
...
@@ -108,7 +108,7 @@ mikmod_decoder_init(const ConfigBlock &block)
static
char
params
[]
=
""
;
mikmod_loop
=
block
.
GetBlockValue
(
"loop"
,
false
);
mikmod_sample_rate
=
block
.
GetPositiveValue
(
"sample_rate"
,
44100
u
);
mikmod_sample_rate
=
block
.
GetPositiveValue
(
"sample_rate"
,
44100
U
);
if
(
!
audio_valid_sample_rate
(
mikmod_sample_rate
))
throw
FormatRuntimeError
(
"Invalid sample rate in line %d: %u"
,
block
.
line
,
mikmod_sample_rate
);
...
...
src/decoder/plugins/SidplayDecoderPlugin.cxx
View file @
a3963de6
...
...
@@ -127,7 +127,7 @@ SidplayGlobal::SidplayGlobal(const ConfigBlock &block)
if
(
!
database_path
.
IsNull
())
songlength_database
=
sidplay_load_songlength_db
(
database_path
);
default_songlength
=
block
.
GetPositiveValue
(
"default_songlength"
,
0
u
);
default_songlength
=
block
.
GetPositiveValue
(
"default_songlength"
,
0
U
);
default_genre
=
block
.
GetBlockValue
(
"default_genre"
,
""
);
...
...
@@ -403,7 +403,7 @@ sidplay_file_decode(DecoderClient &client, Path path_fs)
const
unsigned
timebase
=
player
.
timebase
();
#endif
const
unsigned
end
=
duration
.
IsNegative
()
?
0
u
?
0
U
:
duration
.
ToScale
<
uint64_t
>
(
timebase
);
DecoderCommand
cmd
;
...
...
src/encoder/plugins/FlacEncoderPlugin.cxx
View file @
a3963de6
...
...
@@ -93,7 +93,7 @@ public:
};
PreparedFlacEncoder
::
PreparedFlacEncoder
(
const
ConfigBlock
&
block
)
:
compression
(
block
.
GetBlockValue
(
"compression"
,
5
u
))
:
compression
(
block
.
GetBlockValue
(
"compression"
,
5
U
))
{
}
...
...
src/encoder/plugins/OpusEncoderPlugin.cxx
View file @
a3963de6
...
...
@@ -105,7 +105,7 @@ PreparedOpusEncoder::PreparedOpusEncoder(const ConfigBlock &block)
throw
std
::
runtime_error
(
"Invalid bit rate"
);
}
complexity
=
block
.
GetBlockValue
(
"complexity"
,
10
u
);
complexity
=
block
.
GetBlockValue
(
"complexity"
,
10
U
);
if
(
complexity
>
10
)
throw
std
::
runtime_error
(
"Invalid complexity"
);
...
...
src/input/plugins/CdioParanoiaInputPlugin.cxx
View file @
a3963de6
...
...
@@ -112,7 +112,7 @@ input_cdio_init(EventLoop &, const ConfigBlock &block)
throw
FormatRuntimeError
(
"Unrecognized 'default_byte_order' setting: %s"
,
value
);
}
speed
=
block
.
GetBlockValue
(
"speed"
,
0
u
);
speed
=
block
.
GetBlockValue
(
"speed"
,
0
U
);
}
struct
CdioUri
{
...
...
src/input/plugins/CurlInputPlugin.cxx
View file @
a3963de6
...
...
@@ -364,7 +364,7 @@ input_curl_init(EventLoop &event_loop, const ConfigBlock &block)
http_200_aliases
=
curl_slist_append
(
http_200_aliases
,
"ICY 200 OK"
);
proxy
=
block
.
GetBlockValue
(
"proxy"
);
proxy_port
=
block
.
GetBlockValue
(
"proxy_port"
,
0
u
);
proxy_port
=
block
.
GetBlockValue
(
"proxy_port"
,
0
U
);
proxy_user
=
block
.
GetBlockValue
(
"proxy_user"
);
proxy_password
=
block
.
GetBlockValue
(
"proxy_password"
);
...
...
@@ -409,9 +409,9 @@ CurlInputStream::InitEasy()
request
=
new
CurlRequest
(
**
curl_init
,
GetURI
(),
*
this
);
request
->
SetOption
(
CURLOPT_HTTP200ALIASES
,
http_200_aliases
);
request
->
SetOption
(
CURLOPT_FOLLOWLOCATION
,
1
l
);
request
->
SetOption
(
CURLOPT_MAXREDIRS
,
5
l
);
request
->
SetOption
(
CURLOPT_FAILONERROR
,
1
l
);
request
->
SetOption
(
CURLOPT_FOLLOWLOCATION
,
1
L
);
request
->
SetOption
(
CURLOPT_MAXREDIRS
,
5
L
);
request
->
SetOption
(
CURLOPT_FAILONERROR
,
1
L
);
if
(
proxy
!=
nullptr
)
request
->
SetOption
(
CURLOPT_PROXY
,
proxy
);
...
...
@@ -424,8 +424,8 @@ CurlInputStream::InitEasy()
StringFormat
<
1024
>
(
"%s:%s"
,
proxy_user
,
proxy_password
).
c_str
());
request
->
SetOption
(
CURLOPT_SSL_VERIFYPEER
,
verify_peer
?
1
l
:
0l
);
request
->
SetOption
(
CURLOPT_SSL_VERIFYHOST
,
verify_host
?
2
l
:
0l
);
request
->
SetOption
(
CURLOPT_SSL_VERIFYPEER
,
verify_peer
?
1
L
:
0L
);
request
->
SetOption
(
CURLOPT_SSL_VERIFYHOST
,
verify_host
?
2
L
:
0L
);
request
->
SetOption
(
CURLOPT_HTTPHEADER
,
request_headers
.
Get
());
}
...
...
src/lib/curl/Request.cxx
View file @
a3963de6
...
...
@@ -56,7 +56,7 @@ CurlRequest::CurlRequest(CurlGlobal &_global,
easy
.
SetUserAgent
(
"Music Player Daemon "
VERSION
);
easy
.
SetHeaderFunction
(
_HeaderFunction
,
this
);
easy
.
SetWriteFunction
(
WriteFunction
,
this
);
easy
.
SetOption
(
CURLOPT_NETRC
,
1
l
);
easy
.
SetOption
(
CURLOPT_NETRC
,
1
L
);
easy
.
SetErrorBuffer
(
error_buffer
);
easy
.
SetNoProgress
();
easy
.
SetNoSignal
();
...
...
src/lib/icu/CaseFold.cxx
View file @
a3963de6
...
...
@@ -58,7 +58,7 @@ try {
if
(
u
.
IsNull
())
return
AllocatedString
<>::
Duplicate
(
src
);
AllocatedArray
<
UChar
>
folded
(
u
.
size
()
*
2
u
);
AllocatedArray
<
UChar
>
folded
(
u
.
size
()
*
2
U
);
UErrorCode
error_code
=
U_ZERO_ERROR
;
size_t
folded_length
=
u_strFoldCase
(
folded
.
begin
(),
folded
.
size
(),
...
...
src/output/plugins/AlsaOutputPlugin.cxx
View file @
a3963de6
...
...
@@ -404,7 +404,7 @@ AlsaOutput::AlsaOutput(EventLoop &_loop, const ConfigBlock &block)
#endif
buffer_time
(
block
.
GetPositiveValue
(
"buffer_time"
,
MPD_ALSA_BUFFER_TIME_US
)),
period_time
(
block
.
GetPositiveValue
(
"period_time"
,
0
u
))
period_time
(
block
.
GetPositiveValue
(
"period_time"
,
0
U
))
{
#ifdef SND_PCM_NO_AUTO_RESAMPLE
if
(
!
block
.
GetBlockValue
(
"auto_resample"
,
true
))
...
...
src/output/plugins/AoOutputPlugin.cxx
View file @
a3963de6
...
...
@@ -101,7 +101,7 @@ MakeAoError()
AoOutput
::
AoOutput
(
const
ConfigBlock
&
block
)
:
AudioOutput
(
0
),
write_size
(
block
.
GetPositiveValue
(
"write_size"
,
1024
u
))
write_size
(
block
.
GetPositiveValue
(
"write_size"
,
1024
U
))
{
const
char
*
value
=
block
.
GetBlockValue
(
"driver"
,
"default"
);
if
(
StringIsEqual
(
value
,
"default"
))
...
...
src/output/plugins/JackOutputPlugin.cxx
View file @
a3963de6
...
...
@@ -247,7 +247,7 @@ JackOutput::JackOutput(const ConfigBlock &block)
num_source_ports
,
num_destination_ports
,
block
.
line
);
ringbuffer_size
=
block
.
GetPositiveValue
(
"ringbuffer_size"
,
32768
u
);
ringbuffer_size
=
block
.
GetPositiveValue
(
"ringbuffer_size"
,
32768
U
);
}
inline
jack_nframes_t
...
...
src/output/plugins/ShoutOutputPlugin.cxx
View file @
a3963de6
...
...
@@ -99,7 +99,7 @@ ShoutOutput::ShoutOutput(const ConfigBlock &block)
{
const
char
*
host
=
require_block_string
(
block
,
"host"
);
const
char
*
mount
=
require_block_string
(
block
,
"mount"
);
unsigned
port
=
block
.
GetBlockValue
(
"port"
,
0
u
);
unsigned
port
=
block
.
GetBlockValue
(
"port"
,
0
U
);
if
(
port
==
0
)
throw
std
::
runtime_error
(
"shout port must be configured"
);
...
...
src/output/plugins/httpd/HttpdOutputPlugin.cxx
View file @
a3963de6
...
...
@@ -50,11 +50,11 @@ HttpdOutput::HttpdOutput(EventLoop &_loop, const ConfigBlock &block)
genre
=
block
.
GetBlockValue
(
"genre"
,
"Set genre in config"
);
website
=
block
.
GetBlockValue
(
"website"
,
"Set website in config"
);
clients_max
=
block
.
GetBlockValue
(
"max_clients"
,
0
u
);
clients_max
=
block
.
GetBlockValue
(
"max_clients"
,
0
U
);
/* set up bind_to_address */
ServerSocketAddGeneric
(
*
this
,
block
.
GetBlockValue
(
"bind_to_address"
),
block
.
GetBlockValue
(
"port"
,
8000
u
));
ServerSocketAddGeneric
(
*
this
,
block
.
GetBlockValue
(
"bind_to_address"
),
block
.
GetBlockValue
(
"port"
,
8000
U
));
/* determine content type */
content_type
=
prepared_encoder
->
GetMimeType
();
...
...
src/storage/plugins/CurlStorage.cxx
View file @
a3963de6
...
...
@@ -261,8 +261,8 @@ public:
CommonExpatParser
(
ExpatNamespaceSeparator
{
'|'
})
{
request
.
SetOption
(
CURLOPT_CUSTOMREQUEST
,
"PROPFIND"
);
request
.
SetOption
(
CURLOPT_FOLLOWLOCATION
,
1
l
);
request
.
SetOption
(
CURLOPT_MAXREDIRS
,
1
l
);
request
.
SetOption
(
CURLOPT_FOLLOWLOCATION
,
1
L
);
request
.
SetOption
(
CURLOPT_MAXREDIRS
,
1
L
);
request_headers
.
Append
(
StringFormat
<
40
>
(
"depth: %u"
,
depth
));
...
...
src/util/UTF8.cxx
View file @
a3963de6
...
...
@@ -204,7 +204,7 @@ struct CheckSequenceUTF8 {
};
template
<>
struct
CheckSequenceUTF8
<
0
u
>
{
struct
CheckSequenceUTF8
<
0
U
>
{
constexpr
bool
operator
()(
gcc_unused
const
char
*
p
)
const
noexcept
{
return
true
;
}
...
...
@@ -217,7 +217,7 @@ InnerSequenceLengthUTF8(const char *p) noexcept
{
return
CheckSequenceUTF8
<
L
>
()(
p
)
?
L
+
1
:
0
u
;
:
0
U
;
}
size_t
...
...
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