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
f00f8b00
Unverified
Commit
f00f8b00
authored
Mar 11, 2020
by
Rosen Penev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[clang-tidy] use nodiscard
Introduced in C++17. It replaces gcc's warn_unused_result. Found with modernize-use-nodiscard. Signed-off-by:
Rosen Penev
<
rosenp@gmail.com
>
parent
2229e866
Hide whitespace changes
Inline
Side-by-side
Showing
37 changed files
with
58 additions
and
58 deletions
+58
-58
Bzip2ArchivePlugin.cxx
src/archive/plugins/Bzip2ArchivePlugin.cxx
+1
-1
Iso9660ArchivePlugin.cxx
src/archive/plugins/Iso9660ArchivePlugin.cxx
+1
-1
ZzipArchivePlugin.cxx
src/archive/plugins/ZzipArchivePlugin.cxx
+1
-1
ProxyDatabasePlugin.cxx
src/db/plugins/ProxyDatabasePlugin.cxx
+1
-1
UpnpDatabasePlugin.cxx
src/db/plugins/upnp/UpnpDatabasePlugin.cxx
+4
-4
InotifyUpdate.cxx
src/db/update/InotifyUpdate.cxx
+2
-2
DsdiffDecoderPlugin.cxx
src/decoder/plugins/DsdiffDecoderPlugin.cxx
+1
-1
MadDecoderPlugin.cxx
src/decoder/plugins/MadDecoderPlugin.cxx
+3
-3
OpusDecoderPlugin.cxx
src/decoder/plugins/OpusDecoderPlugin.cxx
+1
-1
VorbisDecoderPlugin.cxx
src/decoder/plugins/VorbisDecoderPlugin.cxx
+1
-1
WavpackDecoderPlugin.cxx
src/decoder/plugins/WavpackDecoderPlugin.cxx
+3
-3
FlacEncoderPlugin.cxx
src/encoder/plugins/FlacEncoderPlugin.cxx
+1
-1
LameEncoderPlugin.cxx
src/encoder/plugins/LameEncoderPlugin.cxx
+1
-1
OpusEncoderPlugin.cxx
src/encoder/plugins/OpusEncoderPlugin.cxx
+1
-1
TwolameEncoderPlugin.cxx
src/encoder/plugins/TwolameEncoderPlugin.cxx
+1
-1
VorbisEncoderPlugin.cxx
src/encoder/plugins/VorbisEncoderPlugin.cxx
+1
-1
WaveEncoderPlugin.cxx
src/encoder/plugins/WaveEncoderPlugin.cxx
+1
-1
ServerSocket.cxx
src/event/ServerSocket.cxx
+2
-2
VolumeFilterPlugin.cxx
src/filter/plugins/VolumeFilterPlugin.cxx
+1
-1
RewindInputStream.cxx
src/input/RewindInputStream.cxx
+2
-2
AlsaInputPlugin.cxx
src/input/plugins/AlsaInputPlugin.cxx
+6
-6
CdioParanoiaInputPlugin.cxx
src/input/plugins/CdioParanoiaInputPlugin.cxx
+1
-1
FfmpegInputPlugin.cxx
src/input/plugins/FfmpegInputPlugin.cxx
+1
-1
FileInputPlugin.cxx
src/input/plugins/FileInputPlugin.cxx
+1
-1
SmbclientInputPlugin.cxx
src/input/plugins/SmbclientInputPlugin.cxx
+1
-1
SmbclientNeighborPlugin.cxx
src/neighbor/plugins/SmbclientNeighborPlugin.cxx
+1
-1
UpnpNeighborPlugin.cxx
src/neighbor/plugins/UpnpNeighborPlugin.cxx
+2
-2
FifoOutputPlugin.cxx
src/output/plugins/FifoOutputPlugin.cxx
+1
-1
NullOutputPlugin.cxx
src/output/plugins/NullOutputPlugin.cxx
+1
-1
OpenALOutputPlugin.cxx
src/output/plugins/OpenALOutputPlugin.cxx
+4
-4
PulseOutputPlugin.cxx
src/output/plugins/PulseOutputPlugin.cxx
+1
-1
RecorderOutputPlugin.cxx
src/output/plugins/RecorderOutputPlugin.cxx
+1
-1
ShoutOutputPlugin.cxx
src/output/plugins/ShoutOutputPlugin.cxx
+1
-1
Mix.hxx
src/pcm/Mix.hxx
+1
-1
Thread.cxx
src/player/Thread.cxx
+2
-2
CurlStorage.cxx
src/storage/plugins/CurlStorage.cxx
+1
-1
NfsStorage.cxx
src/storage/plugins/NfsStorage.cxx
+2
-2
No files found.
src/archive/plugins/Bzip2ArchivePlugin.cxx
View file @
f00f8b00
...
...
@@ -72,7 +72,7 @@ public:
~
Bzip2InputStream
()
override
;
/* virtual methods from InputStream */
bool
IsEOF
()
const
noexcept
override
;
[[
nodiscard
]]
bool
IsEOF
()
const
noexcept
override
;
size_t
Read
(
std
::
unique_lock
<
Mutex
>
&
lock
,
void
*
ptr
,
size_t
size
)
override
;
...
...
src/archive/plugins/Iso9660ArchivePlugin.cxx
View file @
f00f8b00
...
...
@@ -167,7 +167,7 @@ public:
}
/* virtual methods from InputStream */
bool
IsEOF
()
const
noexcept
override
;
[[
nodiscard
]]
bool
IsEOF
()
const
noexcept
override
;
size_t
Read
(
std
::
unique_lock
<
Mutex
>
&
lock
,
void
*
ptr
,
size_t
size
)
override
;
...
...
src/archive/plugins/ZzipArchivePlugin.cxx
View file @
f00f8b00
...
...
@@ -111,7 +111,7 @@ public:
}
/* virtual methods from InputStream */
bool
IsEOF
()
const
noexcept
override
;
[[
nodiscard
]]
bool
IsEOF
()
const
noexcept
override
;
size_t
Read
(
std
::
unique_lock
<
Mutex
>
&
lock
,
void
*
ptr
,
size_t
size
)
override
;
void
Seek
(
std
::
unique_lock
<
Mutex
>
&
lock
,
offset_type
offset
)
override
;
...
...
src/db/plugins/ProxyDatabasePlugin.cxx
View file @
f00f8b00
...
...
@@ -61,7 +61,7 @@ public:
LibmpdclientError
(
enum
mpd_error
_code
,
const
char
*
_msg
)
:
std
::
runtime_error
(
_msg
),
code
(
_code
)
{}
enum
mpd_error
GetCode
()
const
{
[[
nodiscard
]]
enum
mpd_error
GetCode
()
const
{
return
code
;
}
};
...
...
src/db/plugins/upnp/UpnpDatabasePlugin.cxx
View file @
f00f8b00
...
...
@@ -95,12 +95,12 @@ public:
VisitSong
visit_song
,
VisitPlaylist
visit_playlist
)
const
override
;
RecursiveMap
<
std
::
string
>
CollectUniqueTags
(
const
DatabaseSelection
&
selection
,
[[
nodiscard
]]
RecursiveMap
<
std
::
string
>
CollectUniqueTags
(
const
DatabaseSelection
&
selection
,
ConstBuffer
<
TagType
>
tag_types
)
const
override
;
DatabaseStats
GetStats
(
const
DatabaseSelection
&
selection
)
const
override
;
[[
nodiscard
]]
DatabaseStats
GetStats
(
const
DatabaseSelection
&
selection
)
const
override
;
std
::
chrono
::
system_clock
::
time_point
GetUpdateStamp
()
const
noexcept
override
{
[[
nodiscard
]]
std
::
chrono
::
system_clock
::
time_point
GetUpdateStamp
()
const
noexcept
override
{
return
std
::
chrono
::
system_clock
::
time_point
::
min
();
}
...
...
@@ -139,7 +139,7 @@ private:
* except easier cause our inodes have a parent id. Not used
* any more actually (see comments in SearchSongs).
*/
std
::
string
BuildPath
(
const
ContentDirectoryService
&
server
,
[[
nodiscard
]]
std
::
string
BuildPath
(
const
ContentDirectoryService
&
server
,
const
UPnPDirObject
&
dirent
)
const
;
};
...
...
src/db/update/InotifyUpdate.cxx
View file @
f00f8b00
...
...
@@ -61,10 +61,10 @@ struct WatchDirectory {
WatchDirectory
(
const
WatchDirectory
&
)
=
delete
;
WatchDirectory
&
operator
=
(
const
WatchDirectory
&
)
=
delete
;
gcc_pure
[[
nodiscard
]]
gcc_pure
unsigned
GetDepth
()
const
noexcept
;
gcc_pure
[[
nodiscard
]]
gcc_pure
AllocatedPath
GetUriFS
()
const
noexcept
;
};
...
...
src/decoder/plugins/DsdiffDecoderPlugin.cxx
View file @
f00f8b00
...
...
@@ -51,7 +51,7 @@ struct DsdiffChunkHeader {
* Read the "size" attribute from the specified header, converting it
* to the host byte order if needed.
*/
constexpr
[[
nodiscard
]]
constexpr
uint64_t
GetSize
()
const
{
return
size
.
Read
();
}
...
...
src/decoder/plugins/MadDecoderPlugin.cxx
View file @
f00f8b00
...
...
@@ -146,10 +146,10 @@ private:
void
ParseId3
(
size_t
tagsize
,
Tag
*
tag
)
noexcept
;
MadDecoderAction
DecodeNextFrame
(
bool
skip
,
Tag
*
tag
)
noexcept
;
gcc_pure
[[
nodiscard
]]
gcc_pure
offset_type
ThisFrameOffset
()
const
noexcept
;
gcc_pure
[[
nodiscard
]]
gcc_pure
offset_type
RestIncludingThisFrame
()
const
noexcept
;
/**
...
...
@@ -168,7 +168,7 @@ private:
times
=
new
mad_timer_t
[
max_frames
];
}
gcc_pure
[[
nodiscard
]]
gcc_pure
size_t
TimeToFrame
(
SongTime
t
)
const
noexcept
;
/**
...
...
src/decoder/plugins/OpusDecoderPlugin.cxx
View file @
f00f8b00
...
...
@@ -94,7 +94,7 @@ public:
/**
* Has DecoderClient::Ready() been called yet?
*/
bool
IsInitialized
()
const
{
[[
nodiscard
]]
bool
IsInitialized
()
const
{
return
previous_channels
!=
0
;
}
...
...
src/decoder/plugins/VorbisDecoderPlugin.cxx
View file @
f00f8b00
...
...
@@ -86,7 +86,7 @@ public:
return
::
CheckAudioFormat
(
vi
.
rate
,
sample_format
,
vi
.
channels
);
}
AudioFormat
CheckAudioFormat
()
const
{
[[
nodiscard
]]
AudioFormat
CheckAudioFormat
()
const
{
return
CheckAudioFormat
(
vi
);
}
...
...
src/decoder/plugins/WavpackDecoderPlugin.cxx
View file @
f00f8b00
...
...
@@ -291,7 +291,7 @@ struct WavpackInput {
int32_t
ReadBytes
(
void
*
data
,
size_t
bcount
);
InputStream
::
offset_type
GetPos
()
const
{
[[
nodiscard
]]
InputStream
::
offset_type
GetPos
()
const
{
return
is
.
GetOffset
();
}
...
...
@@ -337,14 +337,14 @@ struct WavpackInput {
}
}
InputStream
::
offset_type
GetLength
()
const
{
[[
nodiscard
]]
InputStream
::
offset_type
GetLength
()
const
{
if
(
!
is
.
KnownSize
())
return
0
;
return
is
.
GetSize
();
}
bool
CanSeek
()
const
{
[[
nodiscard
]]
bool
CanSeek
()
const
{
return
is
.
IsSeekable
();
}
};
...
...
src/encoder/plugins/FlacEncoderPlugin.cxx
View file @
f00f8b00
...
...
@@ -87,7 +87,7 @@ public:
/* virtual methods from class PreparedEncoder */
Encoder
*
Open
(
AudioFormat
&
audio_format
)
override
;
const
char
*
GetMimeType
()
const
noexcept
override
{
[[
nodiscard
]]
const
char
*
GetMimeType
()
const
noexcept
override
{
return
"audio/flac"
;
}
};
...
...
src/encoder/plugins/LameEncoderPlugin.cxx
View file @
f00f8b00
...
...
@@ -62,7 +62,7 @@ public:
/* virtual methods from class PreparedEncoder */
Encoder
*
Open
(
AudioFormat
&
audio_format
)
override
;
const
char
*
GetMimeType
()
const
noexcept
override
{
[[
nodiscard
]]
const
char
*
GetMimeType
()
const
noexcept
override
{
return
"audio/mpeg"
;
}
};
...
...
src/encoder/plugins/OpusEncoderPlugin.cxx
View file @
f00f8b00
...
...
@@ -84,7 +84,7 @@ public:
/* virtual methods from class PreparedEncoder */
Encoder
*
Open
(
AudioFormat
&
audio_format
)
override
;
const
char
*
GetMimeType
()
const
noexcept
override
{
[[
nodiscard
]]
const
char
*
GetMimeType
()
const
noexcept
override
{
return
"audio/ogg"
;
}
};
...
...
src/encoder/plugins/TwolameEncoderPlugin.cxx
View file @
f00f8b00
...
...
@@ -78,7 +78,7 @@ public:
/* virtual methods from class PreparedEncoder */
Encoder
*
Open
(
AudioFormat
&
audio_format
)
override
;
const
char
*
GetMimeType
()
const
noexcept
override
{
[[
nodiscard
]]
const
char
*
GetMimeType
()
const
noexcept
override
{
return
"audio/mpeg"
;
}
};
...
...
src/encoder/plugins/VorbisEncoderPlugin.cxx
View file @
f00f8b00
...
...
@@ -70,7 +70,7 @@ public:
/* virtual methods from class PreparedEncoder */
Encoder
*
Open
(
AudioFormat
&
audio_format
)
override
;
const
char
*
GetMimeType
()
const
noexcept
override
{
[[
nodiscard
]]
const
char
*
GetMimeType
()
const
noexcept
override
{
return
"audio/ogg"
;
}
};
...
...
src/encoder/plugins/WaveEncoderPlugin.cxx
View file @
f00f8b00
...
...
@@ -49,7 +49,7 @@ class PreparedWaveEncoder final : public PreparedEncoder {
return
new
WaveEncoder
(
audio_format
);
}
const
char
*
GetMimeType
()
const
noexcept
override
{
[[
nodiscard
]]
const
char
*
GetMimeType
()
const
noexcept
override
{
return
"audio/wav"
;
}
};
...
...
src/event/ServerSocket.cxx
View file @
f00f8b00
...
...
@@ -77,7 +77,7 @@ public:
Close
();
}
unsigned
GetSerial
()
const
noexcept
{
[[
nodiscard
]]
unsigned
GetSerial
()
const
noexcept
{
return
serial
;
}
...
...
@@ -94,7 +94,7 @@ public:
using
SocketMonitor
::
IsDefined
;
using
SocketMonitor
::
Close
;
gcc_pure
[[
nodiscard
]]
gcc_pure
std
::
string
ToString
()
const
noexcept
{
return
::
ToString
(
address
);
}
...
...
src/filter/plugins/VolumeFilterPlugin.cxx
View file @
f00f8b00
...
...
@@ -34,7 +34,7 @@ public:
true
);
}
unsigned
GetVolume
()
const
noexcept
{
[[
nodiscard
]]
unsigned
GetVolume
()
const
noexcept
{
return
pv
.
GetVolume
();
}
...
...
src/input/RewindInputStream.cxx
View file @
f00f8b00
...
...
@@ -56,7 +56,7 @@ public:
ProxyInputStream
::
Update
();
}
bool
IsEOF
()
const
noexcept
override
{
[[
nodiscard
]]
bool
IsEOF
()
const
noexcept
override
{
return
!
ReadingFromBuffer
()
&&
ProxyInputStream
::
IsEOF
();
}
...
...
@@ -69,7 +69,7 @@ private:
* Are we currently reading from the buffer, and does the
* buffer contain more data for the next read operation?
*/
bool
ReadingFromBuffer
()
const
noexcept
{
[[
nodiscard
]]
bool
ReadingFromBuffer
()
const
noexcept
{
return
tail
>
0
&&
offset
<
input
->
GetOffset
();
}
};
...
...
src/input/plugins/AlsaInputPlugin.cxx
View file @
f00f8b00
...
...
@@ -160,22 +160,22 @@ public:
audio_format
=
ParseAudioFormat
(
format_string
,
false
);
}
}
bool
IsValidScheme
()
const
noexcept
{
[[
nodiscard
]]
bool
IsValidScheme
()
const
noexcept
{
return
device_name
!=
nullptr
;
}
bool
IsValid
()
const
noexcept
{
[[
nodiscard
]]
bool
IsValid
()
const
noexcept
{
return
(
device_name
!=
nullptr
)
&&
(
format_string
!=
nullptr
);
}
const
char
*
GetURI
()
const
noexcept
{
[[
nodiscard
]]
const
char
*
GetURI
()
const
noexcept
{
return
uri
;
}
const
char
*
GetDeviceName
()
const
noexcept
{
[[
nodiscard
]]
const
char
*
GetDeviceName
()
const
noexcept
{
return
device_name
;
}
const
char
*
GetFormatString
()
const
noexcept
{
[[
nodiscard
]]
const
char
*
GetFormatString
()
const
noexcept
{
return
format_string
;
}
AudioFormat
GetAudioFormat
()
const
noexcept
{
[[
nodiscard
]]
AudioFormat
GetAudioFormat
()
const
noexcept
{
return
audio_format
;
}
};
...
...
src/input/plugins/CdioParanoiaInputPlugin.cxx
View file @
f00f8b00
...
...
@@ -88,7 +88,7 @@ class CdioParanoiaInputStream final : public InputStream {
}
/* virtual methods from InputStream */
bool
IsEOF
()
const
noexcept
override
;
[[
nodiscard
]]
bool
IsEOF
()
const
noexcept
override
;
size_t
Read
(
std
::
unique_lock
<
Mutex
>
&
lock
,
void
*
ptr
,
size_t
size
)
override
;
void
Seek
(
std
::
unique_lock
<
Mutex
>
&
lock
,
offset_type
offset
)
override
;
...
...
src/input/plugins/FfmpegInputPlugin.cxx
View file @
f00f8b00
...
...
@@ -47,7 +47,7 @@ public:
}
/* virtual methods from InputStream */
bool
IsEOF
()
const
noexcept
override
;
[[
nodiscard
]]
bool
IsEOF
()
const
noexcept
override
;
size_t
Read
(
std
::
unique_lock
<
Mutex
>
&
lock
,
void
*
ptr
,
size_t
size
)
override
;
void
Seek
(
std
::
unique_lock
<
Mutex
>
&
lock
,
...
...
src/input/plugins/FileInputPlugin.cxx
View file @
f00f8b00
...
...
@@ -43,7 +43,7 @@ public:
/* virtual methods from InputStream */
bool
IsEOF
()
const
noexcept
override
{
[[
nodiscard
]]
bool
IsEOF
()
const
noexcept
override
{
return
GetOffset
()
>=
GetSize
();
}
...
...
src/input/plugins/SmbclientInputPlugin.cxx
View file @
f00f8b00
...
...
@@ -51,7 +51,7 @@ public:
/* virtual methods from InputStream */
bool
IsEOF
()
const
noexcept
override
{
[[
nodiscard
]]
bool
IsEOF
()
const
noexcept
override
{
return
offset
>=
size
;
}
...
...
src/neighbor/plugins/SmbclientNeighborPlugin.cxx
View file @
f00f8b00
...
...
@@ -50,7 +50,7 @@ class SmbclientNeighborExplorer final : public NeighborExplorer {
return
name
==
other
.
name
;
}
gcc_pure
[[
nodiscard
]]
gcc_pure
NeighborInfo
Export
()
const
noexcept
{
return
{
"smb://"
+
name
+
"/"
,
comment
};
}
...
...
src/neighbor/plugins/UpnpNeighborPlugin.cxx
View file @
f00f8b00
...
...
@@ -44,7 +44,7 @@ class UpnpNeighborExplorer final
return
name
==
other
.
name
;
}
gcc_pure
[[
nodiscard
]]
gcc_pure
NeighborInfo
Export
()
const
noexcept
{
return
{
"smb://"
+
name
+
"/"
,
comment
};
}
...
...
@@ -62,7 +62,7 @@ public:
/* virtual methods from class NeighborExplorer */
void
Open
()
override
;
void
Close
()
noexcept
override
;
List
GetList
()
const
noexcept
override
;
[[
nodiscard
]]
List
GetList
()
const
noexcept
override
;
private
:
/* virtual methods from class UPnPDiscoveryListener */
...
...
src/output/plugins/FifoOutputPlugin.cxx
View file @
f00f8b00
...
...
@@ -64,7 +64,7 @@ private:
void
Open
(
AudioFormat
&
audio_format
)
override
;
void
Close
()
noexcept
override
;
std
::
chrono
::
steady_clock
::
duration
Delay
()
const
noexcept
override
;
[[
nodiscard
]]
std
::
chrono
::
steady_clock
::
duration
Delay
()
const
noexcept
override
;
size_t
Play
(
const
void
*
chunk
,
size_t
size
)
override
;
void
Cancel
()
noexcept
override
;
};
...
...
src/output/plugins/NullOutputPlugin.cxx
View file @
f00f8b00
...
...
@@ -47,7 +47,7 @@ private:
delete
timer
;
}
std
::
chrono
::
steady_clock
::
duration
Delay
()
const
noexcept
override
{
[[
nodiscard
]]
std
::
chrono
::
steady_clock
::
duration
Delay
()
const
noexcept
override
{
return
sync
&&
timer
->
IsStarted
()
?
timer
->
GetDelay
()
:
std
::
chrono
::
steady_clock
::
duration
::
zero
();
...
...
src/output/plugins/OpenALOutputPlugin.cxx
View file @
f00f8b00
...
...
@@ -56,7 +56,7 @@ private:
void
Open
(
AudioFormat
&
audio_format
)
override
;
void
Close
()
noexcept
override
;
gcc_pure
[[
nodiscard
]]
gcc_pure
std
::
chrono
::
steady_clock
::
duration
Delay
()
const
noexcept
override
{
return
filled
<
NUM_BUFFERS
||
HasProcessed
()
?
std
::
chrono
::
steady_clock
::
duration
::
zero
()
...
...
@@ -71,19 +71,19 @@ private:
void
Cancel
()
noexcept
override
;
private
:
gcc_pure
[[
nodiscard
]]
gcc_pure
ALint
GetSourceI
(
ALenum
param
)
const
noexcept
{
ALint
value
;
alGetSourcei
(
source
,
param
,
&
value
);
return
value
;
}
gcc_pure
[[
nodiscard
]]
gcc_pure
bool
HasProcessed
()
const
noexcept
{
return
GetSourceI
(
AL_BUFFERS_PROCESSED
)
>
0
;
}
gcc_pure
[[
nodiscard
]]
gcc_pure
bool
IsPlaying
()
const
noexcept
{
return
GetSourceI
(
AL_SOURCE_STATE
)
==
AL_PLAYING
;
}
...
...
src/output/plugins/PulseOutputPlugin.cxx
View file @
f00f8b00
...
...
@@ -99,7 +99,7 @@ public:
void
Open
(
AudioFormat
&
audio_format
)
override
;
void
Close
()
noexcept
override
;
std
::
chrono
::
steady_clock
::
duration
Delay
()
const
noexcept
override
;
[[
nodiscard
]]
std
::
chrono
::
steady_clock
::
duration
Delay
()
const
noexcept
override
;
size_t
Play
(
const
void
*
chunk
,
size_t
size
)
override
;
void
Cancel
()
noexcept
override
;
bool
Pause
()
override
;
...
...
src/output/plugins/RecorderOutputPlugin.cxx
View file @
f00f8b00
...
...
@@ -88,7 +88,7 @@ private:
size_t
Play
(
const
void
*
chunk
,
size_t
size
)
override
;
private
:
gcc_pure
[[
nodiscard
]]
gcc_pure
bool
HasDynamicPath
()
const
noexcept
{
return
!
format_path
.
empty
();
}
...
...
src/output/plugins/ShoutOutputPlugin.cxx
View file @
f00f8b00
...
...
@@ -57,7 +57,7 @@ struct ShoutOutput final : AudioOutput {
void
Open
(
AudioFormat
&
audio_format
)
override
;
void
Close
()
noexcept
override
;
std
::
chrono
::
steady_clock
::
duration
Delay
()
const
noexcept
override
;
[[
nodiscard
]]
std
::
chrono
::
steady_clock
::
duration
Delay
()
const
noexcept
override
;
void
SendTag
(
const
Tag
&
tag
)
override
;
size_t
Play
(
const
void
*
chunk
,
size_t
size
)
override
;
void
Cancel
()
noexcept
override
;
...
...
src/pcm/Mix.hxx
View file @
f00f8b00
...
...
@@ -44,7 +44,7 @@ class PcmDither;
*
* @return true on success, false if the format is not supported
*/
gcc_warn_unused_result
[[
nodiscard
]]
bool
pcm_mix
(
PcmDither
&
dither
,
void
*
buffer1
,
const
void
*
buffer2
,
size_t
size
,
SampleFormat
format
,
float
portion1
)
noexcept
;
...
...
src/player/Thread.cxx
View file @
f00f8b00
...
...
@@ -252,7 +252,7 @@ private:
* Note: this function does not check if the decoder is already
* finished.
*/
gcc_pure
[[
nodiscard
]]
gcc_pure
bool
IsDecoderAtCurrentSong
()
const
noexcept
{
assert
(
pipe
!=
nullptr
);
...
...
@@ -264,7 +264,7 @@ private:
* decoding it, or has finished doing it), and the player hasn't
* switched to that song yet.
*/
gcc_pure
[[
nodiscard
]]
gcc_pure
bool
IsDecoderAtNextSong
()
const
noexcept
{
return
dc
.
pipe
!=
nullptr
&&
!
IsDecoderAtCurrentSong
();
}
...
...
src/storage/plugins/CurlStorage.cxx
View file @
f00f8b00
...
...
@@ -169,7 +169,7 @@ struct DavResponse {
std
::
chrono
::
system_clock
::
time_point
::
min
();
uint64_t
length
=
0
;
bool
Check
()
const
{
[[
nodiscard
]]
bool
Check
()
const
{
return
!
href
.
empty
();
}
};
...
...
src/storage/plugins/NfsStorage.cxx
View file @
f00f8b00
...
...
@@ -129,7 +129,7 @@ public:
}
private
:
EventLoop
&
GetEventLoop
()
const
noexcept
{
[[
nodiscard
]]
EventLoop
&
GetEventLoop
()
const
noexcept
{
return
defer_connect
.
GetEventLoop
();
}
...
...
@@ -276,7 +276,7 @@ public:
:
BlockingNfsOperation
(
_connection
),
path
(
_path
),
follow
(
_follow
)
{}
const
StorageFileInfo
&
GetInfo
()
const
{
[[
nodiscard
]]
const
StorageFileInfo
&
GetInfo
()
const
{
return
info
;
}
...
...
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