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
f510564d
Commit
f510564d
authored
3 years ago
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
more [[gnu::...]] attributes
parent
1c4b484a
Hide whitespace changes
Inline
Side-by-side
Showing
135 changed files
with
361 additions
and
514 deletions
+361
-514
IdleFlags.hxx
src/IdleFlags.hxx
+2
-4
Instance.hxx
src/Instance.hxx
+1
-2
Mapper.hxx
src/Mapper.hxx
+4
-5
MixRampInfo.hxx
src/MixRampInfo.hxx
+3
-5
MusicBuffer.hxx
src/MusicBuffer.hxx
+1
-1
MusicChunk.hxx
src/MusicChunk.hxx
+1
-1
MusicPipe.hxx
src/MusicPipe.hxx
+5
-6
ReplayGainInfo.hxx
src/ReplayGainInfo.hxx
+1
-2
ReplayGainMode.cxx
src/ReplayGainMode.cxx
+1
-0
ReplayGainMode.hxx
src/ReplayGainMode.hxx
+1
-3
SingleMode.cxx
src/SingleMode.cxx
+1
-0
SingleMode.hxx
src/SingleMode.hxx
+1
-3
SongLoader.hxx
src/SongLoader.hxx
+3
-4
StateFile.hxx
src/StateFile.hxx
+1
-2
Client.hxx
src/client/Client.hxx
+7
-8
Message.hxx
src/client/Message.hxx
+1
-3
NeighborCommands.hxx
src/command/NeighborCommands.hxx
+1
-2
PlaylistCommands.hxx
src/command/PlaylistCommands.hxx
+1
-2
Block.hxx
src/config/Block.hxx
+5
-7
Data.hxx
src/config/Data.hxx
+4
-4
Option.hxx
src/config/Option.hxx
+2
-2
Param.hxx
src/config/Param.hxx
+1
-1
DatabaseLock.hxx
src/db/DatabaseLock.hxx
+1
-2
Interface.hxx
src/db/Interface.hxx
+1
-2
LightDirectory.hxx
src/db/LightDirectory.hxx
+2
-5
PlaylistInfo.hxx
src/db/PlaylistInfo.hxx
+1
-3
PlaylistVector.hxx
src/db/PlaylistVector.hxx
+1
-2
Registry.hxx
src/db/Registry.hxx
+1
-3
Selection.hxx
src/db/Selection.hxx
+3
-4
Directory.hxx
src/db/plugins/simple/Directory.hxx
+12
-13
SimpleDatabasePlugin.hxx
src/db/plugins/simple/SimpleDatabasePlugin.hxx
+4
-5
Song.hxx
src/db/plugins/simple/Song.hxx
+4
-5
Directory.cxx
src/db/plugins/upnp/Directory.cxx
+3
-3
Directory.hxx
src/db/plugins/upnp/Directory.hxx
+1
-2
Object.hxx
src/db/plugins/upnp/Object.hxx
+2
-3
ExcludeList.hxx
src/db/update/ExcludeList.hxx
+1
-2
Queue.hxx
src/db/update/Queue.hxx
+0
-5
Service.hxx
src/db/update/Service.hxx
+0
-2
UpdateIO.hxx
src/db/update/UpdateIO.hxx
+3
-5
Walk.hxx
src/db/update/Walk.hxx
+1
-2
Bridge.hxx
src/decoder/Bridge.hxx
+1
-1
Client.hxx
src/decoder/Client.hxx
+3
-4
Control.hxx
src/decoder/Control.hxx
+6
-6
DecoderBuffer.hxx
src/decoder/DecoderBuffer.hxx
+1
-2
DecoderList.hxx
src/decoder/DecoderList.hxx
+2
-4
DecoderPlugin.hxx
src/decoder/DecoderPlugin.hxx
+3
-5
DsdLib.hxx
src/decoder/plugins/DsdLib.hxx
+2
-3
Registry.hxx
src/filter/Registry.hxx
+1
-3
AllocatedPath.hxx
src/fs/AllocatedPath.hxx
+24
-25
Charset.hxx
src/fs/Charset.hxx
+1
-2
Glob.hxx
src/fs/Glob.hxx
+1
-3
Path.hxx
src/fs/Path.hxx
+8
-9
StandardDirectory.hxx
src/fs/StandardDirectory.hxx
+1
-1
Traits.hxx
src/fs/Traits.hxx
+27
-27
AutoGunzipReader.cxx
src/fs/io/AutoGunzipReader.cxx
+1
-1
BufferedReader.hxx
src/fs/io/BufferedReader.hxx
+1
-2
FileOutputStream.hxx
src/fs/io/FileOutputStream.hxx
+1
-2
FileReader.hxx
src/fs/io/FileReader.hxx
+2
-3
Reader.hxx
src/fs/io/Reader.hxx
+1
-3
AsyncInputStream.hxx
src/input/AsyncInputStream.hxx
+1
-1
Error.hxx
src/input/Error.hxx
+1
-3
IcyInputStream.hxx
src/input/IcyInputStream.hxx
+1
-2
InputPlugin.hxx
src/input/InputPlugin.hxx
+2
-3
InputStream.hxx
src/input/InputStream.hxx
+16
-19
Registry.hxx
src/input/Registry.hxx
+1
-3
Manager.hxx
src/input/cache/Manager.hxx
+4
-5
FfmpegInputPlugin.cxx
src/input/plugins/FfmpegInputPlugin.cxx
+1
-1
QobuzClient.hxx
src/input/plugins/QobuzClient.hxx
+1
-1
QobuzInputPlugin.cxx
src/input/plugins/QobuzInputPlugin.cxx
+1
-1
File.hxx
src/java/File.hxx
+3
-3
Global.hxx
src/java/Global.hxx
+3
-4
Format.hxx
src/lib/alsa/Format.hxx
+3
-4
Version.cxx
src/lib/alsa/Version.cxx
+1
-1
Version.hxx
src/lib/alsa/Version.hxx
+1
-3
Paranoia.hxx
src/lib/cdio/Paranoia.hxx
+2
-3
MD5.hxx
src/lib/crypto/MD5.hxx
+2
-3
Easy.hxx
src/lib/curl/Easy.hxx
+2
-3
Global.cxx
src/lib/curl/Global.cxx
+3
-2
Request.cxx
src/lib/curl/Request.cxx
+1
-1
Version.hxx
src/lib/curl/Version.hxx
+1
-3
Error.hxx
src/lib/dbus/Error.hxx
+1
-3
ExpatParser.hxx
src/lib/expat/ExpatParser.hxx
+4
-6
Buffer.hxx
src/lib/ffmpeg/Buffer.hxx
+1
-3
IOContext.hxx
src/lib/ffmpeg/IOContext.hxx
+2
-3
Time.hxx
src/lib/ffmpeg/Time.hxx
+5
-6
Hash.hxx
src/lib/gcrypt/Hash.hxx
+1
-2
MD5.hxx
src/lib/gcrypt/MD5.hxx
+1
-2
Collate.cxx
src/lib/icu/Collate.cxx
+1
-1
Collate.hxx
src/lib/icu/Collate.hxx
+1
-3
Compare.hxx
src/lib/icu/Compare.hxx
+3
-4
Converter.hxx
src/lib/icu/Converter.hxx
+0
-3
Win32.hxx
src/lib/icu/Win32.hxx
+2
-4
Base.hxx
src/lib/nfs/Base.hxx
+1
-3
Cancellable.hxx
src/lib/nfs/Cancellable.hxx
+6
-8
Connection.hxx
src/lib/nfs/Connection.hxx
+3
-4
Glue.hxx
src/lib/nfs/Glue.hxx
+2
-4
Manager.hxx
src/lib/nfs/Manager.hxx
+4
-5
RegexPointer.hxx
src/lib/pcre/RegexPointer.hxx
+1
-1
ContentDirectoryService.hxx
src/lib/upnp/ContentDirectoryService.hxx
+1
-2
FlacMetadataChain.hxx
src/lib/xiph/FlacMetadataChain.hxx
+2
-4
ls.hxx
src/ls.hxx
+1
-3
Volume.hxx
src/mixer/Volume.hxx
+2
-4
Glue.hxx
src/neighbor/Glue.hxx
+1
-2
Registry.hxx
src/neighbor/Registry.hxx
+1
-3
ToString.hxx
src/net/ToString.hxx
+1
-3
Control.hxx
src/output/Control.hxx
+6
-7
Buffer.hxx
src/pcm/Buffer.hxx
+2
-3
ChannelsConverter.hxx
src/pcm/ChannelsConverter.hxx
+1
-1
Export.hxx
src/pcm/Export.hxx
+7
-7
FormatConverter.hxx
src/pcm/FormatConverter.hxx
+1
-1
PcmFormat.hxx
src/pcm/PcmFormat.hxx
+4
-4
Volume.hxx
src/pcm/Volume.hxx
+1
-1
Control.hxx
src/player/Control.hxx
+2
-2
CrossFade.hxx
src/player/CrossFade.hxx
+1
-2
Outputs.hxx
src/player/Outputs.hxx
+1
-2
PlaylistRegistry.hxx
src/playlist/PlaylistRegistry.hxx
+3
-4
AndSongFilter.hxx
src/song/AndSongFilter.hxx
+1
-2
DetachedSong.hxx
src/song/DetachedSong.hxx
+12
-14
Filter.hxx
src/song/Filter.hxx
+5
-8
ISongFilter.hxx
src/song/ISongFilter.hxx
+1
-3
LightSong.hxx
src/song/LightSong.hxx
+2
-3
StringFilter.hxx
src/song/StringFilter.hxx
+2
-3
CompositeStorage.hxx
src/storage/CompositeStorage.hxx
+8
-9
Configured.hxx
src/storage/Configured.hxx
+1
-3
StorageInterface.hxx
src/storage/StorageInterface.hxx
+4
-6
Clock.hxx
src/system/Clock.hxx
+1
-3
Id3Load.cxx
src/tag/Id3Load.cxx
+1
-1
Id.hxx
src/thread/Id.hxx
+3
-5
Thread.hxx
src/thread/Thread.hxx
+1
-2
PidFile.hxx
src/unix/PidFile.hxx
+1
-1
BitReverse.hxx
src/util/BitReverse.hxx
+1
-3
HexFormat.hxx
src/util/HexFormat.hxx
+1
-2
UriExtract.cxx
src/util/UriExtract.cxx
+3
-3
UriExtract.hxx
src/util/UriExtract.hxx
+6
-8
UriUtil.hxx
src/util/UriUtil.hxx
+3
-5
No files found.
src/IdleFlags.hxx
View file @
f510564d
...
...
@@ -25,8 +25,6 @@
#ifndef MPD_IDLE_FLAGS_HXX
#define MPD_IDLE_FLAGS_HXX
#include "util/Compiler.h"
/** song database has been updated*/
static
constexpr
unsigned
IDLE_DATABASE
=
0x1
;
...
...
@@ -73,7 +71,7 @@ static constexpr unsigned IDLE_PARTITION = 0x2000;
/**
* Get idle names
*/
gcc_const
[[
gnu
::
const
]]
const
char
*
const
*
idle_get_names
()
noexcept
;
...
...
@@ -81,7 +79,7 @@ idle_get_names() noexcept;
* Parse an idle name and return its mask. Returns 0 if the given
* name is unknown.
*/
gcc_nonnull_all
gcc_pure
[[
gnu
::
nonnull
]]
[[
gnu
::
pure
]]
unsigned
idle_parse_name
(
const
char
*
name
)
noexcept
;
...
...
This diff is collapsed.
Click to expand it.
src/Instance.hxx
View file @
f510564d
...
...
@@ -24,7 +24,6 @@
#include "event/Loop.hxx"
#include "event/Thread.hxx"
#include "event/MaskMonitor.hxx"
#include "util/Compiler.h"
#ifdef ENABLE_SYSTEMD_DAEMON
#include "lib/systemd/Watchdog.hxx"
...
...
@@ -168,7 +167,7 @@ struct Instance final
* Find a #Partition with the given name. Returns nullptr if
* no such partition was found.
*/
gcc_pure
[[
gnu
::
pure
]]
Partition
*
FindPartition
(
const
char
*
name
)
noexcept
;
void
DeletePartition
(
Partition
&
partition
)
noexcept
;
...
...
This diff is collapsed.
Click to expand it.
src/Mapper.hxx
View file @
f510564d
...
...
@@ -24,7 +24,6 @@
#ifndef MPD_MAPPER_HXX
#define MPD_MAPPER_HXX
#include "util/Compiler.h"
#include "config.h"
#include <string>
...
...
@@ -44,7 +43,7 @@ mapper_init(AllocatedPath &&playlist_dir);
* is basically done by converting the URI to the file system charset
* and prepending the music directory.
*/
gcc_pure
[[
gnu
::
pure
]]
AllocatedPath
map_uri_fs
(
const
char
*
uri
)
noexcept
;
...
...
@@ -56,7 +55,7 @@ map_uri_fs(const char *uri) noexcept;
* @return the relative path in UTF-8, or an empty string if mapping
* failed
*/
gcc_pure
[[
gnu
::
pure
]]
std
::
string
map_fs_to_utf8
(
Path
path_fs
)
noexcept
;
...
...
@@ -65,7 +64,7 @@ map_fs_to_utf8(Path path_fs) noexcept;
/**
* Returns the playlist directory.
*/
gcc_const
[[
gnu
::
const
]]
const
AllocatedPath
&
map_spl_path
()
noexcept
;
...
...
@@ -75,7 +74,7 @@ map_spl_path() noexcept;
*
* @return the path in file system encoding, or nullptr if mapping failed
*/
gcc_pure
[[
gnu
::
pure
]]
AllocatedPath
map_spl_utf8_to_fs
(
const
char
*
name
)
noexcept
;
...
...
This diff is collapsed.
Click to expand it.
src/MixRampInfo.hxx
View file @
f510564d
...
...
@@ -20,8 +20,6 @@
#ifndef MPD_MIX_RAMP_INFO_HXX
#define MPD_MIX_RAMP_INFO_HXX
#include "util/Compiler.h"
#include <string>
class
MixRampInfo
{
...
...
@@ -35,17 +33,17 @@ public:
end
.
clear
();
}
gcc_pure
[[
gnu
::
pure
]]
bool
IsDefined
()
const
noexcept
{
return
!
start
.
empty
()
||
!
end
.
empty
();
}
gcc_pure
[[
gnu
::
pure
]]
const
char
*
GetStart
()
const
noexcept
{
return
start
.
empty
()
?
nullptr
:
start
.
c_str
();
}
gcc_pure
[[
gnu
::
pure
]]
const
char
*
GetEnd
()
const
noexcept
{
return
end
.
empty
()
?
nullptr
:
end
.
c_str
();
}
...
...
This diff is collapsed.
Click to expand it.
src/MusicBuffer.hxx
View file @
f510564d
...
...
@@ -63,7 +63,7 @@ public:
* is the same value which was passed to the constructor
* music_buffer_new().
*/
gcc_pure
[[
gnu
::
pure
]]
unsigned
GetSize
()
const
noexcept
{
return
buffer
.
GetCapacity
();
}
...
...
This diff is collapsed.
Click to expand it.
src/MusicChunk.hxx
View file @
f510564d
...
...
@@ -105,7 +105,7 @@ struct MusicChunkInfo {
* Checks if the audio format if the chunk is equal to the
* specified audio_format.
*/
gcc_pure
[[
gnu
::
pure
]]
bool
CheckFormat
(
AudioFormat
audio_format
)
const
noexcept
;
#endif
};
...
...
This diff is collapsed.
Click to expand it.
src/MusicPipe.hxx
View file @
f510564d
...
...
@@ -22,7 +22,6 @@
#include "MusicChunkPtr.hxx"
#include "thread/Mutex.hxx"
#include "util/Compiler.h"
#ifndef NDEBUG
#include "pcm/AudioFormat.hxx"
...
...
@@ -59,7 +58,7 @@ public:
* Checks if the audio format if the chunk is equal to the specified
* audio_format.
*/
gcc_pure
[[
gnu
::
pure
]]
bool
CheckFormat
(
AudioFormat
other
)
const
noexcept
{
return
!
audio_format
.
IsDefined
()
||
audio_format
==
other
;
...
...
@@ -68,7 +67,7 @@ public:
/**
* Checks if the specified chunk is enqueued in the music pipe.
*/
gcc_pure
[[
gnu
::
pure
]]
bool
Contains
(
const
MusicChunk
*
chunk
)
const
noexcept
;
#endif
...
...
@@ -76,7 +75,7 @@ public:
* Returns the first #MusicChunk from the pipe. Returns
* nullptr if the pipe is empty.
*/
gcc_pure
[[
gnu
::
pure
]]
const
MusicChunk
*
Peek
()
const
noexcept
{
const
std
::
lock_guard
<
Mutex
>
protect
(
mutex
);
return
head
.
get
();
...
...
@@ -100,13 +99,13 @@ public:
/**
* Returns the number of chunks currently in this pipe.
*/
gcc_pure
[[
gnu
::
pure
]]
unsigned
GetSize
()
const
noexcept
{
const
std
::
lock_guard
<
Mutex
>
protect
(
mutex
);
return
size
;
}
gcc_pure
[[
gnu
::
pure
]]
bool
IsEmpty
()
const
noexcept
{
return
GetSize
()
==
0
;
}
...
...
This diff is collapsed.
Click to expand it.
src/ReplayGainInfo.hxx
View file @
f510564d
...
...
@@ -20,7 +20,6 @@
#ifndef MPD_REPLAY_GAIN_INFO_HXX
#define MPD_REPLAY_GAIN_INFO_HXX
#include "util/Compiler.h"
#include "ReplayGainMode.hxx"
struct
ReplayGainConfig
;
...
...
@@ -42,7 +41,7 @@ struct ReplayGainTuple {
return
{
-
200.0
f
,
0.0
f
};
}
gcc_pure
[[
gnu
::
pure
]]
float
CalculateScale
(
const
ReplayGainConfig
&
config
)
const
noexcept
;
};
...
...
This diff is collapsed.
Click to expand it.
src/ReplayGainMode.cxx
View file @
f510564d
...
...
@@ -18,6 +18,7 @@
*/
#include "ReplayGainMode.hxx"
#include "util/Compiler.h"
#include <cassert>
#include <stdexcept>
...
...
This diff is collapsed.
Click to expand it.
src/ReplayGainMode.hxx
View file @
f510564d
...
...
@@ -20,8 +20,6 @@
#ifndef MPD_REPLAY_GAIN_MODE_HXX
#define MPD_REPLAY_GAIN_MODE_HXX
#include "util/Compiler.h"
#include <cstdint>
enum
class
ReplayGainMode
:
uint8_t
{
...
...
@@ -34,7 +32,7 @@ enum class ReplayGainMode : uint8_t {
/**
* Return the string representation of a #ReplayGainMode.
*/
gcc_pure
[[
gnu
::
pure
]]
const
char
*
ToString
(
ReplayGainMode
mode
)
noexcept
;
...
...
This diff is collapsed.
Click to expand it.
src/SingleMode.cxx
View file @
f510564d
...
...
@@ -18,6 +18,7 @@
*/
#include "SingleMode.hxx"
#include "util/Compiler.h"
#include <cassert>
#include <stdexcept>
...
...
This diff is collapsed.
Click to expand it.
src/SingleMode.hxx
View file @
f510564d
...
...
@@ -20,8 +20,6 @@
#ifndef MPD_SINGLE_MODE_HXX
#define MPD_SINGLE_MODE_HXX
#include "util/Compiler.h"
#include <cstdint>
enum
class
SingleMode
:
uint8_t
{
...
...
@@ -33,7 +31,7 @@ enum class SingleMode : uint8_t {
/**
* Return the string representation of a #SingleMode.
*/
gcc_pure
[[
gnu
::
pure
]]
const
char
*
SingleToString
(
SingleMode
mode
)
noexcept
;
...
...
This diff is collapsed.
Click to expand it.
src/SongLoader.hxx
View file @
f510564d
...
...
@@ -20,7 +20,6 @@
#ifndef MPD_SONG_LOADER_HXX
#define MPD_SONG_LOADER_HXX
#include "util/Compiler.h"
#include "config.h"
#include <cstddef>
...
...
@@ -72,14 +71,14 @@ public:
/**
* Throws #std::runtime_error on error.
*/
gcc_nonnull_all
[[
gnu
::
nonnull
]]
DetachedSong
LoadSong
(
const
char
*
uri_utf8
)
const
;
private
:
gcc_nonnull_all
[[
gnu
::
nonnull
]]
DetachedSong
LoadFromDatabase
(
const
char
*
uri
)
const
;
gcc_nonnull_all
[[
gnu
::
nonnull
]]
DetachedSong
LoadFile
(
const
char
*
path_utf8
,
Path
path_fs
)
const
;
};
...
...
This diff is collapsed.
Click to expand it.
src/StateFile.hxx
View file @
f510564d
...
...
@@ -22,7 +22,6 @@
#include "StateFileConfig.hxx"
#include "event/FarTimerEvent.hxx"
#include "util/Compiler.h"
#include "config.h"
#include <string>
...
...
@@ -76,7 +75,7 @@ private:
* Check if MPD's state was modified since the last
* RememberVersions() call.
*/
gcc_pure
[[
gnu
::
pure
]]
bool
IsModified
()
const
noexcept
;
/* callback for #timer_event */
...
...
This diff is collapsed.
Click to expand it.
src/client/Client.hxx
View file @
f510564d
...
...
@@ -27,7 +27,6 @@
#include "tag/Mask.hxx"
#include "event/FullyBufferedSocket.hxx"
#include "event/CoarseTimerEvent.hxx"
#include "util/Compiler.h"
#include <boost/intrusive/link_mode.hpp>
#include <boost/intrusive/list_hook.hpp>
...
...
@@ -138,7 +137,7 @@ public:
using
FullyBufferedSocket
::
GetEventLoop
;
using
FullyBufferedSocket
::
GetOutputMaxSize
;
gcc_pure
[[
gnu
::
pure
]]
bool
IsExpired
()
const
noexcept
{
return
!
FullyBufferedSocket
::
IsDefined
();
}
...
...
@@ -211,7 +210,7 @@ public:
FULL
,
};
gcc_pure
[[
gnu
::
pure
]]
bool
IsSubscribed
(
const
char
*
channel_name
)
const
noexcept
{
return
subscriptions
.
find
(
channel_name
)
!=
subscriptions
.
end
();
}
...
...
@@ -252,19 +251,19 @@ public:
void
SetPartition
(
Partition
&
new_partition
)
noexcept
;
gcc_pure
[[
gnu
::
pure
]]
Instance
&
GetInstance
()
const
noexcept
;
gcc_pure
[[
gnu
::
pure
]]
playlist
&
GetPlaylist
()
const
noexcept
;
gcc_pure
[[
gnu
::
pure
]]
PlayerControl
&
GetPlayerControl
()
const
noexcept
;
/**
* Wrapper for Instance::GetDatabase().
*/
gcc_pure
[[
gnu
::
pure
]]
const
Database
*
GetDatabase
()
const
noexcept
;
/**
...
...
@@ -272,7 +271,7 @@ public:
*/
const
Database
&
GetDatabaseOrThrow
()
const
;
gcc_pure
[[
gnu
::
pure
]]
const
Storage
*
GetStorage
()
const
noexcept
;
private
:
...
...
This diff is collapsed.
Click to expand it.
src/client/Message.hxx
View file @
f510564d
...
...
@@ -20,8 +20,6 @@
#ifndef MPD_CLIENT_MESSAGE_HXX
#define MPD_CLIENT_MESSAGE_HXX
#include "util/Compiler.h"
#include <string>
#ifdef _WIN32
...
...
@@ -51,7 +49,7 @@ public:
}
};
gcc_pure
[[
gnu
::
pure
]]
bool
client_message_valid_channel_name
(
const
char
*
name
)
noexcept
;
...
...
This diff is collapsed.
Click to expand it.
src/command/NeighborCommands.hxx
View file @
f510564d
...
...
@@ -21,14 +21,13 @@
#define MPD_NEIGHBOR_COMMANDS_HXX
#include "CommandResult.hxx"
#include "util/Compiler.h"
struct
Instance
;
class
Client
;
class
Request
;
class
Response
;
gcc_pure
[[
gnu
::
pure
]]
bool
neighbor_commands_available
(
const
Instance
&
instance
)
noexcept
;
...
...
This diff is collapsed.
Click to expand it.
src/command/PlaylistCommands.hxx
View file @
f510564d
...
...
@@ -21,13 +21,12 @@
#define MPD_PLAYLIST_COMMANDS_HXX
#include "CommandResult.hxx"
#include "util/Compiler.h"
class
Client
;
class
Request
;
class
Response
;
gcc_const
[[
gnu
::
const
]]
bool
playlist_commands_available
()
noexcept
;
...
...
This diff is collapsed.
Click to expand it.
src/config/Block.hxx
View file @
f510564d
...
...
@@ -20,8 +20,6 @@
#ifndef MPD_CONFIG_BLOCK_HXX
#define MPD_CONFIG_BLOCK_HXX
#include "util/Compiler.h"
#include <string>
#include <vector>
...
...
@@ -39,7 +37,7 @@ struct BlockParam {
mutable
bool
used
=
false
;
template
<
typename
N
,
typename
V
>
gcc_nonnull_all
[[
gnu
::
nonnull
]]
BlockParam
(
N
&&
_name
,
V
&&
_value
,
int
_line
=-
1
)
noexcept
:
name
(
std
::
forward
<
N
>
(
_name
)),
value
(
std
::
forward
<
V
>
(
_value
)),
line
(
_line
)
{}
...
...
@@ -99,7 +97,7 @@ struct ConfigBlock {
return
line
<
0
;
}
gcc_pure
[[
gnu
::
pure
]]
bool
IsEmpty
()
const
noexcept
{
return
block_params
.
empty
();
}
...
...
@@ -109,17 +107,17 @@ struct ConfigBlock {
}
template
<
typename
N
,
typename
V
>
gcc_nonnull_all
[[
gnu
::
nonnull
]]
void
AddBlockParam
(
N
&&
_name
,
V
&&
_value
,
int
_line
=-
1
)
noexcept
{
block_params
.
emplace_back
(
std
::
forward
<
N
>
(
_name
),
std
::
forward
<
V
>
(
_value
),
_line
);
}
gcc_nonnull_all
gcc_pure
[[
gnu
::
nonnull
]]
[[
gnu
::
pure
]]
const
BlockParam
*
GetBlockParam
(
const
char
*
_name
)
const
noexcept
;
gcc_pure
[[
gnu
::
pure
]]
const
char
*
GetBlockValue
(
const
char
*
name
,
const
char
*
default_value
=
nullptr
)
const
noexcept
;
...
...
This diff is collapsed.
Click to expand it.
src/config/Data.hxx
View file @
f510564d
...
...
@@ -46,7 +46,7 @@ struct ConfigData {
void
AddParam
(
ConfigOption
option
,
ConfigParam
&&
param
)
noexcept
;
gcc_pure
[[
gnu
::
pure
]]
const
ConfigParam
*
GetParam
(
ConfigOption
option
)
const
noexcept
{
const
auto
&
list
=
GetParamList
(
option
);
return
list
.
empty
()
?
nullptr
:
&
list
.
front
();
...
...
@@ -60,7 +60,7 @@ struct ConfigData {
:
f
(
nullptr
);
}
gcc_pure
[[
gnu
::
pure
]]
const
char
*
GetString
(
ConfigOption
option
,
const
char
*
default_value
=
nullptr
)
const
noexcept
;
...
...
@@ -100,7 +100,7 @@ struct ConfigData {
ConfigBlock
&
AddBlock
(
ConfigBlockOption
option
,
ConfigBlock
&&
block
)
noexcept
;
gcc_pure
[[
gnu
::
pure
]]
const
ConfigBlock
*
GetBlock
(
ConfigBlockOption
option
)
const
noexcept
{
const
auto
&
list
=
GetBlockList
(
option
);
return
list
.
empty
()
?
nullptr
:
&
list
.
front
();
...
...
@@ -115,7 +115,7 @@ struct ConfigData {
* @param key the attribute name
* @param value the expected attribute value
*/
gcc_pure
[[
gnu
::
pure
]]
const
ConfigBlock
*
FindBlock
(
ConfigBlockOption
option
,
const
char
*
key
,
const
char
*
value
)
const
;
...
...
This diff is collapsed.
Click to expand it.
src/config/Option.hxx
View file @
f510564d
...
...
@@ -102,14 +102,14 @@ enum class ConfigBlockOption {
/**
* @return #ConfigOption::MAX if not found
*/
gcc_pure
[[
gnu
::
pure
]]
enum
ConfigOption
ParseConfigOptionName
(
const
char
*
name
)
noexcept
;
/**
* @return #ConfigOption::MAX if not found
*/
gcc_pure
[[
gnu
::
pure
]]
enum
ConfigBlockOption
ParseConfigBlockOptionName
(
const
char
*
name
)
noexcept
;
...
...
This diff is collapsed.
Click to expand it.
src/config/Param.hxx
View file @
f510564d
...
...
@@ -35,7 +35,7 @@ struct ConfigParam {
:
line
(
_line
)
{}
template
<
typename
V
>
gcc_nonnull_all
[[
gnu
::
nonnull
]]
explicit
ConfigParam
(
V
&&
_value
,
int
_line
=-
1
)
noexcept
:
value
(
std
::
forward
<
V
>
(
_value
)),
line
(
_line
)
{}
...
...
This diff is collapsed.
Click to expand it.
src/db/DatabaseLock.hxx
View file @
f510564d
...
...
@@ -27,7 +27,6 @@
#define MPD_DB_LOCK_HXX
#include "thread/Mutex.hxx"
#include "util/Compiler.h"
#include <cassert>
...
...
@@ -42,7 +41,7 @@ extern ThreadId db_mutex_holder;
/**
* Does the current thread hold the database lock?
*/
gcc_pure
[[
gnu
::
pure
]]
static
inline
bool
holding_db_lock
()
noexcept
{
...
...
This diff is collapsed.
Click to expand it.
src/db/Interface.hxx
View file @
f510564d
...
...
@@ -22,7 +22,6 @@
#include "Visitor.hxx"
#include "tag/Type.h"
#include "util/Compiler.h"
#include <chrono>
#include <string>
...
...
@@ -136,7 +135,7 @@ public:
* Returns the time stamp of the last database update.
* Returns a negative value if that is not not known/available.
*/
gcc_pure
[[
gnu
::
pure
]]
virtual
std
::
chrono
::
system_clock
::
time_point
GetUpdateStamp
()
const
noexcept
=
0
;
};
...
...
This diff is collapsed.
Click to expand it.
src/db/LightDirectory.hxx
View file @
f510564d
...
...
@@ -20,12 +20,9 @@
#ifndef MPD_LIGHT_DIRECTORY_HXX
#define MPD_LIGHT_DIRECTORY_HXX
#include "util/Compiler.h"
#include <chrono>
#include <string>
#include <time.h>
struct
Tag
;
/**
...
...
@@ -53,7 +50,7 @@ struct LightDirectory {
return
*
uri
==
0
;
}
gcc_pure
[[
gnu
::
pure
]]
const
char
*
GetPath
()
const
noexcept
{
return
uri
;
}
...
...
This diff is collapsed.
Click to expand it.
src/db/PlaylistInfo.hxx
View file @
f510564d
...
...
@@ -20,8 +20,6 @@
#ifndef MPD_PLAYLIST_INFO_HXX
#define MPD_PLAYLIST_INFO_HXX
#include "util/Compiler.h"
#include <string>
#include <string_view>
#include <chrono>
...
...
@@ -49,7 +47,7 @@ struct PlaylistInfo {
constexpr
CompareName
(
std
::
string_view
_name
)
noexcept
:
name
(
_name
)
{}
gcc_pure
[[
gnu
::
pure
]]
bool
operator
()(
const
PlaylistInfo
&
pi
)
const
noexcept
{
return
pi
.
name
==
name
;
}
...
...
This diff is collapsed.
Click to expand it.
src/db/PlaylistVector.hxx
View file @
f510564d
...
...
@@ -21,7 +21,6 @@
#define MPD_PLAYLIST_VECTOR_HXX
#include "db/PlaylistInfo.hxx"
#include "util/Compiler.h"
#include <list>
#include <string_view>
...
...
@@ -31,7 +30,7 @@ protected:
/**
* Caller must lock the #db_mutex.
*/
gcc_pure
[[
gnu
::
pure
]]
iterator
find
(
std
::
string_view
name
)
noexcept
;
public
:
...
...
This diff is collapsed.
Click to expand it.
src/db/Registry.hxx
View file @
f510564d
...
...
@@ -20,8 +20,6 @@
#ifndef MPD_DATABASE_REGISTRY_HXX
#define MPD_DATABASE_REGISTRY_HXX
#include "util/Compiler.h"
struct
DatabasePlugin
;
/**
...
...
@@ -30,7 +28,7 @@ struct DatabasePlugin;
*/
extern
const
DatabasePlugin
*
const
database_plugins
[];
gcc_pure
[[
gnu
::
pure
]]
const
DatabasePlugin
*
GetDatabasePluginByName
(
const
char
*
name
)
noexcept
;
...
...
This diff is collapsed.
Click to expand it.
src/db/Selection.hxx
View file @
f510564d
...
...
@@ -22,7 +22,6 @@
#include "protocol/RangeArg.hxx"
#include "tag/Type.h"
#include "util/Compiler.h"
#include <string>
...
...
@@ -60,16 +59,16 @@ struct DatabaseSelection {
DatabaseSelection
(
const
char
*
_uri
,
bool
_recursive
,
const
SongFilter
*
_filter
=
nullptr
)
noexcept
;
gcc_pure
[[
gnu
::
pure
]]
bool
IsEmpty
()
const
noexcept
;
/**
* Does this selection contain constraints other than "base"?
*/
gcc_pure
[[
gnu
::
pure
]]
bool
HasOtherThanBase
()
const
noexcept
;
gcc_pure
[[
gnu
::
pure
]]
bool
Match
(
const
LightSong
&
song
)
const
noexcept
;
};
...
...
This diff is collapsed.
Click to expand it.
src/db/plugins/simple/Directory.hxx
View file @
f510564d
...
...
@@ -21,7 +21,6 @@
#define MPD_DIRECTORY_HXX
#include "Ptr.hxx"
#include "util/Compiler.h"
#include "db/Visitor.hxx"
#include "db/PlaylistVector.hxx"
#include "db/Ptr.hxx"
...
...
@@ -113,7 +112,7 @@ public:
/**
* Create a new root #Directory object.
*/
gcc_malloc
gcc_returns_nonnull
[[
gnu
::
malloc
]]
[[
gnu
::
returns_nonnull
]]
static
Directory
*
NewRoot
()
noexcept
{
return
new
Directory
(
std
::
string
(),
nullptr
);
}
...
...
@@ -141,7 +140,7 @@ public:
* (e.g. #DEVICE_PLAYLIST) and whether the underlying plugin
* is available.
*/
gcc_pure
[[
gnu
::
pure
]]
bool
IsPluginAvailable
()
const
noexcept
;
/**
...
...
@@ -164,10 +163,10 @@ public:
/**
* Caller must lock the #db_mutex.
*/
gcc_pure
[[
gnu
::
pure
]]
const
Directory
*
FindChild
(
std
::
string_view
name
)
const
noexcept
;
gcc_pure
[[
gnu
::
pure
]]
Directory
*
FindChild
(
std
::
string_view
name
)
noexcept
{
const
Directory
*
cthis
=
this
;
return
const_cast
<
Directory
*>
(
cthis
->
FindChild
(
name
));
...
...
@@ -211,20 +210,20 @@ public:
*
* @param uri the relative URI
*/
gcc_pure
[[
gnu
::
pure
]]
LookupResult
LookupDirectory
(
std
::
string_view
uri
)
noexcept
;
[[
gnu
::
pure
]]
bool
TargetExists
(
std
::
string_view
target
)
const
noexcept
;
gcc_pure
[[
gnu
::
pure
]]
bool
IsEmpty
()
const
noexcept
{
return
children
.
empty
()
&&
songs
.
empty
()
&&
playlists
.
empty
();
}
gcc_pure
[[
gnu
::
pure
]]
const
char
*
GetPath
()
const
noexcept
{
return
path
.
c_str
();
}
...
...
@@ -232,13 +231,13 @@ public:
/**
* Returns the base name of the directory.
*/
gcc_pure
[[
gnu
::
pure
]]
const
char
*
GetName
()
const
noexcept
;
/**
* Is this the root directory of the music database?
*/
gcc_pure
[[
gnu
::
pure
]]
bool
IsRoot
()
const
noexcept
{
return
parent
==
nullptr
;
}
...
...
@@ -266,10 +265,10 @@ public:
*
* Caller must lock the #db_mutex.
*/
gcc_pure
[[
gnu
::
pure
]]
const
Song
*
FindSong
(
std
::
string_view
name_utf8
)
const
noexcept
;
gcc_pure
[[
gnu
::
pure
]]
Song
*
FindSong
(
std
::
string_view
name_utf8
)
noexcept
{
const
Directory
*
cthis
=
this
;
return
const_cast
<
Song
*>
(
cthis
->
FindSong
(
name_utf8
));
...
...
@@ -307,7 +306,7 @@ public:
const
VisitDirectory
&
visit_directory
,
const
VisitSong
&
visit_song
,
const
VisitPlaylist
&
visit_playlist
)
const
;
gcc_pure
[[
gnu
::
pure
]]
LightDirectory
Export
()
const
noexcept
;
};
...
...
This diff is collapsed.
Click to expand it.
src/db/plugins/simple/SimpleDatabasePlugin.hxx
View file @
f510564d
...
...
@@ -25,7 +25,6 @@
#include "db/Ptr.hxx"
#include "fs/AllocatedPath.hxx"
#include "util/Manual.hxx"
#include "util/Compiler.h"
#include "config.h"
#include <cassert>
...
...
@@ -78,7 +77,7 @@ public:
DatabaseListener
&
listener
,
const
ConfigBlock
&
block
);
gcc_pure
[[
gnu
::
pure
]]
Directory
&
GetRoot
()
noexcept
{
assert
(
root
!=
NULL
);
...
...
@@ -98,7 +97,7 @@ public:
* @param db the #Database to be mounted; must be "open"; on
* success, this object gains ownership of the given #Database
*/
gcc_nonnull_all
[[
gnu
::
nonnull
]]
void
Mount
(
const
char
*
uri
,
DatabasePtr
db
);
/**
...
...
@@ -106,10 +105,10 @@ public:
*
* @return false if the mounted database needs to be updated
*/
gcc_nonnull_all
[[
gnu
::
nonnull
]]
bool
Mount
(
const
char
*
local_uri
,
const
char
*
storage_uri
);
gcc_nonnull_all
[[
gnu
::
nonnull
]]
bool
Unmount
(
const
char
*
uri
)
noexcept
;
/* virtual methods from class Database */
...
...
This diff is collapsed.
Click to expand it.
src/db/plugins/simple/Song.hxx
View file @
f510564d
...
...
@@ -24,7 +24,6 @@
#include "Chrono.hxx"
#include "tag/Tag.hxx"
#include "pcm/AudioFormat.hxx"
#include "util/Compiler.h"
#include "config.h"
#include <boost/intrusive/list.hpp>
...
...
@@ -108,14 +107,14 @@ struct Song {
Song
(
DetachedSong
&&
other
,
Directory
&
_parent
)
noexcept
;
gcc_pure
[[
gnu
::
pure
]]
const
char
*
GetFilenameSuffix
()
const
noexcept
;
/**
* Checks whether the decoder plugin for this song is
* available.
*/
gcc_pure
[[
gnu
::
pure
]]
bool
IsPluginAvailable
()
const
noexcept
;
/**
...
...
@@ -149,10 +148,10 @@ struct Song {
* Returns the URI of the song in UTF-8 encoding, including its
* location within the music directory.
*/
gcc_pure
[[
gnu
::
pure
]]
std
::
string
GetURI
()
const
noexcept
;
gcc_pure
[[
gnu
::
pure
]]
ExportedSong
Export
()
const
noexcept
;
};
...
...
This diff is collapsed.
Click to expand it.
src/db/plugins/upnp/Directory.cxx
View file @
f510564d
...
...
@@ -33,7 +33,7 @@
/* this destructor exists here just so it won't get inlined */
UPnPDirContent
::~
UPnPDirContent
()
=
default
;
gcc_pure
[[
gnu
::
pure
]]
static
UPnPDirObject
::
ItemClass
ParseItemClass
(
StringView
name
)
noexcept
{
...
...
@@ -45,7 +45,7 @@ ParseItemClass(StringView name) noexcept
return
UPnPDirObject
::
ItemClass
::
UNKNOWN
;
}
gcc_pure
[[
gnu
::
pure
]]
static
SignedSongTime
ParseDuration
(
const
char
*
duration
)
noexcept
{
...
...
@@ -73,7 +73,7 @@ ParseDuration(const char *duration) noexcept
* elements. There is a very slight risk of collision in doing
* this. Twonky returns directory names (titles) like 'Artist/Album'.
*/
gcc_pure
[[
gnu
::
pure
]]
static
std
::
string
&&
TitleToPathSegment
(
std
::
string
&&
s
)
noexcept
{
...
...
This diff is collapsed.
Click to expand it.
src/db/plugins/upnp/Directory.hxx
View file @
f510564d
...
...
@@ -21,7 +21,6 @@
#define MPD_UPNP_DIRECTORY_HXX
#include "Object.hxx"
#include "util/Compiler.h"
#include <string>
#include <vector>
...
...
@@ -39,7 +38,7 @@ public:
~
UPnPDirContent
();
gcc_pure
[[
gnu
::
pure
]]
UPnPDirObject
*
FindObject
(
std
::
string_view
name
)
noexcept
{
for
(
auto
&
o
:
objects
)
if
(
o
.
name
==
name
)
...
...
This diff is collapsed.
Click to expand it.
src/db/plugins/upnp/Object.hxx
View file @
f510564d
...
...
@@ -21,7 +21,6 @@
#define MPD_UPNP_OBJECT_HXX
#include "tag/Tag.hxx"
#include "util/Compiler.h"
#include <string>
...
...
@@ -89,12 +88,12 @@ public:
tag
.
Clear
();
}
gcc_pure
[[
gnu
::
pure
]]
bool
IsRoot
()
const
noexcept
{
return
type
==
Type
::
CONTAINER
&&
id
==
"0"
;
}
gcc_pure
[[
gnu
::
pure
]]
bool
Check
()
const
noexcept
{
return
!
id
.
empty
()
&&
/* root nodes don't need a parent id and a
...
...
This diff is collapsed.
Click to expand it.
src/db/update/ExcludeList.hxx
View file @
f510564d
...
...
@@ -25,7 +25,6 @@
#ifndef MPD_EXCLUDE_H
#define MPD_EXCLUDE_H
#include "util/Compiler.h"
#include "fs/Glob.hxx"
#include "input/Ptr.hxx"
#include "config.h"
...
...
@@ -50,7 +49,7 @@ public:
ExcludeList
(
const
ExcludeList
&
_parent
)
noexcept
:
parent
(
&
_parent
)
{}
gcc_pure
[[
gnu
::
pure
]]
bool
IsEmpty
()
const
noexcept
{
#ifdef HAVE_CLASS_GLOB
return
((
parent
==
nullptr
)
||
parent
->
IsEmpty
())
&&
patterns
.
empty
();
...
...
This diff is collapsed.
Click to expand it.
src/db/update/Queue.hxx
View file @
f510564d
...
...
@@ -20,8 +20,6 @@
#ifndef MPD_UPDATE_QUEUE_HXX
#define MPD_UPDATE_QUEUE_HXX
#include "util/Compiler.h"
#include <string>
#include <string_view>
#include <list>
...
...
@@ -61,7 +59,6 @@ class UpdateQueue {
std
::
list
<
UpdateQueueItem
>
update_queue
;
public
:
gcc_nonnull_all
bool
Push
(
SimpleDatabase
&
db
,
Storage
&
storage
,
std
::
string_view
path
,
bool
discard
,
unsigned
id
)
noexcept
;
...
...
@@ -71,10 +68,8 @@ public:
update_queue
.
clear
();
}
gcc_nonnull_all
void
Erase
(
SimpleDatabase
&
db
)
noexcept
;
gcc_nonnull_all
void
Erase
(
Storage
&
storage
)
noexcept
;
};
...
...
This diff is collapsed.
Click to expand it.
src/db/update/Service.hxx
View file @
f510564d
...
...
@@ -24,7 +24,6 @@
#include "Queue.hxx"
#include "event/InjectEvent.hxx"
#include "thread/Thread.hxx"
#include "util/Compiler.h"
#include <memory>
#include <string_view>
...
...
@@ -90,7 +89,6 @@ public:
* the whole music directory is updated
* @return the job id
*/
gcc_nonnull_all
unsigned
Enqueue
(
std
::
string_view
path
,
bool
discard
);
/**
...
...
This diff is collapsed.
Click to expand it.
src/db/update/UpdateIO.hxx
View file @
f510564d
...
...
@@ -20,8 +20,6 @@
#ifndef MPD_UPDATE_IO_HXX
#define MPD_UPDATE_IO_HXX
#include "util/Compiler.h"
#include <string_view>
struct
Directory
;
...
...
@@ -43,11 +41,11 @@ GetInfo(Storage &storage, const char *uri_utf8, StorageFileInfo &info) noexcept;
bool
GetInfo
(
StorageDirectoryReader
&
reader
,
StorageFileInfo
&
info
)
noexcept
;
gcc_pure
[[
gnu
::
pure
]]
bool
DirectoryExists
(
Storage
&
storage
,
const
Directory
&
directory
)
noexcept
;
gcc_pure
[[
gnu
::
pure
]]
bool
directory_child_is_regular
(
Storage
&
storage
,
const
Directory
&
directory
,
std
::
string_view
name_utf8
)
noexcept
;
...
...
@@ -55,7 +53,7 @@ directory_child_is_regular(Storage &storage, const Directory &directory,
/**
* Checks if the given permissions on the mapped file are given.
*/
gcc_pure
[[
gnu
::
pure
]]
bool
directory_child_access
(
Storage
&
storage
,
const
Directory
&
directory
,
std
::
string_view
name
,
int
mode
)
noexcept
;
...
...
This diff is collapsed.
Click to expand it.
src/db/update/Walk.hxx
View file @
f510564d
...
...
@@ -22,7 +22,6 @@
#include "Config.hxx"
#include "Editor.hxx"
#include "util/Compiler.h"
#include "config.h"
#include <atomic>
...
...
@@ -76,7 +75,7 @@ public:
bool
Walk
(
Directory
&
root
,
const
char
*
path
,
bool
discard
)
noexcept
;
private
:
gcc_pure
[[
gnu
::
pure
]]
bool
SkipSymlink
(
const
Directory
*
directory
,
std
::
string_view
utf8_name
)
const
noexcept
;
...
...
This diff is collapsed.
Click to expand it.
src/decoder/Bridge.hxx
View file @
f510564d
...
...
@@ -132,7 +132,7 @@ public:
*
* Caller must lock the #DecoderControl object.
*/
gcc_pure
[[
gnu
::
pure
]]
bool
CheckCancelRead
()
const
noexcept
;
/**
...
...
This diff is collapsed.
Click to expand it.
src/decoder/Client.hxx
View file @
f510564d
...
...
@@ -23,7 +23,6 @@
#include "Command.hxx"
#include "Chrono.hxx"
#include "input/Ptr.hxx"
#include "util/Compiler.h"
#include <cstdint>
...
...
@@ -57,7 +56,7 @@ public:
* @return the current command, or DecoderCommand::NONE if there is no
* command pending
*/
gcc_pure
[[
gnu
::
pure
]]
virtual
DecoderCommand
GetCommand
()
noexcept
=
0
;
/**
...
...
@@ -72,7 +71,7 @@ public:
*
* @return the destination position for the seek
*/
gcc_pure
[[
gnu
::
pure
]]
virtual
SongTime
GetSeekTime
()
noexcept
=
0
;
/**
...
...
@@ -80,7 +79,7 @@ public:
*
* @return the destination position for the seek in frames
*/
gcc_pure
[[
gnu
::
pure
]]
virtual
uint64_t
GetSeekFrame
()
noexcept
=
0
;
/**
...
...
This diff is collapsed.
Click to expand it.
src/decoder/Control.hxx
View file @
f510564d
...
...
@@ -229,7 +229,7 @@ public:
state
==
DecoderState
::
ERROR
;
}
gcc_pure
[[
gnu
::
pure
]]
bool
LockIsIdle
()
const
noexcept
{
const
std
::
lock_guard
<
Mutex
>
protect
(
mutex
);
return
IsIdle
();
...
...
@@ -239,7 +239,7 @@ public:
return
state
==
DecoderState
::
START
;
}
gcc_pure
[[
gnu
::
pure
]]
bool
LockIsStarting
()
const
noexcept
{
const
std
::
lock_guard
<
Mutex
>
protect
(
mutex
);
return
IsStarting
();
...
...
@@ -251,7 +251,7 @@ public:
return
state
==
DecoderState
::
ERROR
;
}
gcc_pure
[[
gnu
::
pure
]]
bool
LockHasFailed
()
const
noexcept
{
const
std
::
lock_guard
<
Mutex
>
protect
(
mutex
);
return
HasFailed
();
...
...
@@ -307,15 +307,15 @@ public:
*
* Caller must lock the object.
*/
gcc_pure
[[
gnu
::
pure
]]
bool
IsCurrentSong
(
const
DetachedSong
&
_song
)
const
noexcept
;
gcc_pure
[[
gnu
::
pure
]]
bool
IsUnseekableCurrentSong
(
const
DetachedSong
&
_song
)
const
noexcept
{
return
!
seekable
&&
IsCurrentSong
(
_song
);
}
gcc_pure
[[
gnu
::
pure
]]
bool
IsSeekableCurrentSong
(
const
DetachedSong
&
_song
)
const
noexcept
{
return
seekable
&&
IsCurrentSong
(
_song
);
}
...
...
This diff is collapsed.
Click to expand it.
src/decoder/DecoderBuffer.hxx
View file @
f510564d
...
...
@@ -20,7 +20,6 @@
#ifndef MPD_DECODER_BUFFER_HXX
#define MPD_DECODER_BUFFER_HXX
#include "util/Compiler.h"
#include "util/DynamicFifoBuffer.hxx"
#include "util/ConstBuffer.hxx"
...
...
@@ -74,7 +73,7 @@ public:
/**
* How many bytes are stored in the buffer?
*/
gcc_pure
[[
gnu
::
pure
]]
size_t
GetAvailable
()
const
noexcept
{
return
buffer
.
GetAvailable
();
}
...
...
This diff is collapsed.
Click to expand it.
src/decoder/DecoderList.hxx
View file @
f510564d
...
...
@@ -20,8 +20,6 @@
#ifndef MPD_DECODER_LIST_HXX
#define MPD_DECODER_LIST_HXX
#include "util/Compiler.h"
#include <string_view>
struct
ConfigData
;
...
...
@@ -32,7 +30,7 @@ extern bool decoder_plugins_enabled[];
/* interface for using plugins */
gcc_pure
[[
gnu
::
pure
]]
const
struct
DecoderPlugin
*
decoder_plugin_from_name
(
const
char
*
name
)
noexcept
;
...
...
@@ -98,7 +96,7 @@ decoder_plugins_for_each_enabled(F f)
* Is there at least once #DecoderPlugin that supports the specified
* file name suffix?
*/
gcc_pure
gcc_nonnull_all
[[
gnu
::
pure
]]
bool
decoder_plugins_supports_suffix
(
std
::
string_view
suffix
)
noexcept
;
...
...
This diff is collapsed.
Click to expand it.
src/decoder/DecoderPlugin.hxx
View file @
f510564d
...
...
@@ -20,8 +20,6 @@
#ifndef MPD_DECODER_PLUGIN_HXX
#define MPD_DECODER_PLUGIN_HXX
#include "util/Compiler.h"
#include <forward_list> // IWYU pragma: export
#include <set>
#include <string>
...
...
@@ -246,19 +244,19 @@ struct DecoderPlugin {
return
container_scan
(
path
,
tnum
);
}
gcc_pure
[[
gnu
::
pure
]]
bool
SupportsUri
(
const
char
*
uri
)
const
noexcept
;
/**
* Does the plugin announce the specified file name suffix?
*/
gcc_pure
gcc_nonnull_all
[[
gnu
::
pure
]]
bool
SupportsSuffix
(
std
::
string_view
suffix
)
const
noexcept
;
/**
* Does the plugin announce the specified MIME type?
*/
gcc_pure
gcc_nonnull_all
[[
gnu
::
pure
]]
bool
SupportsMimeType
(
std
::
string_view
mime_type
)
const
noexcept
;
bool
SupportsContainerSuffix
(
std
::
string_view
suffix
)
const
noexcept
{
...
...
This diff is collapsed.
Click to expand it.
src/decoder/plugins/DsdLib.hxx
View file @
f510564d
...
...
@@ -22,7 +22,6 @@
#include "util/ByteOrder.hxx"
#include "input/Offset.hxx"
#include "util/Compiler.h"
#include <cstdint>
...
...
@@ -33,7 +32,7 @@ class InputStream;
struct
DsdId
{
char
value
[
4
];
gcc_pure
[[
gnu
::
pure
]]
bool
Equals
(
const
char
*
s
)
const
noexcept
;
};
...
...
@@ -70,7 +69,7 @@ dsdlib_skip(DecoderClient *client, InputStream &is,
/**
* Check if the sample frequency is a valid DSD frequency.
**/
gcc_const
[[
gnu
::
const
]]
bool
dsdlib_valid_freq
(
uint32_t
samplefreq
)
noexcept
;
...
...
This diff is collapsed.
Click to expand it.
src/filter/Registry.hxx
View file @
f510564d
...
...
@@ -26,11 +26,9 @@
#ifndef MPD_FILTER_REGISTRY_HXX
#define MPD_FILTER_REGISTRY_HXX
#include "util/Compiler.h"
struct
FilterPlugin
;
gcc_pure
[[
gnu
::
pure
]]
const
FilterPlugin
*
filter_plugin_by_name
(
const
char
*
name
)
noexcept
;
...
...
This diff is collapsed.
Click to expand it.
src/fs/AllocatedPath.hxx
View file @
f510564d
...
...
@@ -20,7 +20,6 @@
#ifndef MPD_FS_ALLOCATED_PATH_HXX
#define MPD_FS_ALLOCATED_PATH_HXX
#include "util/Compiler.h"
#include "Traits.hxx"
#include "Path.hxx"
...
...
@@ -81,7 +80,7 @@ public:
~
AllocatedPath
()
noexcept
;
gcc_pure
[[
gnu
::
pure
]]
operator
Path
()
const
noexcept
{
return
Path
::
FromFS
(
c_str
());
}
...
...
@@ -89,40 +88,40 @@ public:
/**
* Join two path components with the path separator.
*/
gcc_pure
[[
gnu
::
pure
]]
static
AllocatedPath
Build
(
string_view
a
,
string_view
b
)
noexcept
{
return
AllocatedPath
(
Traits
::
Build
(
a
,
b
));
}
gcc_pure
gcc_nonnull_all
[[
gnu
::
pure
]]
static
AllocatedPath
Build
(
Path
a
,
string_view
b
)
noexcept
{
return
Build
(
a
.
c_str
(),
b
);
}
gcc_pure
gcc_nonnull_all
[[
gnu
::
pure
]]
static
AllocatedPath
Build
(
Path
a
,
Path
b
)
noexcept
{
return
Build
(
a
,
b
.
c_str
());
}
gcc_pure
gcc_nonnull_all
[[
gnu
::
pure
]]
static
AllocatedPath
Build
(
string_view
a
,
const
AllocatedPath
&
b
)
noexcept
{
return
Build
(
a
,
b
.
value
);
}
gcc_pure
gcc_nonnull_all
[[
gnu
::
pure
]]
static
AllocatedPath
Build
(
const
AllocatedPath
&
a
,
string_view
b
)
noexcept
{
return
Build
(
a
.
value
,
b
);
}
gcc_pure
[[
gnu
::
pure
]]
static
AllocatedPath
Build
(
const
AllocatedPath
&
a
,
const
AllocatedPath
&
b
)
noexcept
{
return
Build
(
a
.
value
,
b
.
value
);
}
gcc_pure
[[
gnu
::
pure
]]
static
AllocatedPath
Apply
(
Path
base
,
Path
path
)
noexcept
{
return
Traits
::
Apply
(
base
.
c_str
(),
path
.
c_str
());
}
...
...
@@ -131,17 +130,17 @@ public:
* Convert a C string that is already in the filesystem
* character set to a #Path instance.
*/
gcc_pure
[[
gnu
::
pure
]]
static
AllocatedPath
FromFS
(
const_pointer
fs
)
noexcept
{
return
AllocatedPath
(
fs
);
}
gcc_pure
[[
gnu
::
pure
]]
static
AllocatedPath
FromFS
(
string_view
fs
)
noexcept
{
return
AllocatedPath
(
fs
);
}
gcc_pure
[[
gnu
::
pure
]]
static
AllocatedPath
FromFS
(
const_pointer
_begin
,
const_pointer
_end
)
noexcept
{
return
AllocatedPath
(
_begin
,
_end
);
...
...
@@ -151,13 +150,13 @@ public:
* Convert a C++ string that is already in the filesystem
* character set to a #Path instance.
*/
gcc_pure
[[
gnu
::
pure
]]
static
AllocatedPath
FromFS
(
string
&&
fs
)
noexcept
{
return
AllocatedPath
(
std
::
move
(
fs
));
}
#ifdef ANDROID
gcc_pure
[[
gnu
::
pure
]]
static
AllocatedPath
FromUTF8
(
std
::
string
&&
utf8
)
noexcept
{
/* on Android, the filesystem charset is hard-coded to
UTF-8 */
...
...
@@ -173,7 +172,7 @@ public:
* Convert a UTF-8 C string to an #AllocatedPath instance.
* Returns return a "nulled" instance on error.
*/
gcc_pure
[[
gnu
::
pure
]]
static
AllocatedPath
FromUTF8
(
std
::
string_view
path_utf8
)
noexcept
;
static
AllocatedPath
FromUTF8
(
const
char
*
path_utf8
)
noexcept
{
...
...
@@ -199,12 +198,12 @@ public:
return
*
this
;
}
gcc_pure
[[
gnu
::
pure
]]
bool
operator
==
(
const
AllocatedPath
&
other
)
const
noexcept
{
return
value
==
other
.
value
;
}
gcc_pure
[[
gnu
::
pure
]]
bool
operator
!=
(
const
AllocatedPath
&
other
)
const
noexcept
{
return
value
!=
other
.
value
;
}
...
...
@@ -238,7 +237,7 @@ public:
* @return the length of this string in number of "value_type"
* elements (which may not be the number of characters).
*/
gcc_pure
[[
gnu
::
pure
]]
size_t
length
()
const
noexcept
{
return
value
.
length
();
}
...
...
@@ -248,7 +247,7 @@ public:
* pointer is invalidated whenever the value of life of this
* instance ends.
*/
gcc_pure
[[
gnu
::
pure
]]
const_pointer
c_str
()
const
noexcept
{
return
value
.
c_str
();
}
...
...
@@ -257,7 +256,7 @@ public:
* Returns a pointer to the raw value, not necessarily
* null-terminated.
*/
gcc_pure
[[
gnu
::
pure
]]
const_pointer
data
()
const
noexcept
{
return
value
.
data
();
}
...
...
@@ -267,7 +266,7 @@ public:
* Returns empty string on error or if this instance is "nulled"
* (#IsNull returns true).
*/
gcc_pure
[[
gnu
::
pure
]]
std
::
string
ToUTF8
()
const
noexcept
{
return
((
Path
)
*
this
).
ToUTF8
();
}
...
...
@@ -280,7 +279,7 @@ public:
* Gets directory name of this path.
* Returns a "nulled" instance on error.
*/
gcc_pure
[[
gnu
::
pure
]]
AllocatedPath
GetDirectoryName
()
const
noexcept
{
return
((
Path
)
*
this
).
GetDirectoryName
();
}
...
...
@@ -291,12 +290,12 @@ public:
* empty string if the given path equals this object or
* nullptr on mismatch.
*/
gcc_pure
[[
gnu
::
pure
]]
const_pointer
Relative
(
Path
other_fs
)
const
noexcept
{
return
Traits
::
Relative
(
c_str
(),
other_fs
.
c_str
());
}
gcc_pure
[[
gnu
::
pure
]]
const_pointer
GetSuffix
()
const
noexcept
{
return
((
Path
)
*
this
).
GetSuffix
();
}
...
...
@@ -306,7 +305,7 @@ public:
*/
void
ChopSeparators
()
noexcept
;
gcc_pure
[[
gnu
::
pure
]]
bool
IsAbsolute
()
const
noexcept
{
return
Traits
::
IsAbsolute
(
c_str
());
}
...
...
This diff is collapsed.
Click to expand it.
src/fs/Charset.hxx
View file @
f510564d
...
...
@@ -20,13 +20,12 @@
#ifndef MPD_FS_CHARSET_HXX
#define MPD_FS_CHARSET_HXX
#include "util/Compiler.h"
#include "Traits.hxx"
/**
* Gets file system character set name.
*/
gcc_const
[[
gnu
::
const
]]
const
char
*
GetFSCharset
()
noexcept
;
...
...
This diff is collapsed.
Click to expand it.
src/fs/Glob.hxx
View file @
f510564d
...
...
@@ -30,8 +30,6 @@
#endif
#ifdef HAVE_CLASS_GLOB
#include "util/Compiler.h"
#include <string>
/**
...
...
@@ -48,7 +46,7 @@ public:
Glob
(
Glob
&&
other
)
noexcept
=
default
;
Glob
&
operator
=
(
Glob
&&
other
)
noexcept
=
default
;
gcc_pure
[[
gnu
::
pure
]]
bool
Check
(
const
char
*
name_fs
)
const
noexcept
;
};
...
...
This diff is collapsed.
Click to expand it.
src/fs/Path.hxx
View file @
f510564d
...
...
@@ -20,7 +20,6 @@
#ifndef MPD_FS_PATH_HXX
#define MPD_FS_PATH_HXX
#include "util/Compiler.h"
#include "Traits.hxx"
#include <cassert>
...
...
@@ -88,7 +87,7 @@ public:
* @return the length of this string in number of "value_type"
* elements (which may not be the number of characters).
*/
gcc_pure
[[
gnu
::
pure
]]
size_t
length
()
const
noexcept
{
assert
(
!
IsNull
());
...
...
@@ -117,7 +116,7 @@ public:
* usually rejected by MPD because its protocol cannot
* transfer newline characters).
*/
gcc_pure
[[
gnu
::
pure
]]
bool
HasNewline
()
const
noexcept
{
return
Traits
::
Find
(
c_str
(),
'\n'
)
!=
nullptr
;
}
...
...
@@ -127,7 +126,7 @@ public:
* Returns empty string on error or if this instance is "nulled"
* (#IsNull returns true).
*/
gcc_pure
[[
gnu
::
pure
]]
std
::
string
ToUTF8
()
const
noexcept
;
/**
...
...
@@ -139,7 +138,7 @@ public:
* Determine the "base" file name.
* The return value points inside this object.
*/
gcc_pure
[[
gnu
::
pure
]]
Path
GetBase
()
const
noexcept
{
return
FromFS
(
Traits
::
GetBase
(
c_str
()));
}
...
...
@@ -148,7 +147,7 @@ public:
* Gets directory name of this path.
* Returns a "nulled" instance on error.
*/
gcc_pure
[[
gnu
::
pure
]]
AllocatedPath
GetDirectoryName
()
const
noexcept
;
/**
...
...
@@ -157,17 +156,17 @@ public:
* empty string if the given path equals this object or
* nullptr on mismatch.
*/
gcc_pure
[[
gnu
::
pure
]]
const_pointer
Relative
(
Path
other_fs
)
const
noexcept
{
return
Traits
::
Relative
(
c_str
(),
other_fs
.
c_str
());
}
gcc_pure
[[
gnu
::
pure
]]
bool
IsAbsolute
()
const
noexcept
{
return
Traits
::
IsAbsolute
(
c_str
());
}
gcc_pure
[[
gnu
::
pure
]]
const_pointer
GetSuffix
()
const
noexcept
;
};
...
...
This diff is collapsed.
Click to expand it.
src/fs/StandardDirectory.hxx
View file @
f510564d
...
...
@@ -37,7 +37,7 @@ GetUserMusicDir() noexcept;
/**
* Obtains cache directory for the current user.
*/
gcc_pure
[[
gnu
::
pure
]]
AllocatedPath
GetUserCacheDir
()
noexcept
;
...
...
This diff is collapsed.
Click to expand it.
src/fs/Traits.hxx
View file @
f510564d
...
...
@@ -71,7 +71,7 @@ struct PathTraitsFS {
ch
==
SEPARATOR
;
}
gcc_pure
gcc_nonnull_all
[[
gnu
::
pure
]]
[[
gnu
::
nonnull
]]
static
const_pointer
FindLastSeparator
(
const_pointer
p
)
noexcept
{
#if !CLANG_CHECK_VERSION(3,6)
/* disabled on clang due to -Wtautological-pointer-compare */
...
...
@@ -100,7 +100,7 @@ struct PathTraitsFS {
#endif
}
gcc_pure
[[
gnu
::
pure
]]
static
const_pointer
GetFilenameSuffix
(
const_pointer
filename
)
noexcept
{
const_pointer
dot
=
StringFindLast
(
filename
,
'.'
);
return
dot
!=
nullptr
&&
dot
>
filename
&&
dot
[
1
]
!=
0
...
...
@@ -108,13 +108,13 @@ struct PathTraitsFS {
:
nullptr
;
}
gcc_pure
[[
gnu
::
pure
]]
static
const_pointer
GetPathSuffix
(
const_pointer
path
)
noexcept
{
return
GetFilenameSuffix
(
GetBase
(
path
));
}
#ifdef _WIN32
gcc_pure
gcc_nonnull_all
[[
gnu
::
pure
]]
[[
gnu
::
nonnull
]]
static
constexpr
bool
IsDrive
(
const_pointer
p
)
noexcept
{
return
IsAlphaASCII
(
p
[
0
])
&&
p
[
1
]
==
':'
;
}
...
...
@@ -124,7 +124,7 @@ struct PathTraitsFS {
}
#endif
gcc_pure
gcc_nonnull_all
[[
gnu
::
pure
]]
[[
gnu
::
nonnull
]]
static
bool
IsAbsolute
(
const_pointer
p
)
noexcept
{
#if !CLANG_CHECK_VERSION(3,6)
/* disabled on clang due to -Wtautological-pointer-compare */
...
...
@@ -138,18 +138,18 @@ struct PathTraitsFS {
return
IsSeparator
(
*
p
);
}
gcc_pure
gcc_nonnull_all
[[
gnu
::
pure
]]
[[
gnu
::
nonnull
]]
static
bool
IsSpecialFilename
(
const_pointer
name
)
noexcept
{
return
(
name
[
0
]
==
'.'
&&
name
[
1
]
==
0
)
||
(
name
[
0
]
==
'.'
&&
name
[
1
]
==
'.'
&&
name
[
2
]
==
0
);
}
gcc_pure
gcc_nonnull_all
[[
gnu
::
pure
]]
[[
gnu
::
nonnull
]]
static
size_t
GetLength
(
const_pointer
p
)
noexcept
{
return
StringLength
(
p
);
}
gcc_pure
gcc_nonnull_all
[[
gnu
::
pure
]]
[[
gnu
::
nonnull
]]
static
const_pointer
Find
(
const_pointer
p
,
value_type
ch
)
noexcept
{
return
StringFind
(
p
,
ch
);
}
...
...
@@ -158,7 +158,7 @@ struct PathTraitsFS {
* Determine the "base" file name of the given native path.
* The return value points inside the given string.
*/
gcc_pure
gcc_nonnull_all
[[
gnu
::
pure
]]
[[
gnu
::
nonnull
]]
static
const_pointer
GetBase
(
const_pointer
p
)
noexcept
;
/**
...
...
@@ -166,7 +166,7 @@ struct PathTraitsFS {
* As a special case, returns the string "." if there is no
* separator in the given input string.
*/
gcc_pure
gcc_nonnull_all
[[
gnu
::
pure
]]
[[
gnu
::
nonnull
]]
static
string_view
GetParent
(
const_pointer
p
)
noexcept
;
[[
gnu
::
pure
]]
...
...
@@ -178,10 +178,10 @@ struct PathTraitsFS {
* empty string if the given path equals this object or
* nullptr on mismatch.
*/
gcc_pure
gcc_nonnull_all
[[
gnu
::
pure
]]
[[
gnu
::
nonnull
]]
static
const_pointer
Relative
(
string_view
base
,
const_pointer
other
)
noexcept
;
gcc_pure
[[
gnu
::
pure
]]
static
string_view
Relative
(
string_view
base
,
string_view
other
)
noexcept
;
/**
...
...
@@ -190,14 +190,14 @@ struct PathTraitsFS {
* remaining component is returned unchanged.
* If both components are empty strings, empty string is returned.
*/
gcc_pure
[[
gnu
::
pure
]]
static
string
Build
(
string_view
a
,
string_view
b
)
noexcept
;
/**
* Interpret the given path as being relative to the given
* base, and return the concatenated path.
*/
gcc_pure
[[
gnu
::
pure
]]
static
string
Apply
(
const_pointer
base
,
const_pointer
path
)
noexcept
;
};
...
...
@@ -221,7 +221,7 @@ struct PathTraitsUTF8 {
return
ch
==
SEPARATOR
;
}
gcc_pure
gcc_nonnull_all
[[
gnu
::
pure
]]
[[
gnu
::
nonnull
]]
static
const_pointer
FindLastSeparator
(
const_pointer
p
)
noexcept
{
#if !CLANG_CHECK_VERSION(3,6)
/* disabled on clang due to -Wtautological-pointer-compare */
...
...
@@ -236,7 +236,7 @@ struct PathTraitsUTF8 {
return
StringFindLast
(
p
.
data
(),
SEPARATOR
,
p
.
size
());
}
gcc_pure
[[
gnu
::
pure
]]
static
const_pointer
GetFilenameSuffix
(
const_pointer
filename
)
noexcept
{
const_pointer
dot
=
StringFindLast
(
filename
,
'.'
);
return
dot
!=
nullptr
&&
dot
>
filename
&&
dot
[
1
]
!=
0
...
...
@@ -244,13 +244,13 @@ struct PathTraitsUTF8 {
:
nullptr
;
}
gcc_pure
[[
gnu
::
pure
]]
static
const_pointer
GetPathSuffix
(
const_pointer
path
)
noexcept
{
return
GetFilenameSuffix
(
GetBase
(
path
));
}
#ifdef _WIN32
gcc_pure
gcc_nonnull_all
[[
gnu
::
pure
]]
[[
gnu
::
nonnull
]]
static
constexpr
bool
IsDrive
(
const_pointer
p
)
noexcept
{
return
IsAlphaASCII
(
p
[
0
])
&&
p
[
1
]
==
':'
;
}
...
...
@@ -260,7 +260,7 @@ struct PathTraitsUTF8 {
}
#endif
gcc_pure
gcc_nonnull_all
[[
gnu
::
pure
]]
[[
gnu
::
nonnull
]]
static
bool
IsAbsolute
(
const_pointer
p
)
noexcept
{
#if !CLANG_CHECK_VERSION(3,6)
/* disabled on clang due to -Wtautological-pointer-compare */
...
...
@@ -281,18 +281,18 @@ struct PathTraitsUTF8 {
[[
gnu
::
pure
]]
[[
gnu
::
nonnull
]]
static
bool
IsAbsoluteOrHasScheme
(
const_pointer
p
)
noexcept
;
gcc_pure
gcc_nonnull_all
[[
gnu
::
pure
]]
[[
gnu
::
nonnull
]]
static
bool
IsSpecialFilename
(
const_pointer
name
)
noexcept
{
return
(
name
[
0
]
==
'.'
&&
name
[
1
]
==
0
)
||
(
name
[
0
]
==
'.'
&&
name
[
1
]
==
'.'
&&
name
[
2
]
==
0
);
}
gcc_pure
gcc_nonnull_all
[[
gnu
::
pure
]]
[[
gnu
::
nonnull
]]
static
size_t
GetLength
(
const_pointer
p
)
noexcept
{
return
StringLength
(
p
);
}
gcc_pure
gcc_nonnull_all
[[
gnu
::
pure
]]
[[
gnu
::
nonnull
]]
static
const_pointer
Find
(
const_pointer
p
,
value_type
ch
)
noexcept
{
return
StringFind
(
p
,
ch
);
}
...
...
@@ -301,7 +301,7 @@ struct PathTraitsUTF8 {
* Determine the "base" file name of the given UTF-8 path.
* The return value points inside the given string.
*/
gcc_pure
gcc_nonnull_all
[[
gnu
::
pure
]]
[[
gnu
::
nonnull
]]
static
const_pointer
GetBase
(
const_pointer
p
)
noexcept
;
/**
...
...
@@ -309,7 +309,7 @@ struct PathTraitsUTF8 {
* As a special case, returns the string "." if there is no
* separator in the given input string.
*/
gcc_pure
gcc_nonnull_all
[[
gnu
::
pure
]]
[[
gnu
::
nonnull
]]
static
string_view
GetParent
(
const_pointer
p
)
noexcept
;
[[
gnu
::
pure
]]
...
...
@@ -321,10 +321,10 @@ struct PathTraitsUTF8 {
* empty string if the given path equals this object or
* nullptr on mismatch.
*/
gcc_pure
gcc_nonnull_all
[[
gnu
::
pure
]]
[[
gnu
::
nonnull
]]
static
const_pointer
Relative
(
string_view
base
,
const_pointer
other
)
noexcept
;
gcc_pure
[[
gnu
::
pure
]]
static
string_view
Relative
(
string_view
base
,
string_view
other
)
noexcept
;
/**
...
...
@@ -333,7 +333,7 @@ struct PathTraitsUTF8 {
* remaining component is returned unchanged.
* If both components are empty strings, empty string is returned.
*/
gcc_pure
[[
gnu
::
pure
]]
static
string
Build
(
string_view
a
,
string_view
b
)
noexcept
;
};
...
...
This diff is collapsed.
Click to expand it.
src/fs/io/AutoGunzipReader.cxx
View file @
f510564d
...
...
@@ -25,7 +25,7 @@ AutoGunzipReader::AutoGunzipReader(Reader &_next) noexcept
AutoGunzipReader
::~
AutoGunzipReader
()
noexcept
=
default
;
gcc_pure
[[
gnu
::
pure
]]
static
bool
IsGzip
(
const
uint8_t
data
[
4
])
noexcept
{
...
...
This diff is collapsed.
Click to expand it.
src/fs/io/BufferedReader.hxx
View file @
f510564d
...
...
@@ -30,7 +30,6 @@
#ifndef BUFFERED_READER_HXX
#define BUFFERED_READER_HXX
#include "util/Compiler.h"
#include "util/DynamicFifoBuffer.hxx"
#include <cstddef>
...
...
@@ -64,7 +63,7 @@ public:
bool
Fill
(
bool
need_more
);
gcc_pure
[[
gnu
::
pure
]]
WritableBuffer
<
void
>
Read
()
const
noexcept
{
return
buffer
.
Read
().
ToVoid
();
}
...
...
This diff is collapsed.
Click to expand it.
src/fs/io/FileOutputStream.hxx
View file @
f510564d
...
...
@@ -32,7 +32,6 @@
#include "OutputStream.hxx"
#include "fs/AllocatedPath.hxx"
#include "util/Compiler.h"
#ifndef _WIN32
#include "io/FileDescriptor.hxx"
...
...
@@ -133,7 +132,7 @@ public:
return
path
;
}
gcc_pure
[[
gnu
::
pure
]]
uint64_t
Tell
()
const
noexcept
;
/* virtual methods from class OutputStream */
...
...
This diff is collapsed.
Click to expand it.
src/fs/io/FileReader.hxx
View file @
f510564d
...
...
@@ -32,7 +32,6 @@
#include "Reader.hxx"
#include "fs/AllocatedPath.hxx"
#include "util/Compiler.h"
#ifdef _WIN32
#include <fileapi.h>
...
...
@@ -94,7 +93,7 @@ public:
FileInfo
GetFileInfo
()
const
;
gcc_pure
[[
gnu
::
pure
]]
uint64_t
GetSize
()
const
noexcept
{
#ifdef _WIN32
LARGE_INTEGER
size
;
...
...
@@ -106,7 +105,7 @@ public:
#endif
}
gcc_pure
[[
gnu
::
pure
]]
uint64_t
GetPosition
()
const
noexcept
{
#ifdef _WIN32
LARGE_INTEGER
zero
;
...
...
This diff is collapsed.
Click to expand it.
src/fs/io/Reader.hxx
View file @
f510564d
...
...
@@ -30,8 +30,6 @@
#ifndef READER_HXX
#define READER_HXX
#include "util/Compiler.h"
#include <cstddef>
/**
...
...
@@ -52,7 +50,7 @@ public:
* @return the number of bytes read into the given buffer or 0
* on end-of-stream
*/
gcc_nonnull_all
[[
gnu
::
nonnull
]]
virtual
size_t
Read
(
void
*
data
,
size_t
size
)
=
0
;
};
...
...
This diff is collapsed.
Click to expand it.
src/input/AsyncInputStream.hxx
View file @
f510564d
...
...
@@ -123,7 +123,7 @@ protected:
/**
* Determine how many bytes can be added to the buffer.
*/
gcc_pure
[[
gnu
::
pure
]]
size_t
GetBufferSpace
()
const
noexcept
{
return
buffer
.
GetSpace
();
}
...
...
This diff is collapsed.
Click to expand it.
src/input/Error.hxx
View file @
f510564d
...
...
@@ -20,8 +20,6 @@
#ifndef INPUT_ERROR_HXX
#define INPUT_ERROR_HXX
#include "util/Compiler.h"
#include <exception>
/**
...
...
@@ -29,7 +27,7 @@
* exist? This function attempts to recognize exceptions thrown by
* various input plugins.
*/
gcc_pure
[[
gnu
::
pure
]]
bool
IsFileNotFound
(
std
::
exception_ptr
e
)
noexcept
;
...
...
This diff is collapsed.
Click to expand it.
src/input/IcyInputStream.hxx
View file @
f510564d
...
...
@@ -21,7 +21,6 @@
#define MPD_ICY_INPUT_STREAM_HXX
#include "ProxyInputStream.hxx"
#include "util/Compiler.h"
#include <memory>
...
...
@@ -63,7 +62,7 @@ public:
IcyInputStream
(
const
IcyInputStream
&
)
=
delete
;
IcyInputStream
&
operator
=
(
const
IcyInputStream
&
)
=
delete
;
gcc_pure
[[
gnu
::
pure
]]
bool
IsEnabled
()
const
noexcept
;
/* virtual methods from InputStream */
...
...
This diff is collapsed.
Click to expand it.
src/input/InputPlugin.hxx
View file @
f510564d
...
...
@@ -22,7 +22,6 @@
#include "Ptr.hxx"
#include "thread/Mutex.hxx"
#include "util/Compiler.h"
#include <cassert>
#include <set>
...
...
@@ -83,7 +82,7 @@ struct InputPlugin {
std
::
unique_ptr
<
RemoteTagScanner
>
(
*
scan_tags
)(
const
char
*
uri
,
RemoteTagHandler
&
handler
)
=
nullptr
;
gcc_pure
[[
gnu
::
pure
]]
bool
SupportsUri
(
const
char
*
uri
)
const
noexcept
;
template
<
typename
F
>
...
...
@@ -103,7 +102,7 @@ struct InputPlugin {
}
};
gcc_pure
[[
gnu
::
pure
]]
bool
protocol_is_whitelisted
(
const
char
*
proto
)
noexcept
;
...
...
This diff is collapsed.
Click to expand it.
src/input/InputStream.hxx
View file @
f510564d
...
...
@@ -23,7 +23,6 @@
#include "Offset.hxx"
#include "Ptr.hxx"
#include "thread/Mutex.hxx"
#include "util/Compiler.h"
#include <cassert>
#include <memory>
...
...
@@ -123,14 +122,12 @@ public:
* notifications
* @return an #InputStream object on success
*/
gcc_nonnull
(
1
)
static
InputStreamPtr
Open
(
const
char
*
uri
,
Mutex
&
mutex
);
/**
* Just like Open(), but waits for the stream to become ready.
* It is a wrapper for Open(), WaitReady() and Check().
*/
gcc_nonnull
(
1
)
static
InputStreamPtr
OpenReady
(
const
char
*
uri
,
Mutex
&
mutex
);
/**
...
...
@@ -184,14 +181,14 @@ public:
return
ready
;
}
gcc_pure
[[
gnu
::
pure
]]
bool
HasMimeType
()
const
noexcept
{
assert
(
ready
);
return
!
mime
.
empty
();
}
gcc_pure
[[
gnu
::
pure
]]
const
char
*
GetMimeType
()
const
noexcept
{
assert
(
ready
);
...
...
@@ -202,7 +199,7 @@ public:
mime
.
clear
();
}
gcc_nonnull_all
[[
gnu
::
nonnull
]]
void
SetMimeType
(
const
char
*
_mime
)
noexcept
{
assert
(
!
ready
);
...
...
@@ -215,14 +212,14 @@ public:
mime
=
std
::
move
(
_mime
);
}
gcc_pure
[[
gnu
::
pure
]]
bool
KnownSize
()
const
noexcept
{
assert
(
ready
);
return
size
!=
UNKNOWN_SIZE
;
}
gcc_pure
[[
gnu
::
pure
]]
offset_type
GetSize
()
const
noexcept
{
assert
(
ready
);
assert
(
KnownSize
());
...
...
@@ -236,14 +233,14 @@ public:
offset
+=
delta
;
}
gcc_pure
[[
gnu
::
pure
]]
offset_type
GetOffset
()
const
noexcept
{
assert
(
ready
);
return
offset
;
}
gcc_pure
[[
gnu
::
pure
]]
offset_type
GetRest
()
const
noexcept
{
assert
(
ready
);
assert
(
KnownSize
());
...
...
@@ -251,7 +248,7 @@ public:
return
size
-
offset
;
}
gcc_pure
[[
gnu
::
pure
]]
bool
IsSeekable
()
const
noexcept
{
assert
(
ready
);
...
...
@@ -261,7 +258,7 @@ public:
/**
* Determines whether seeking is cheap. This is true for local files.
*/
gcc_pure
[[
gnu
::
pure
]]
bool
CheapSeeking
()
const
noexcept
;
/**
...
...
@@ -313,14 +310,14 @@ public:
*
* The caller must lock the mutex.
*/
gcc_pure
[[
gnu
::
pure
]]
virtual
bool
IsEOF
()
const
noexcept
=
0
;
/**
* Wrapper for IsEOF() which locks and unlocks the mutex; the
* caller must not be holding it already.
*/
gcc_pure
[[
gnu
::
pure
]]
bool
LockIsEOF
()
const
noexcept
;
/**
...
...
@@ -346,7 +343,7 @@ public:
*
* The caller must lock the mutex.
*/
gcc_pure
[[
gnu
::
pure
]]
virtual
bool
IsAvailable
()
const
noexcept
;
/**
...
...
@@ -363,7 +360,7 @@ public:
* @param size the maximum number of bytes to read
* @return the number of bytes read
*/
gcc_nonnull_all
[[
gnu
::
nonnull
]]
virtual
size_t
Read
(
std
::
unique_lock
<
Mutex
>
&
lock
,
void
*
ptr
,
size_t
size
)
=
0
;
...
...
@@ -373,7 +370,7 @@ public:
*
* Throws std::runtime_error on error.
*/
gcc_nonnull_all
[[
gnu
::
nonnull
]]
size_t
LockRead
(
void
*
ptr
,
size_t
size
);
/**
...
...
@@ -387,7 +384,7 @@ public:
* @param size the number of bytes to read
* @return true if the whole data was read, false otherwise.
*/
gcc_nonnull_all
[[
gnu
::
nonnull
]]
void
ReadFull
(
std
::
unique_lock
<
Mutex
>
&
lock
,
void
*
ptr
,
size_t
size
);
/**
...
...
@@ -396,7 +393,7 @@ public:
*
* Throws std::runtime_error on error.
*/
gcc_nonnull_all
[[
gnu
::
nonnull
]]
void
LockReadFull
(
void
*
ptr
,
size_t
size
);
protected
:
...
...
This diff is collapsed.
Click to expand it.
src/input/Registry.hxx
View file @
f510564d
...
...
@@ -20,8 +20,6 @@
#ifndef MPD_INPUT_REGISTRY_HXX
#define MPD_INPUT_REGISTRY_HXX
#include "util/Compiler.h"
/**
* NULL terminated list of all input plugins which were enabled at
* compile time.
...
...
@@ -40,7 +38,7 @@ extern bool input_plugins_enabled[];
input_plugins_for_each(plugin) \
if (input_plugins_enabled[input_plugin_iterator - input_plugins])
gcc_pure
[[
gnu
::
pure
]]
bool
HasRemoteTagScanner
(
const
char
*
uri
)
noexcept
;
...
...
This diff is collapsed.
Click to expand it.
src/input/cache/Manager.hxx
View file @
f510564d
...
...
@@ -21,7 +21,6 @@
#define MPD_INPUT_CACHE_MANAGER_HXX
#include "thread/Mutex.hxx"
#include "util/Compiler.h"
#include <boost/intrusive/set.hpp>
#include <boost/intrusive/list.hpp>
...
...
@@ -43,15 +42,15 @@ class InputCacheManager {
size_t
total_size
=
0
;
struct
ItemCompare
{
gcc_pure
[[
gnu
::
pure
]]
bool
operator
()(
const
InputCacheItem
&
a
,
const
char
*
b
)
const
noexcept
;
gcc_pure
[[
gnu
::
pure
]]
bool
operator
()(
const
char
*
a
,
const
InputCacheItem
&
b
)
const
noexcept
;
gcc_pure
[[
gnu
::
pure
]]
bool
operator
()(
const
InputCacheItem
&
a
,
const
InputCacheItem
&
b
)
const
noexcept
;
};
...
...
@@ -74,7 +73,7 @@ public:
void
Flush
()
noexcept
;
gcc_pure
[[
gnu
::
pure
]]
bool
Contains
(
const
char
*
uri
)
noexcept
;
/**
...
...
This diff is collapsed.
Click to expand it.
src/input/plugins/FfmpegInputPlugin.cxx
View file @
f510564d
...
...
@@ -55,7 +55,7 @@ public:
offset_type
offset
)
override
;
};
gcc_const
[[
gnu
::
const
]]
static
inline
bool
input_ffmpeg_supported
()
noexcept
{
...
...
This diff is collapsed.
Click to expand it.
src/input/plugins/QobuzClient.hxx
View file @
f510564d
...
...
@@ -77,7 +77,7 @@ public:
return
format_id
;
}
gcc_pure
[[
gnu
::
pure
]]
CurlGlobal
&
GetCurl
()
noexcept
;
void
AddLoginHandler
(
QobuzSessionHandler
&
h
)
noexcept
;
...
...
This diff is collapsed.
Click to expand it.
src/input/plugins/QobuzInputPlugin.cxx
View file @
f510564d
...
...
@@ -166,7 +166,7 @@ FinishQobuzInput() noexcept
delete
qobuz_client
;
}
gcc_pure
[[
gnu
::
pure
]]
static
const
char
*
ExtractQobuzTrackId
(
const
char
*
uri
)
{
...
...
This diff is collapsed.
Click to expand it.
src/java/File.hxx
View file @
f510564d
...
...
@@ -48,10 +48,10 @@ class File : public LocalObject {
public
:
using
LocalObject
::
LocalObject
;
gcc_nonnull_all
[[
gnu
::
nonnull
]]
static
void
Initialise
(
JNIEnv
*
env
)
noexcept
;
gcc_nonnull_all
[[
gnu
::
nonnull
]]
static
jstring
GetAbsolutePath
(
JNIEnv
*
env
,
jobject
file
)
noexcept
{
return
(
jstring
)
env
->
CallObjectMethod
(
file
,
getAbsolutePath_method
);
...
...
@@ -69,7 +69,7 @@ public:
* Invoke File.getAbsolutePath() and release the
* specified File reference.
*/
gcc_pure
gcc_nonnull_all
[[
gnu
::
pure
]]
[[
gnu
::
nonnull
]]
static
AllocatedPath
ToAbsolutePath
(
JNIEnv
*
env
,
jobject
file
)
noexcept
;
};
...
...
This diff is collapsed.
Click to expand it.
src/java/Global.hxx
View file @
f510564d
...
...
@@ -30,8 +30,6 @@
#ifndef JAVA_GLOBAL_HXX
#define JAVA_GLOBAL_HXX
#include "util/Compiler.h"
#include <jni.h>
namespace
Java
{
...
...
@@ -47,8 +45,9 @@ DetachCurrentThread() noexcept
jvm
->
DetachCurrentThread
();
}
static
inline
gcc_pure
JNIEnv
*
GetEnv
()
noexcept
[[
gnu
::
pure
]]
static
inline
JNIEnv
*
GetEnv
()
noexcept
{
JNIEnv
*
env
;
jvm
->
AttachCurrentThread
(
&
env
,
nullptr
);
...
...
This diff is collapsed.
Click to expand it.
src/lib/alsa/Format.hxx
View file @
f510564d
...
...
@@ -43,7 +43,7 @@
* enum. Returns SND_PCM_FORMAT_UNKNOWN if there is no according ALSA
* PCM format.
*/
gcc_const
[[
gnu
::
const
]]
inline
snd_pcm_format_t
ToAlsaPcmFormat
(
SampleFormat
sample_format
)
noexcept
{
...
...
@@ -82,7 +82,7 @@ ToAlsaPcmFormat(SampleFormat sample_format) noexcept
* Determine the byte-swapped PCM format. Returns
* SND_PCM_FORMAT_UNKNOWN if the format cannot be byte-swapped.
*/
gcc_const
[[
gnu
::
const
]]
inline
snd_pcm_format_t
ByteSwapAlsaPcmFormat
(
snd_pcm_format_t
fmt
)
noexcept
{
...
...
@@ -123,8 +123,7 @@ ByteSwapAlsaPcmFormat(snd_pcm_format_t fmt) noexcept
* Check if there is a "packed" version of the give PCM format.
* Returns SND_PCM_FORMAT_UNKNOWN if not.
*/
gcc_const
inline
snd_pcm_format_t
constexpr
snd_pcm_format_t
PackAlsaPcmFormat
(
snd_pcm_format_t
fmt
)
noexcept
{
switch
(
fmt
)
{
...
...
This diff is collapsed.
Click to expand it.
src/lib/alsa/Version.cxx
View file @
f510564d
...
...
@@ -23,7 +23,7 @@
#include <stdlib.h>
gcc_pure
[[
gnu
::
pure
]]
static
uint_least32_t
ParseAlsaVersion
(
const
char
*
p
)
noexcept
{
...
...
This diff is collapsed.
Click to expand it.
src/lib/alsa/Version.hxx
View file @
f510564d
...
...
@@ -20,8 +20,6 @@
#ifndef MPD_ALSA_VERSION_HXX
#define MPD_ALSA_VERSION_HXX
#include "util/Compiler.h"
#include <cstdint>
static
constexpr
uint_least32_t
...
...
@@ -35,7 +33,7 @@ MakeAlsaVersion(uint_least32_t major, uint_least32_t minor,
* Wrapper for snd_asoundlib_version() which translates the resulting
* string to an integer constructed with MakeAlsaVersion().
*/
gcc_const
[[
gnu
::
const
]]
uint_least32_t
GetRuntimeAlsaVersion
()
noexcept
;
...
...
This diff is collapsed.
Click to expand it.
src/lib/cdio/Paranoia.hxx
View file @
f510564d
...
...
@@ -31,7 +31,6 @@
#define CDIO_PARANOIA_HXX
#include "util/ConstBuffer.hxx"
#include "util/Compiler.h"
#include <cdio/version.h>
#include <cdio/paranoia/paranoia.h>
...
...
@@ -88,7 +87,7 @@ public:
return
std
::
pair
(
first
,
last
);
}
gcc_pure
[[
gnu
::
pure
]]
bool
IsAudioTrack
(
track_t
i
)
const
noexcept
{
return
cdio_cddap_track_audiop
(
drv
,
i
);
}
...
...
@@ -101,7 +100,7 @@ public:
return
std
::
pair
(
first
,
last
);
}
gcc_pure
[[
gnu
::
pure
]]
unsigned
GetTrackCount
()
const
noexcept
{
return
cdio_cddap_tracks
(
drv
);
}
...
...
This diff is collapsed.
Click to expand it.
src/lib/crypto/MD5.hxx
View file @
f510564d
...
...
@@ -31,7 +31,6 @@
#define MD5_HXX
#include "util/StringBuffer.hxx"
#include "util/Compiler.h"
#include <array>
#include <cstdint>
...
...
@@ -41,11 +40,11 @@ template<typename T> struct ConstBuffer;
void
GlobalInitMD5
()
noexcept
;
gcc_pure
[[
gnu
::
pure
]]
std
::
array
<
uint8_t
,
16
>
MD5
(
ConstBuffer
<
void
>
input
)
noexcept
;
gcc_pure
[[
gnu
::
pure
]]
StringBuffer
<
33
>
MD5Hex
(
ConstBuffer
<
void
>
input
)
noexcept
;
...
...
This diff is collapsed.
Click to expand it.
src/lib/curl/Easy.hxx
View file @
f510564d
/*
* Copyright 2016-20
18
Max Kellermann <max.kellermann@gmail.com>
* Copyright 2016-20
21
Max Kellermann <max.kellermann@gmail.com>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
...
...
@@ -31,7 +31,6 @@
#define CURL_EASY_HXX
#include "String.hxx"
#include "util/Compiler.h"
#include <curl/curl.h>
...
...
@@ -199,7 +198,7 @@ public:
/**
* Returns the response body's size, or -1 if that is unknown.
*/
gcc_pure
[[
gnu
::
pure
]]
int64_t
GetContentLength
()
const
noexcept
{
double
value
;
return
GetInfo
(
CURLINFO_CONTENT_LENGTH_DOWNLOAD
,
&
value
)
...
...
This diff is collapsed.
Click to expand it.
src/lib/curl/Global.cxx
View file @
f510564d
...
...
@@ -31,6 +31,7 @@
#include "Request.hxx"
#include "event/Loop.hxx"
#include "event/SocketEvent.hxx"
#include "util/Compiler.h"
#include <cassert>
...
...
@@ -84,7 +85,7 @@ private:
(
flags
&
SocketEvent
::
ERROR
?
CURL_CSELECT_ERR
:
0
);
}
gcc_const
[[
gnu
::
const
]]
static
unsigned
CurlPollToFlags
(
int
action
)
noexcept
{
switch
(
action
)
{
case
CURL_POLL_NONE
:
...
...
@@ -172,7 +173,7 @@ CurlGlobal::Remove(CurlRequest &r) noexcept
/**
* Find a request by its CURL "easy" handle.
*/
gcc_pure
[[
gnu
::
pure
]]
static
CurlRequest
*
ToRequest
(
CURL
*
easy
)
noexcept
{
...
...
This diff is collapsed.
Click to expand it.
src/lib/curl/Request.cxx
View file @
f510564d
...
...
@@ -172,7 +172,7 @@ CurlRequest::Done(CURLcode result) noexcept
}
}
gcc_pure
[[
gnu
::
pure
]]
static
bool
IsResponseBoundaryHeader
(
StringView
s
)
noexcept
{
...
...
This diff is collapsed.
Click to expand it.
src/lib/curl/Version.hxx
View file @
f510564d
...
...
@@ -30,9 +30,7 @@
#ifndef CURL_VERSION_HXX
#define CURL_VERSION_HXX
#include "util/Compiler.h"
gcc_const
[[
gnu
::
const
]]
bool
IsCurlOlderThan
(
unsigned
version_num
)
noexcept
;
...
...
This diff is collapsed.
Click to expand it.
src/lib/dbus/Error.hxx
View file @
f510564d
...
...
@@ -33,8 +33,6 @@
#ifndef ODBUS_ERROR_HXX
#define ODBUS_ERROR_HXX
#include "util/Compiler.h"
#include <dbus/dbus.h>
namespace
ODBus
{
...
...
@@ -54,7 +52,7 @@ public:
Error
(
const
Error
&
)
=
delete
;
Error
&
operator
=
(
const
Error
&
)
=
delete
;
gcc_pure
[[
gnu
::
pure
]]
operator
bool
()
const
noexcept
{
return
dbus_error_is_set
(
&
error
);
}
...
...
This diff is collapsed.
Click to expand it.
src/lib/expat/ExpatParser.hxx
View file @
f510564d
...
...
@@ -20,8 +20,6 @@
#ifndef MPD_EXPAT_HXX
#define MPD_EXPAT_HXX
#include "util/Compiler.h"
#include <expat.h>
#include <stdexcept>
...
...
@@ -80,11 +78,11 @@ public:
void
Parse
(
InputStream
&
is
);
gcc_pure
[[
gnu
::
pure
]]
static
const
char
*
GetAttribute
(
const
XML_Char
**
atts
,
const
char
*
name
)
noexcept
;
gcc_pure
[[
gnu
::
pure
]]
static
const
char
*
GetAttributeCase
(
const
XML_Char
**
atts
,
const
char
*
name
)
noexcept
;
};
...
...
@@ -117,13 +115,13 @@ public:
parser
.
CompleteParse
();
}
gcc_pure
[[
gnu
::
pure
]]
static
const
char
*
GetAttribute
(
const
XML_Char
**
atts
,
const
char
*
name
)
noexcept
{
return
ExpatParser
::
GetAttribute
(
atts
,
name
);
}
gcc_pure
[[
gnu
::
pure
]]
static
const
char
*
GetAttributeCase
(
const
XML_Char
**
atts
,
const
char
*
name
)
noexcept
{
return
ExpatParser
::
GetAttributeCase
(
atts
,
name
);
...
...
This diff is collapsed.
Click to expand it.
src/lib/ffmpeg/Buffer.hxx
View file @
f510564d
...
...
@@ -20,8 +20,6 @@
#ifndef MPD_FFMPEG_BUFFER_HXX
#define MPD_FFMPEG_BUFFER_HXX
#include "util/Compiler.h"
extern
"C"
{
#include <libavutil/mem.h>
}
...
...
@@ -42,7 +40,7 @@ public:
FfmpegBuffer
(
const
FfmpegBuffer
&
)
=
delete
;
FfmpegBuffer
&
operator
=
(
const
FfmpegBuffer
&
)
=
delete
;
gcc_malloc
[[
gnu
::
malloc
]]
void
*
Get
(
size_t
min_size
)
noexcept
{
av_fast_malloc
(
&
data
,
&
size
,
min_size
);
return
data
;
...
...
This diff is collapsed.
Click to expand it.
src/lib/ffmpeg/IOContext.hxx
View file @
f510564d
...
...
@@ -20,7 +20,6 @@
#ifndef MPD_FFMPEG_IO_CONTEXT_HXX
#define MPD_FFMPEG_IO_CONTEXT_HXX
#include "util/Compiler.h"
#include "Error.hxx"
extern
"C"
{
...
...
@@ -65,12 +64,12 @@ public:
return
io_context
;
}
gcc_pure
[[
gnu
::
pure
]]
auto
GetSize
()
const
noexcept
{
return
avio_size
(
io_context
);
}
gcc_pure
[[
gnu
::
pure
]]
bool
IsEOF
()
const
noexcept
{
return
avio_feof
(
io_context
)
!=
0
;
}
...
...
This diff is collapsed.
Click to expand it.
src/lib/ffmpeg/Time.hxx
View file @
f510564d
...
...
@@ -21,7 +21,6 @@
#define MPD_FFMPEG_TIME_HXX
#include "Chrono.hxx"
#include "util/Compiler.h"
extern
"C"
{
#include <libavutil/avutil.h>
...
...
@@ -41,7 +40,7 @@ static constexpr AVRational AV_TIME_BASE_Q{1, AV_TIME_BASE};
/**
* Convert a FFmpeg time stamp to a floating point value (in seconds).
*/
gcc_const
[[
gnu
::
const
]]
static
inline
FloatDuration
FfmpegTimeToDouble
(
int64_t
t
,
const
AVRational
time_base
)
noexcept
{
...
...
@@ -64,7 +63,7 @@ RatioToAVRational()
/**
* Convert a FFmpeg time stamp to a #SongTime.
*/
gcc_const
[[
gnu
::
const
]]
static
inline
SongTime
FromFfmpegTime
(
int64_t
t
,
const
AVRational
time_base
)
noexcept
{
...
...
@@ -77,7 +76,7 @@ FromFfmpegTime(int64_t t, const AVRational time_base) noexcept
/**
* Convert a FFmpeg time stamp to a #SignedSongTime.
*/
gcc_const
[[
gnu
::
const
]]
static
inline
SignedSongTime
FromFfmpegTimeChecked
(
int64_t
t
,
const
AVRational
time_base
)
noexcept
{
...
...
@@ -89,7 +88,7 @@ FromFfmpegTimeChecked(int64_t t, const AVRational time_base) noexcept
/**
* Convert a #SongTime to a FFmpeg time stamp with the given base.
*/
gcc_const
[[
gnu
::
const
]]
static
inline
int64_t
ToFfmpegTime
(
SongTime
t
,
const
AVRational
time_base
)
noexcept
{
...
...
@@ -104,7 +103,7 @@ ToFfmpegTime(SongTime t, const AVRational time_base) noexcept
constexpr
int64_t
FfmpegTimestampFallback
(
int64_t
t
,
int64_t
fallback
)
{
return
gcc_likely
(
t
!=
int64_t
(
AV_NOPTS_VALUE
)
)
return
t
!=
int64_t
(
AV_NOPTS_VALUE
)
?
t
:
fallback
;
}
...
...
This diff is collapsed.
Click to expand it.
src/lib/gcrypt/Hash.hxx
View file @
f510564d
...
...
@@ -31,7 +31,6 @@
#define GCRYPT_HASH_HXX
#include "util/ConstBuffer.hxx"
#include "util/Compiler.h"
#include <gcrypt.h>
...
...
@@ -40,7 +39,7 @@
namespace
Gcrypt
{
template
<
int
algo
,
size_t
size
>
gcc_pure
[[
gnu
::
pure
]]
auto
Hash
(
ConstBuffer
<
void
>
input
)
noexcept
{
...
...
This diff is collapsed.
Click to expand it.
src/lib/gcrypt/MD5.hxx
View file @
f510564d
...
...
@@ -31,7 +31,6 @@
#define GCRYPT_MD5_HXX
#include "util/StringBuffer.hxx"
#include "util/Compiler.h"
#include <array>
#include <cstdint>
...
...
@@ -40,7 +39,7 @@ template<typename T> struct ConstBuffer;
namespace
Gcrypt
{
gcc_pure
[[
gnu
::
pure
]]
std
::
array
<
uint8_t
,
16
>
MD5
(
ConstBuffer
<
void
>
input
)
noexcept
;
...
...
This diff is collapsed.
Click to expand it.
src/lib/icu/Collate.cxx
View file @
f510564d
...
...
@@ -76,7 +76,7 @@ IcuCollateFinish() noexcept
#endif
gcc_pure
[[
gnu
::
pure
]]
int
IcuCollate
(
std
::
string_view
a
,
std
::
string_view
b
)
noexcept
{
...
...
This diff is collapsed.
Click to expand it.
src/lib/icu/Collate.hxx
View file @
f510564d
...
...
@@ -20,8 +20,6 @@
#ifndef MPD_ICU_COLLATE_HXX
#define MPD_ICU_COLLATE_HXX
#include "util/Compiler.h"
#include <string_view>
/**
...
...
@@ -33,7 +31,7 @@ IcuCollateInit();
void
IcuCollateFinish
()
noexcept
;
gcc_pure
[[
gnu
::
pure
]]
int
IcuCollate
(
std
::
string_view
a
,
std
::
string_view
b
)
noexcept
;
...
...
This diff is collapsed.
Click to expand it.
src/lib/icu/Compare.hxx
View file @
f510564d
...
...
@@ -20,7 +20,6 @@
#ifndef MPD_ICU_COMPARE_HXX
#define MPD_ICU_COMPARE_HXX
#include "util/Compiler.h"
#include "util/AllocatedString.hxx"
#include <string_view>
...
...
@@ -63,15 +62,15 @@ public:
IcuCompare
(
IcuCompare
&&
)
=
default
;
IcuCompare
&
operator
=
(
IcuCompare
&&
)
=
default
;
gcc_pure
[[
gnu
::
pure
]]
operator
bool
()
const
noexcept
{
return
needle
!=
nullptr
;
}
gcc_pure
[[
gnu
::
pure
]]
bool
operator
==
(
const
char
*
haystack
)
const
noexcept
;
gcc_pure
[[
gnu
::
pure
]]
bool
IsIn
(
const
char
*
haystack
)
const
noexcept
;
};
...
...
This diff is collapsed.
Click to expand it.
src/lib/icu/Converter.hxx
View file @
f510564d
...
...
@@ -20,7 +20,6 @@
#ifndef MPD_ICU_CONVERTER_HXX
#define MPD_ICU_CONVERTER_HXX
#include "util/Compiler.h"
#include "config.h"
#ifdef HAVE_ICU
...
...
@@ -84,7 +83,6 @@ public:
*
* Throws std::runtime_error on error.
*/
gcc_nonnull_all
AllocatedString
ToUTF8
(
std
::
string_view
s
)
const
;
/**
...
...
@@ -92,7 +90,6 @@ public:
*
* Throws std::runtime_error on error.
*/
gcc_nonnull_all
AllocatedString
FromUTF8
(
std
::
string_view
s
)
const
;
};
...
...
This diff is collapsed.
Click to expand it.
src/lib/icu/Win32.hxx
View file @
f510564d
...
...
@@ -20,8 +20,6 @@
#ifndef MPD_ICU_WIN32_HXX
#define MPD_ICU_WIN32_HXX
#include "util/Compiler.h"
#include <string_view>
class
AllocatedString
;
...
...
@@ -30,14 +28,14 @@ template<typename T> class BasicAllocatedString;
/**
* Throws std::system_error on error.
*/
gcc_pure
gcc_nonnull_all
[[
gnu
::
pure
]]
AllocatedString
WideCharToMultiByte
(
unsigned
code_page
,
std
::
wstring_view
src
);
/**
* Throws std::system_error on error.
*/
gcc_pure
gcc_nonnull_all
[[
gnu
::
pure
]]
BasicAllocatedString
<
wchar_t
>
MultiByteToWideChar
(
unsigned
code_page
,
std
::
string_view
src
);
...
...
This diff is collapsed.
Click to expand it.
src/lib/nfs/Base.hxx
View file @
f510564d
...
...
@@ -20,8 +20,6 @@
#ifndef MPD_NFS_BASE_HXX
#define MPD_NFS_BASE_HXX
#include "util/Compiler.h"
/**
* Set the "base" NFS server and export name. This will be the
* default export that will be mounted if a file within this export is
...
...
@@ -38,7 +36,7 @@ nfs_set_base(const char *server, const char *export_name) noexcept;
* "path" after the export_name is returned; otherwise, nullptr is
* returned.
*/
gcc_pure
[[
gnu
::
pure
]]
const
char
*
nfs_check_base
(
const
char
*
server
,
const
char
*
path
)
noexcept
;
...
...
This diff is collapsed.
Click to expand it.
src/lib/nfs/Cancellable.hxx
View file @
f510564d
...
...
@@ -20,8 +20,6 @@
#ifndef MPD_NFS_CANCELLABLE_HXX
#define MPD_NFS_CANCELLABLE_HXX
#include "util/Compiler.h"
#include <boost/intrusive/list.hpp>
#include <algorithm>
...
...
@@ -89,35 +87,35 @@ private:
}
};
gcc_pure
[[
gnu
::
pure
]]
iterator
Find
(
reference
p
)
noexcept
{
return
std
::
find_if
(
list
.
begin
(),
list
.
end
(),
MatchPointer
(
p
));
}
gcc_pure
[[
gnu
::
pure
]]
const_iterator
Find
(
const_reference
p
)
const
noexcept
{
return
std
::
find_if
(
list
.
begin
(),
list
.
end
(),
MatchPointer
(
p
));
}
gcc_pure
[[
gnu
::
pure
]]
iterator
Find
(
CT
&
c
)
noexcept
{
return
list
.
iterator_to
(
c
);
}
gcc_pure
[[
gnu
::
pure
]]
const_iterator
Find
(
const
CT
&
c
)
const
noexcept
{
return
list
.
iterator_to
(
c
);
}
public
:
#ifndef NDEBUG
gcc_pure
[[
gnu
::
pure
]]
bool
IsEmpty
()
const
noexcept
{
return
std
::
all_of
(
list
.
begin
(),
list
.
end
(),
[](
const
auto
&
c
)
{
return
c
.
IsCancelled
();
});
}
#endif
gcc_pure
[[
gnu
::
pure
]]
bool
Contains
(
const_reference
p
)
const
noexcept
{
return
Find
(
p
)
!=
list
.
end
();
}
...
...
This diff is collapsed.
Click to expand it.
src/lib/nfs/Connection.hxx
View file @
f510564d
...
...
@@ -24,7 +24,6 @@
#include "event/SocketEvent.hxx"
#include "event/CoarseTimerEvent.hxx"
#include "event/DeferEvent.hxx"
#include "util/Compiler.h"
#include <string>
#include <list>
...
...
@@ -139,7 +138,7 @@ class NfsConnection {
bool
mount_finished
;
public
:
gcc_nonnull_all
[[
gnu
::
nonnull
]]
NfsConnection
(
EventLoop
&
_loop
,
const
char
*
_server
,
const
char
*
_export_name
)
noexcept
:
socket_event
(
_loop
,
BIND_THIS_METHOD
(
OnSocketReady
)),
...
...
@@ -157,12 +156,12 @@ public:
return
socket_event
.
GetEventLoop
();
}
gcc_pure
[[
gnu
::
pure
]]
const
char
*
GetServer
()
const
noexcept
{
return
server
.
c_str
();
}
gcc_pure
[[
gnu
::
pure
]]
const
char
*
GetExportName
()
const
noexcept
{
return
export_name
.
c_str
();
}
...
...
This diff is collapsed.
Click to expand it.
src/lib/nfs/Glue.hxx
View file @
f510564d
...
...
@@ -20,8 +20,6 @@
#ifndef MPD_NFS_GLUE_HXX
#define MPD_NFS_GLUE_HXX
#include "util/Compiler.h"
class
EventLoop
;
class
NfsConnection
;
...
...
@@ -34,11 +32,11 @@ nfs_finish() noexcept;
/**
* Return the EventLoop that was passed to nfs_init().
*/
gcc_const
[[
gnu
::
const
]]
EventLoop
&
nfs_get_event_loop
()
noexcept
;
gcc_pure
[[
gnu
::
pure
]]
NfsConnection
&
nfs_get_connection
(
const
char
*
server
,
const
char
*
export_name
)
noexcept
;
...
...
This diff is collapsed.
Click to expand it.
src/lib/nfs/Manager.hxx
View file @
f510564d
...
...
@@ -21,7 +21,6 @@
#define MPD_NFS_MANAGER_HXX
#include "Connection.hxx"
#include "util/Compiler.h"
#include "event/IdleEvent.hxx"
#include <boost/intrusive/set.hpp>
...
...
@@ -56,15 +55,15 @@ class NfsManager final {
};
struct
Compare
{
gcc_pure
[[
gnu
::
pure
]]
bool
operator
()(
const
LookupKey
a
,
const
ManagedConnection
&
b
)
const
noexcept
;
gcc_pure
[[
gnu
::
pure
]]
bool
operator
()(
const
ManagedConnection
&
a
,
const
LookupKey
b
)
const
noexcept
;
gcc_pure
[[
gnu
::
pure
]]
bool
operator
()(
const
ManagedConnection
&
a
,
const
ManagedConnection
&
b
)
const
noexcept
;
};
...
...
@@ -102,7 +101,7 @@ public:
return
idle_event
.
GetEventLoop
();
}
gcc_pure
[[
gnu
::
pure
]]
NfsConnection
&
GetConnection
(
const
char
*
server
,
const
char
*
export_name
)
noexcept
;
...
...
This diff is collapsed.
Click to expand it.
src/lib/pcre/RegexPointer.hxx
View file @
f510564d
...
...
@@ -59,7 +59,7 @@ public:
return
re
!=
nullptr
;
}
gcc_pure
[[
gnu
::
pure
]]
bool
Match
(
StringView
s
)
const
noexcept
{
/* we don't need the data written to ovector, but PCRE can
omit internal allocations if we pass a buffer to
...
...
This diff is collapsed.
Click to expand it.
src/lib/upnp/ContentDirectoryService.hxx
View file @
f510564d
...
...
@@ -21,7 +21,6 @@
#define _UPNPDIR_HXX_INCLUDED_
#include "Compat.hxx"
#include "util/Compiler.h"
#include <string>
#include <forward_list>
...
...
@@ -112,7 +111,7 @@ public:
*/
std
::
forward_list
<
std
::
string
>
getSearchCapabilities
(
UpnpClient_Handle
handle
)
const
;
gcc_pure
[[
gnu
::
pure
]]
std
::
string
GetURI
()
const
noexcept
{
return
"upnp://"
+
m_deviceId
+
"/"
+
m_serviceType
;
}
...
...
This diff is collapsed.
Click to expand it.
src/lib/xiph/FlacMetadataChain.hxx
View file @
f510564d
...
...
@@ -20,8 +20,6 @@
#ifndef MPD_FLAC_METADATA_CHAIN_HXX
#define MPD_FLAC_METADATA_CHAIN_HXX
#include "util/Compiler.h"
#include <FLAC/metadata.h>
class
InputStream
;
...
...
@@ -67,12 +65,12 @@ public:
bool
ReadOgg
(
InputStream
&
is
)
noexcept
;
gcc_pure
[[
gnu
::
pure
]]
FLAC__Metadata_ChainStatus
GetStatus
()
const
noexcept
{
return
::
FLAC__metadata_chain_status
(
chain
);
}
gcc_pure
[[
gnu
::
pure
]]
const
char
*
GetStatusString
()
const
noexcept
{
return
FLAC__Metadata_ChainStatusString
[
GetStatus
()];
}
...
...
This diff is collapsed.
Click to expand it.
src/ls.hxx
View file @
f510564d
...
...
@@ -20,8 +20,6 @@
#ifndef MPD_LS_HXX
#define MPD_LS_HXX
#include "util/Compiler.h"
#include <stdio.h>
class
Response
;
...
...
@@ -31,7 +29,7 @@ class Response;
* It is not allowed to pass an URI without a scheme, check with
* uri_has_scheme() first.
*/
gcc_pure
[[
gnu
::
pure
]]
bool
uri_supported_scheme
(
const
char
*
url
)
noexcept
;
...
...
This diff is collapsed.
Click to expand it.
src/mixer/Volume.hxx
View file @
f510564d
...
...
@@ -20,15 +20,13 @@
#ifndef MPD_VOLUME_HXX
#define MPD_VOLUME_HXX
#include "util/Compiler.h"
class
MultipleOutputs
;
class
BufferedOutputStream
;
void
InvalidateHardwareVolume
()
noexcept
;
gcc_pure
[[
gnu
::
pure
]]
int
volume_level_get
(
const
MultipleOutputs
&
outputs
)
noexcept
;
...
...
@@ -47,7 +45,7 @@ save_sw_volume_state(BufferedOutputStream &os);
* determine whether the state has changed and the state file should
* be saved.
*/
gcc_pure
[[
gnu
::
pure
]]
unsigned
sw_volume_state_get_hash
()
noexcept
;
...
...
This diff is collapsed.
Click to expand it.
src/neighbor/Glue.hxx
View file @
f510564d
...
...
@@ -20,7 +20,6 @@
#ifndef MPD_NEIGHBOR_ALL_HXX
#define MPD_NEIGHBOR_ALL_HXX
#include "util/Compiler.h"
#include "thread/Mutex.hxx"
#include <forward_list>
...
...
@@ -74,7 +73,7 @@ public:
* Get the combined list of all neighbors from all active
* plugins.
*/
gcc_pure
[[
gnu
::
pure
]]
List
GetList
()
const
noexcept
;
};
...
...
This diff is collapsed.
Click to expand it.
src/neighbor/Registry.hxx
View file @
f510564d
...
...
@@ -20,8 +20,6 @@
#ifndef MPD_NEIGHBOR_REGISTRY_HXX
#define MPD_NEIGHBOR_REGISTRY_HXX
#include "util/Compiler.h"
struct
NeighborPlugin
;
/**
...
...
@@ -30,7 +28,7 @@ struct NeighborPlugin;
*/
extern
const
NeighborPlugin
*
const
neighbor_plugins
[];
gcc_pure
[[
gnu
::
pure
]]
const
NeighborPlugin
*
GetNeighborPluginByName
(
const
char
*
name
)
noexcept
;
...
...
This diff is collapsed.
Click to expand it.
src/net/ToString.hxx
View file @
f510564d
...
...
@@ -30,8 +30,6 @@
#ifndef NET_TO_STRING_HXX
#define NET_TO_STRING_HXX
#include "util/Compiler.h"
#include <string>
class
SocketAddress
;
...
...
@@ -40,7 +38,7 @@ class SocketAddress;
* Converts the specified socket address into a string in the form
* "IP:PORT".
*/
gcc_pure
[[
gnu
::
pure
]]
std
::
string
ToString
(
SocketAddress
address
)
noexcept
;
...
...
This diff is collapsed.
Click to expand it.
src/output/Control.hxx
View file @
f510564d
...
...
@@ -26,7 +26,6 @@
#include "thread/Mutex.hxx"
#include "thread/Cond.hxx"
#include "system/PeriodClock.hxx"
#include "util/Compiler.h"
#include <cstdint>
#include <exception>
...
...
@@ -266,20 +265,20 @@ public:
*/
void
Configure
(
const
ConfigBlock
&
block
);
gcc_pure
[[
gnu
::
pure
]]
const
char
*
GetName
()
const
noexcept
;
gcc_pure
[[
gnu
::
pure
]]
const
char
*
GetPluginName
()
const
noexcept
;
gcc_pure
[[
gnu
::
pure
]]
const
char
*
GetLogName
()
const
noexcept
;
AudioOutputClient
&
GetClient
()
noexcept
{
return
client
;
}
gcc_pure
[[
gnu
::
pure
]]
Mixer
*
GetMixer
()
const
noexcept
;
bool
IsDummy
()
const
noexcept
{
...
...
@@ -451,10 +450,10 @@ public:
*
* Caller must lock the mutex.
*/
gcc_pure
[[
gnu
::
pure
]]
bool
IsChunkConsumed
(
const
MusicChunk
&
chunk
)
const
noexcept
;
gcc_pure
[[
gnu
::
pure
]]
bool
LockIsChunkConsumed
(
const
MusicChunk
&
chunk
)
const
noexcept
;
/**
...
...
This diff is collapsed.
Click to expand it.
src/pcm/Buffer.hxx
View file @
f510564d
...
...
@@ -21,7 +21,6 @@
#define PCM_BUFFER_HXX
#include "util/ReusableArray.hxx"
#include "util/Compiler.h"
#include <cstdint>
...
...
@@ -47,11 +46,11 @@ public:
* to signal "error". An empty destination buffer is not
* always an error.
*/
gcc_malloc
gcc_returns_nonnull
[[
gnu
::
malloc
]]
[[
gnu
::
returns_nonnull
]]
void
*
Get
(
size_t
size
)
noexcept
;
template
<
typename
T
>
gcc_malloc
gcc_returns_nonnull
[[
gnu
::
malloc
]]
[[
gnu
::
returns_nonnull
]]
T
*
GetT
(
size_t
n
)
noexcept
{
return
(
T
*
)
Get
(
n
*
sizeof
(
T
));
}
...
...
This diff is collapsed.
Click to expand it.
src/pcm/ChannelsConverter.hxx
View file @
f510564d
...
...
@@ -73,7 +73,7 @@ public:
* @param src the input buffer
* @return the destination buffer
*/
gcc_pure
[[
gnu
::
pure
]]
ConstBuffer
<
void
>
Convert
(
ConstBuffer
<
void
>
src
)
noexcept
;
};
...
...
This diff is collapsed.
Click to expand it.
src/pcm/Export.hxx
View file @
f510564d
...
...
@@ -159,13 +159,13 @@ public:
* DSD_U32, four input bytes (= 4 * 8 bits) are combined to
* one output word (32 bits), dividing the sample rate by 4.
*/
gcc_pure
[[
gnu
::
pure
]]
unsigned
CalcOutputSampleRate
(
unsigned
input_sample_rate
)
const
noexcept
;
/**
* The inverse of CalcOutputSampleRate().
*/
gcc_pure
[[
gnu
::
pure
]]
unsigned
CalcInputSampleRate
(
unsigned
output_sample_rate
)
const
noexcept
;
};
...
...
@@ -198,7 +198,7 @@ public:
/**
* Calculate the size of one input frame.
*/
gcc_pure
[[
gnu
::
pure
]]
size_t
GetInputFrameSize
()
const
noexcept
{
return
channels
*
sample_format_size
(
src_sample_format
);
}
...
...
@@ -206,19 +206,19 @@ public:
/**
* Calculate the size of one output frame.
*/
gcc_pure
[[
gnu
::
pure
]]
size_t
GetOutputFrameSize
()
const
noexcept
;
/**
* @return the size of one input block in bytes
*/
gcc_pure
[[
gnu
::
pure
]]
size_t
GetInputBlockSize
()
const
noexcept
;
/**
* @return the size of one output block in bytes
*/
gcc_pure
[[
gnu
::
pure
]]
size_t
GetOutputBlockSize
()
const
noexcept
;
/**
...
...
@@ -243,7 +243,7 @@ public:
* destination buffer to the according number of bytes from the
* pcm_export() source buffer.
*/
gcc_pure
[[
gnu
::
pure
]]
size_t
CalcInputSize
(
size_t
dest_size
)
const
noexcept
;
};
...
...
This diff is collapsed.
Click to expand it.
src/pcm/FormatConverter.hxx
View file @
f510564d
...
...
@@ -72,7 +72,7 @@ public:
* @param src the input buffer
* @return the destination buffer
*/
gcc_pure
[[
gnu
::
pure
]]
ConstBuffer
<
void
>
Convert
(
ConstBuffer
<
void
>
src
)
noexcept
;
};
...
...
This diff is collapsed.
Click to expand it.
src/pcm/PcmFormat.hxx
View file @
f510564d
...
...
@@ -37,7 +37,7 @@ class PcmDither;
* @param src the source PCM buffer
* @return the destination buffer
*/
gcc_pure
[[
gnu
::
pure
]]
ConstBuffer
<
int16_t
>
pcm_convert_to_16
(
PcmBuffer
&
buffer
,
PcmDither
&
dither
,
SampleFormat
src_format
,
ConstBuffer
<
void
>
src
)
noexcept
;
...
...
@@ -49,7 +49,7 @@ pcm_convert_to_16(PcmBuffer &buffer, PcmDither &dither,
* @param src the source PCM buffer
* @return the destination buffer
*/
gcc_pure
[[
gnu
::
pure
]]
ConstBuffer
<
int32_t
>
pcm_convert_to_24
(
PcmBuffer
&
buffer
,
SampleFormat
src_format
,
ConstBuffer
<
void
>
src
)
noexcept
;
...
...
@@ -61,7 +61,7 @@ pcm_convert_to_24(PcmBuffer &buffer,
* @param src the source PCM buffer
* @return the destination buffer
*/
gcc_pure
[[
gnu
::
pure
]]
ConstBuffer
<
int32_t
>
pcm_convert_to_32
(
PcmBuffer
&
buffer
,
SampleFormat
src_format
,
ConstBuffer
<
void
>
src
)
noexcept
;
...
...
@@ -73,7 +73,7 @@ pcm_convert_to_32(PcmBuffer &buffer,
* @param src the source PCM buffer
* @return the destination buffer
*/
gcc_pure
[[
gnu
::
pure
]]
ConstBuffer
<
float
>
pcm_convert_to_float
(
PcmBuffer
&
buffer
,
SampleFormat
src_format
,
ConstBuffer
<
void
>
src
)
noexcept
;
...
...
This diff is collapsed.
Click to expand it.
src/pcm/Volume.hxx
View file @
f510564d
...
...
@@ -120,7 +120,7 @@ public:
/**
* Apply the volume level.
*/
gcc_pure
[[
gnu
::
pure
]]
ConstBuffer
<
void
>
Apply
(
ConstBuffer
<
void
>
src
)
noexcept
;
};
...
...
This diff is collapsed.
Click to expand it.
src/player/Control.hxx
View file @
f510564d
...
...
@@ -326,7 +326,7 @@ public:
*/
std
::
unique_ptr
<
DetachedSong
>
LockReadTaggedSong
()
noexcept
;
gcc_pure
[[
gnu
::
pure
]]
PlayerStatus
LockGetStatus
()
noexcept
;
PlayerState
GetState
()
const
noexcept
{
...
...
@@ -338,7 +338,7 @@ public:
bool
has_next_song
;
};
gcc_pure
[[
gnu
::
pure
]]
SyncInfo
LockGetSyncInfo
()
const
noexcept
{
const
std
::
lock_guard
<
Mutex
>
protect
(
mutex
);
return
{
state
,
next_song
!=
nullptr
};
...
...
This diff is collapsed.
Click to expand it.
src/player/CrossFade.hxx
View file @
f510564d
...
...
@@ -21,7 +21,6 @@
#define MPD_CROSSFADE_HXX
#include "Chrono.hxx"
#include "util/Compiler.h"
struct
AudioFormat
;
class
SignedSongTime
;
...
...
@@ -61,7 +60,7 @@ struct CrossFadeSettings {
* @return the number of chunks for crossfading, or 0 if cross fading
* should be disabled for this song change
*/
gcc_pure
[[
gnu
::
pure
]]
unsigned
Calculate
(
SignedSongTime
total_time
,
float
replay_gain_db
,
float
replay_gain_prev_db
,
const
char
*
mixramp_start
,
...
...
This diff is collapsed.
Click to expand it.
src/player/Outputs.hxx
View file @
f510564d
...
...
@@ -22,7 +22,6 @@
#include "MusicChunkPtr.hxx"
#include "Chrono.hxx"
#include "util/Compiler.h"
struct
AudioFormat
;
struct
MusicChunk
;
...
...
@@ -107,7 +106,7 @@ public:
* chunk. A negative value is returned when no chunk has been
* finished yet.
*/
gcc_pure
[[
gnu
::
pure
]]
virtual
SignedSongTime
GetElapsedTime
()
const
noexcept
=
0
;
};
...
...
This diff is collapsed.
Click to expand it.
src/playlist/PlaylistRegistry.hxx
View file @
f510564d
...
...
@@ -22,7 +22,6 @@
#include "input/Ptr.hxx"
#include "thread/Mutex.hxx"
#include "util/Compiler.h"
#include <string_view>
...
...
@@ -65,7 +64,7 @@ public:
* Shall this playlists supported by this plugin be represented as
* directories in the database?
*/
gcc_const
[[
gnu
::
const
]]
bool
GetPlaylistPluginAsFolder
(
const
PlaylistPlugin
&
plugin
)
noexcept
;
...
...
@@ -88,7 +87,7 @@ playlist_list_open_stream_suffix(InputStreamPtr &&is, std::string_view suffix);
std
::
unique_ptr
<
SongEnumerator
>
playlist_list_open_stream
(
InputStreamPtr
&&
is
,
const
char
*
uri
);
gcc_pure
[[
gnu
::
pure
]]
const
PlaylistPlugin
*
FindPlaylistPluginBySuffix
(
std
::
string_view
suffix
)
noexcept
;
...
...
@@ -96,7 +95,7 @@ FindPlaylistPluginBySuffix(std::string_view suffix) noexcept;
* Determines if there is a playlist plugin which can handle the
* specified file name suffix.
*/
gcc_pure
[[
gnu
::
pure
]]
inline
bool
playlist_suffix_supported
(
std
::
string_view
suffix
)
noexcept
{
...
...
This diff is collapsed.
Click to expand it.
src/song/AndSongFilter.hxx
View file @
f510564d
...
...
@@ -21,7 +21,6 @@
#define MPD_AND_SONG_FILTER_HXX
#include "ISongFilter.hxx"
#include "util/Compiler.h"
#include <list>
...
...
@@ -44,7 +43,7 @@ public:
items
.
emplace_back
(
std
::
forward
<
I
>
(
_item
));
}
gcc_pure
[[
gnu
::
pure
]]
bool
IsEmpty
()
const
noexcept
{
return
items
.
empty
();
}
...
...
This diff is collapsed.
Click to expand it.
src/song/DetachedSong.hxx
View file @
f510564d
...
...
@@ -23,7 +23,6 @@
#include "tag/Tag.hxx"
#include "pcm/AudioFormat.hxx"
#include "Chrono.hxx"
#include "util/Compiler.h"
#include <chrono>
#include <string>
...
...
@@ -108,7 +107,6 @@ public:
*/
explicit
DetachedSong
(
const
LightSong
&
other
)
noexcept
;
gcc_noinline
~
DetachedSong
()
noexcept
=
default
;
/* these are declared because the user-defined destructor
...
...
@@ -117,10 +115,10 @@ public:
DetachedSong
(
DetachedSong
&&
)
=
default
;
DetachedSong
&
operator
=
(
DetachedSong
&&
)
=
default
;
gcc_pure
[[
gnu
::
pure
]]
explicit
operator
LightSong
()
const
noexcept
;
gcc_pure
[[
gnu
::
pure
]]
const
char
*
GetURI
()
const
noexcept
{
return
uri
.
c_str
();
}
...
...
@@ -134,7 +132,7 @@ public:
* Does this object have a "real" URI different from the
* displayed URI?
*/
gcc_pure
[[
gnu
::
pure
]]
bool
HasRealURI
()
const
noexcept
{
return
!
real_uri
.
empty
();
}
...
...
@@ -143,7 +141,7 @@ public:
* Returns "real" URI (#real_uri) and falls back to just
* GetURI().
*/
gcc_pure
[[
gnu
::
pure
]]
const
char
*
GetRealURI
()
const
noexcept
{
return
(
HasRealURI
()
?
real_uri
:
uri
).
c_str
();
}
...
...
@@ -157,35 +155,35 @@ public:
* Returns true if both objects refer to the same physical
* song.
*/
gcc_pure
[[
gnu
::
pure
]]
bool
IsSame
(
const
DetachedSong
&
other
)
const
noexcept
{
return
uri
==
other
.
uri
&&
start_time
==
other
.
start_time
&&
end_time
==
other
.
end_time
;
}
gcc_pure
gcc_nonnull_all
[[
gnu
::
pure
]]
[[
gnu
::
nonnull
]]
bool
IsURI
(
const
char
*
other_uri
)
const
noexcept
{
return
uri
==
other_uri
;
}
gcc_pure
gcc_nonnull_all
[[
gnu
::
pure
]]
[[
gnu
::
nonnull
]]
bool
IsRealURI
(
const
char
*
other_uri
)
const
noexcept
{
return
(
HasRealURI
()
?
real_uri
:
uri
)
==
other_uri
;
}
gcc_pure
[[
gnu
::
pure
]]
bool
IsRemote
()
const
noexcept
;
gcc_pure
[[
gnu
::
pure
]]
bool
IsFile
()
const
noexcept
{
return
!
IsRemote
();
}
gcc_pure
[[
gnu
::
pure
]]
bool
IsAbsoluteFile
()
const
noexcept
;
gcc_pure
[[
gnu
::
pure
]]
bool
IsInDatabase
()
const
noexcept
;
const
Tag
&
GetTag
()
const
noexcept
{
...
...
@@ -240,7 +238,7 @@ public:
end_time
=
_value
;
}
gcc_pure
[[
gnu
::
pure
]]
SignedSongTime
GetDuration
()
const
noexcept
;
const
AudioFormat
&
GetAudioFormat
()
const
noexcept
{
...
...
This diff is collapsed.
Click to expand it.
src/song/Filter.hxx
View file @
f510564d
...
...
@@ -21,7 +21,6 @@
#define MPD_SONG_FILTER_HXX
#include "AndSongFilter.hxx"
#include "util/Compiler.h"
#include <cstdint>
#include <string>
...
...
@@ -42,7 +41,6 @@ class SongFilter {
public
:
SongFilter
()
=
default
;
gcc_nonnull
(
3
)
SongFilter
(
TagType
tag
,
const
char
*
value
,
bool
fold_case
=
false
);
~
SongFilter
();
...
...
@@ -59,7 +57,6 @@ public:
private
:
static
ISongFilterPtr
ParseExpression
(
const
char
*&
s
,
bool
fold_case
=
false
);
gcc_nonnull
(
2
,
3
)
void
Parse
(
const
char
*
tag
,
const
char
*
value
,
bool
fold_case
=
false
);
public
:
...
...
@@ -70,14 +67,14 @@ public:
void
Optimize
()
noexcept
;
gcc_pure
[[
gnu
::
pure
]]
bool
Match
(
const
LightSong
&
song
)
const
noexcept
;
const
auto
&
GetItems
()
const
noexcept
{
return
and_filter
.
GetItems
();
}
gcc_pure
[[
gnu
::
pure
]]
bool
IsEmpty
()
const
noexcept
{
return
and_filter
.
IsEmpty
();
}
...
...
@@ -85,20 +82,20 @@ public:
/**
* Is there at least one item with "fold case" enabled?
*/
gcc_pure
[[
gnu
::
pure
]]
bool
HasFoldCase
()
const
noexcept
;
/**
* Does this filter contain constraints other than "base"?
*/
gcc_pure
[[
gnu
::
pure
]]
bool
HasOtherThanBase
()
const
noexcept
;
/**
* Returns the "base" specification (if there is one) or
* nullptr.
*/
gcc_pure
[[
gnu
::
pure
]]
const
char
*
GetBase
()
const
noexcept
;
/**
...
...
This diff is collapsed.
Click to expand it.
src/song/ISongFilter.hxx
View file @
f510564d
...
...
@@ -20,8 +20,6 @@
#ifndef MPD_I_SONG_FILTER_HXX
#define MPD_I_SONG_FILTER_HXX
#include "util/Compiler.h"
#include <memory>
#include <string>
...
...
@@ -41,7 +39,7 @@ public:
*/
virtual
std
::
string
ToExpression
()
const
noexcept
=
0
;
gcc_pure
[[
gnu
::
pure
]]
virtual
bool
Match
(
const
LightSong
&
song
)
const
noexcept
=
0
;
};
...
...
This diff is collapsed.
Click to expand it.
src/song/LightSong.hxx
View file @
f510564d
...
...
@@ -22,7 +22,6 @@
#include "Chrono.hxx"
#include "pcm/AudioFormat.hxx"
#include "util/Compiler.h"
#include <string>
#include <chrono>
...
...
@@ -101,7 +100,7 @@ struct LightSong {
start_time
(
src
.
start_time
),
end_time
(
src
.
end_time
),
audio_format
(
src
.
audio_format
)
{}
gcc_pure
[[
gnu
::
pure
]]
std
::
string
GetURI
()
const
noexcept
{
if
(
directory
==
nullptr
)
return
std
::
string
(
uri
);
...
...
@@ -112,7 +111,7 @@ struct LightSong {
return
result
;
}
gcc_pure
[[
gnu
::
pure
]]
SignedSongTime
GetDuration
()
const
noexcept
;
};
...
...
This diff is collapsed.
Click to expand it.
src/song/StringFilter.hxx
View file @
f510564d
...
...
@@ -21,7 +21,6 @@
#define MPD_STRING_FILTER_HXX
#include "lib/icu/Compare.hxx"
#include "util/Compiler.h"
#include "config.h"
#ifdef HAVE_PCRE
...
...
@@ -102,13 +101,13 @@ public:
:
(
negated
?
"!="
:
"=="
));
}
gcc_pure
[[
gnu
::
pure
]]
bool
Match
(
const
char
*
s
)
const
noexcept
;
/**
* Like Match(), but ignore the "negated" flag.
*/
gcc_pure
[[
gnu
::
pure
]]
bool
MatchWithoutNegation
(
const
char
*
s
)
const
noexcept
;
};
...
...
This diff is collapsed.
Click to expand it.
src/storage/CompositeStorage.hxx
View file @
f510564d
...
...
@@ -22,7 +22,6 @@
#include "StorageInterface.hxx"
#include "thread/Mutex.hxx"
#include "util/Compiler.h"
#include <memory>
#include <string>
...
...
@@ -51,12 +50,12 @@ class CompositeStorage final : public Storage {
std
::
map
<
std
::
string
,
Directory
,
std
::
less
<>>
children
;
gcc_pure
[[
gnu
::
pure
]]
bool
IsEmpty
()
const
noexcept
{
return
storage
==
nullptr
&&
children
.
empty
();
}
gcc_pure
[[
gnu
::
pure
]]
const
Directory
*
Find
(
std
::
string_view
uri
)
const
noexcept
;
Directory
&
Make
(
std
::
string_view
uri
);
...
...
@@ -64,7 +63,7 @@ class CompositeStorage final : public Storage {
bool
Unmount
()
noexcept
;
bool
Unmount
(
std
::
string_view
uri
)
noexcept
;
gcc_pure
[[
gnu
::
pure
]]
bool
MapToRelativeUTF8
(
std
::
string
&
buffer
,
std
::
string_view
uri
)
const
noexcept
;
};
...
...
@@ -97,14 +96,14 @@ public:
* allowed to unmount the given mount point while the return
* value is being used.
*/
gcc_pure
gcc_nonnull_all
[[
gnu
::
pure
]]
Storage
*
GetMount
(
std
::
string_view
uri
)
noexcept
;
/**
* Is the given URI a mount point, i.e. is something already
* mounted on this path?
*/
gcc_pure
gcc_nonnull_all
[[
gnu
::
pure
]]
[[
gnu
::
nonnull
]]
bool
IsMountPoint
(
const
char
*
uri
)
noexcept
{
return
GetMount
(
uri
)
!=
nullptr
;
}
...
...
@@ -124,7 +123,7 @@ public:
/**
* Is a storage with the given URI already mounted?
*/
gcc_pure
gcc_nonnull_all
[[
gnu
::
pure
]]
[[
gnu
::
nonnull
]]
bool
IsMounted
(
const
char
*
storage_uri
)
const
noexcept
{
const
std
::
lock_guard
<
Mutex
>
protect
(
mutex
);
return
IsMounted
(
root
,
storage_uri
);
...
...
@@ -164,7 +163,7 @@ private:
}
}
gcc_pure
gcc_nonnull_all
[[
gnu
::
pure
]]
[[
gnu
::
nonnull
]]
static
bool
IsMounted
(
const
Directory
&
directory
,
const
char
*
storage_uri
)
noexcept
{
if
(
directory
.
storage
)
{
...
...
@@ -188,7 +187,7 @@ private:
* remaining unused part of the URI (may be empty if all of
* the URI was used).
*/
gcc_pure
[[
gnu
::
pure
]]
FindResult
FindStorage
(
std
::
string_view
uri
)
const
noexcept
;
const
char
*
MapToRelativeUTF8
(
const
Directory
&
directory
,
...
...
This diff is collapsed.
Click to expand it.
src/storage/Configured.hxx
View file @
f510564d
...
...
@@ -20,8 +20,6 @@
#ifndef MPD_STORAGE_CONFIG_HXX
#define MPD_STORAGE_CONFIG_HXX
#include "util/Compiler.h"
#include <memory>
struct
ConfigData
;
...
...
@@ -40,7 +38,7 @@ CreateConfiguredStorage(const ConfigData &config, EventLoop &event_loop);
/**
* Returns true if there is configuration for a #Storage instance.
*/
gcc_const
[[
gnu
::
const
]]
bool
IsStorageConfigured
(
const
ConfigData
&
config
)
noexcept
;
...
...
This diff is collapsed.
Click to expand it.
src/storage/StorageInterface.hxx
View file @
f510564d
...
...
@@ -20,8 +20,6 @@
#ifndef MPD_STORAGE_INTERFACE_HXX
#define MPD_STORAGE_INTERFACE_HXX
#include "util/Compiler.h"
#include <memory>
#include <string>
#include <string_view>
...
...
@@ -62,7 +60,7 @@ public:
/**
* Map the given relative URI to an absolute URI.
*/
gcc_pure
[[
gnu
::
pure
]]
virtual
std
::
string
MapUTF8
(
std
::
string_view
uri_utf8
)
const
noexcept
=
0
;
/**
...
...
@@ -70,10 +68,10 @@ public:
* nullptr on error or if this storage does not
* support local files.
*/
gcc_pure
[[
gnu
::
pure
]]
virtual
AllocatedPath
MapFS
(
std
::
string_view
uri_utf8
)
const
noexcept
;
gcc_pure
[[
gnu
::
pure
]]
AllocatedPath
MapChildFS
(
std
::
string_view
uri_utf8
,
std
::
string_view
child_utf8
)
const
noexcept
;
...
...
@@ -82,7 +80,7 @@ public:
* then it returns a relative URI (pointing inside the given
* string); if not, returns nullptr.
*/
gcc_pure
[[
gnu
::
pure
]]
virtual
std
::
string_view
MapToRelativeUTF8
(
std
::
string_view
uri_utf8
)
const
noexcept
=
0
;
};
...
...
This diff is collapsed.
Click to expand it.
src/system/Clock.hxx
View file @
f510564d
...
...
@@ -22,14 +22,12 @@
#ifdef _WIN32
#include "util/Compiler.h"
#include <chrono>
/**
* Returns the uptime of the current process in seconds.
*/
gcc_pure
[[
gnu
::
pure
]]
std
::
chrono
::
seconds
GetProcessUptimeS
();
...
...
This diff is collapsed.
Click to expand it.
src/tag/Id3Load.cxx
View file @
f510564d
...
...
@@ -28,7 +28,7 @@
static
constexpr
size_t
ID3V1_SIZE
=
128
;
gcc_pure
[[
gnu
::
pure
]]
static
inline
bool
tag_is_id3v1
(
struct
id3_tag
*
tag
)
noexcept
{
...
...
This diff is collapsed.
Click to expand it.
src/thread/Id.hxx
View file @
f510564d
...
...
@@ -30,8 +30,6 @@
#ifndef THREAD_ID_HXX
#define THREAD_ID_HXX
#include "util/Compiler.h"
#ifdef _WIN32
#include <processthreadsapi.h>
#else
...
...
@@ -70,7 +68,7 @@ public:
#endif
}
gcc_pure
[[
gnu
::
pure
]]
bool
IsNull
()
const
noexcept
{
return
*
this
==
Null
();
}
...
...
@@ -78,7 +76,7 @@ public:
/**
* Return the current thread's id .
*/
gcc_pure
[[
gnu
::
pure
]]
static
const
ThreadId
GetCurrent
()
noexcept
{
#ifdef _WIN32
return
::
GetCurrentThreadId
();
...
...
@@ -87,7 +85,7 @@ public:
#endif
}
gcc_pure
[[
gnu
::
pure
]]
bool
operator
==
(
const
ThreadId
&
other
)
const
noexcept
{
/* note: not using pthread_equal() because that
function "is undefined if either thread ID is not
...
...
This diff is collapsed.
Click to expand it.
src/thread/Thread.hxx
View file @
f510564d
...
...
@@ -21,7 +21,6 @@
#define MPD_THREAD_HXX
#include "util/BindMethod.hxx"
#include "util/Compiler.h"
#include <cassert>
...
...
@@ -78,7 +77,7 @@ public:
/**
* Check if this thread is the current thread.
*/
gcc_pure
[[
gnu
::
pure
]]
bool
IsInside
()
const
noexcept
{
#ifdef _WIN32
return
GetCurrentThreadId
()
==
id
;
...
...
This diff is collapsed.
Click to expand it.
src/unix/PidFile.hxx
View file @
f510564d
...
...
@@ -87,7 +87,7 @@ public:
}
};
gcc_pure
[[
gnu
::
pure
]]
static
inline
pid_t
ReadPidFile
(
Path
path
)
noexcept
{
...
...
This diff is collapsed.
Click to expand it.
src/util/BitReverse.hxx
View file @
f510564d
...
...
@@ -20,8 +20,6 @@
#ifndef MPD_BIT_REVERSE_HXX
#define MPD_BIT_REVERSE_HXX
#include "Compiler.h"
#include <cstdint>
/**
...
...
@@ -43,7 +41,7 @@ struct BitReverseTable {
extern
const
BitReverseTable
bit_reverse_table
;
gcc_const
[[
gnu
::
const
]]
static
inline
uint8_t
bit_reverse
(
uint8_t
x
)
noexcept
{
...
...
This diff is collapsed.
Click to expand it.
src/util/HexFormat.hxx
View file @
f510564d
...
...
@@ -32,7 +32,6 @@
#include "ConstBuffer.hxx"
#include "StringBuffer.hxx"
#include "Compiler.h"
#include <cstddef>
#include <cstdint>
...
...
@@ -53,7 +52,7 @@ HexFormat(char *dest, ConstBuffer<uint8_t> src) noexcept;
* required size.
*/
template
<
size_t
size
>
gcc_pure
[[
gnu
::
pure
]]
auto
HexFormatBuffer
(
const
uint8_t
*
src
)
noexcept
{
...
...
This diff is collapsed.
Click to expand it.
src/util/UriExtract.cxx
View file @
f510564d
...
...
@@ -46,7 +46,7 @@ IsValidSchemeChar(char ch)
ch
==
'+'
||
ch
==
'.'
||
ch
==
'-'
;
}
gcc_pure
[[
gnu
::
pure
]]
static
bool
IsValidScheme
(
std
::
string_view
p
)
noexcept
{
...
...
@@ -64,7 +64,7 @@ IsValidScheme(std::string_view p) noexcept
* Return the URI part after the scheme specification (and after the
* double slash).
*/
gcc_pure
[[
gnu
::
pure
]]
static
std
::
string_view
uri_after_scheme
(
std
::
string_view
uri
)
noexcept
{
...
...
@@ -120,7 +120,7 @@ uri_get_path(std::string_view uri) noexcept
return
uri
;
}
gcc_pure
[[
gnu
::
pure
]]
static
StringView
UriWithoutQueryString
(
StringView
uri
)
noexcept
{
...
...
This diff is collapsed.
Click to expand it.
src/util/UriExtract.hxx
View file @
f510564d
...
...
@@ -30,26 +30,24 @@
#ifndef URI_EXTRACT_HXX
#define URI_EXTRACT_HXX
#include "Compiler.h"
#include <string_view>
/**
* Checks whether the specified URI has a scheme in the form
* "scheme://".
*/
gcc_pure
[[
gnu
::
pure
]]
bool
uri_has_scheme
(
std
::
string_view
uri
)
noexcept
;
/**
* Returns the scheme name of the specified URI, or an empty string.
*/
gcc_pure
[[
gnu
::
pure
]]
std
::
string_view
uri_get_scheme
(
std
::
string_view
uri
)
noexcept
;
gcc_pure
[[
gnu
::
pure
]]
bool
uri_is_relative_path
(
const
char
*
uri
)
noexcept
;
...
...
@@ -57,11 +55,11 @@ uri_is_relative_path(const char *uri) noexcept;
* Returns the URI path (including the query string) or nullptr if the
* given URI has no path.
*/
gcc_pure
[[
gnu
::
pure
]]
std
::
string_view
uri_get_path
(
std
::
string_view
uri
)
noexcept
;
gcc_pure
[[
gnu
::
pure
]]
std
::
string_view
uri_get_suffix
(
std
::
string_view
uri
)
noexcept
;
...
...
@@ -71,7 +69,7 @@ uri_get_suffix(std::string_view uri) noexcept;
* nullptr; if there is a '#' but no fragment text, it returns an
* empty StringView.
*/
gcc_pure
gcc_nonnull_all
[[
gnu
::
pure
]]
[[
gnu
::
nonnull
]]
const
char
*
uri_get_fragment
(
const
char
*
uri
)
noexcept
;
...
...
This diff is collapsed.
Click to expand it.
src/util/UriUtil.hxx
View file @
f510564d
...
...
@@ -30,8 +30,6 @@
#ifndef URI_UTIL_HXX
#define URI_UTIL_HXX
#include "Compiler.h"
#include <string>
/**
...
...
@@ -42,7 +40,7 @@
* - no double slashes
* - no path component begins with a dot
*/
gcc_pure
[[
gnu
::
pure
]]
bool
uri_safe_local
(
const
char
*
uri
)
noexcept
;
...
...
@@ -52,7 +50,7 @@ uri_safe_local(const char *uri) noexcept;
* an empty string if nothing needs to be removed, or if the URI is
* not recognized.
*/
gcc_pure
[[
gnu
::
pure
]]
std
::
string
uri_remove_auth
(
const
char
*
uri
)
noexcept
;
...
...
@@ -60,7 +58,7 @@ uri_remove_auth(const char *uri) noexcept;
* Remove dot segments in the URI. For example, uri_squash_dot_segments
* ("foo/bar/.././")=="foo/".
*/
gcc_pure
[[
gnu
::
pure
]]
std
::
string
uri_squash_dot_segments
(
const
char
*
uri
)
noexcept
;
...
...
This diff is collapsed.
Click to expand it.
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