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
979f1b6c
Commit
979f1b6c
authored
8 years ago
by
Max Kellermann
Browse files
Options
Browse Files
Download
Plain Diff
Merge tag 'v0.20.9'
release v0.20.9
parents
1fa1790d
cf86dfd3
Hide whitespace changes
Inline
Side-by-side
Showing
69 changed files
with
240 additions
and
232 deletions
+240
-232
NEWS
NEWS
+6
-0
AudioFormat.hxx
src/AudioFormat.hxx
+1
-1
DetachedSong.hxx
src/DetachedSong.hxx
+3
-3
MixRampInfo.hxx
src/MixRampInfo.hxx
+8
-8
MusicBuffer.hxx
src/MusicBuffer.hxx
+1
-1
MusicPipe.cxx
src/MusicPipe.cxx
+3
-3
MusicPipe.hxx
src/MusicPipe.hxx
+7
-7
Client.hxx
src/client/Client.hxx
+1
-1
Request.hxx
src/command/Request.hxx
+0
-11
Block.hxx
src/config/Block.hxx
+2
-2
Helpers.cxx
src/db/Helpers.cxx
+1
-1
Interface.hxx
src/db/Interface.hxx
+1
-2
LightDirectory.hxx
src/db/LightDirectory.hxx
+3
-3
PlaylistInfo.hxx
src/db/PlaylistInfo.hxx
+1
-1
ProxyDatabasePlugin.cxx
src/db/plugins/ProxyDatabasePlugin.cxx
+1
-1
Directory.hxx
src/db/plugins/simple/Directory.hxx
+1
-1
SimpleDatabasePlugin.hxx
src/db/plugins/simple/SimpleDatabasePlugin.hxx
+2
-2
Object.hxx
src/db/plugins/upnp/Object.hxx
+3
-3
UpnpDatabasePlugin.cxx
src/db/plugins/upnp/UpnpDatabasePlugin.cxx
+1
-1
ExcludeList.cxx
src/db/update/ExcludeList.cxx
+2
-2
ExcludeList.hxx
src/db/update/ExcludeList.hxx
+3
-3
Bridge.cxx
src/decoder/Bridge.cxx
+3
-3
Bridge.hxx
src/decoder/Bridge.hxx
+3
-3
Client.hxx
src/decoder/Client.hxx
+3
-3
DecoderBuffer.hxx
src/decoder/DecoderBuffer.hxx
+5
-5
DecoderControl.hxx
src/decoder/DecoderControl.hxx
+5
-5
FfmpegDecoderPlugin.cxx
src/decoder/plugins/FfmpegDecoderPlugin.cxx
+3
-1
FlacMetadata.hxx
src/decoder/plugins/FlacMetadata.hxx
+11
-9
OpusDecoderPlugin.cxx
src/decoder/plugins/OpusDecoderPlugin.cxx
+2
-2
Loop.hxx
src/event/Loop.hxx
+3
-3
AllocatedPath.hxx
src/fs/AllocatedPath.hxx
+21
-18
Glob.hxx
src/fs/Glob.hxx
+1
-1
Path.hxx
src/fs/Path.hxx
+3
-3
Traits.hxx
src/fs/Traits.hxx
+12
-12
BufferedReader.cxx
src/fs/io/BufferedReader.cxx
+1
-1
BufferedReader.hxx
src/fs/io/BufferedReader.hxx
+5
-5
AsyncInputStream.cxx
src/input/AsyncInputStream.cxx
+7
-7
AsyncInputStream.hxx
src/input/AsyncInputStream.hxx
+15
-15
InputStream.hxx
src/input/InputStream.hxx
+9
-9
Global.cxx
src/lib/curl/Global.cxx
+3
-3
Connection.hxx
src/lib/nfs/Connection.hxx
+3
-3
ContentDirectoryService.hxx
src/lib/upnp/ContentDirectoryService.hxx
+2
-2
MixerInternal.hxx
src/mixer/MixerInternal.hxx
+0
-1
SmbclientNeighborPlugin.cxx
src/neighbor/plugins/SmbclientNeighborPlugin.cxx
+2
-2
UpnpNeighborPlugin.cxx
src/neighbor/plugins/UpnpNeighborPlugin.cxx
+2
-2
StaticSocketAddress.hxx
src/net/StaticSocketAddress.hxx
+11
-11
MultipleOutputs.hxx
src/output/MultipleOutputs.hxx
+2
-2
AlsaOutputPlugin.cxx
src/output/plugins/AlsaOutputPlugin.cxx
+1
-1
OpenALOutputPlugin.cxx
src/output/plugins/OpenALOutputPlugin.cxx
+3
-3
RecorderOutputPlugin.cxx
src/output/plugins/RecorderOutputPlugin.cxx
+1
-1
HttpdInternal.hxx
src/output/plugins/httpd/HttpdInternal.hxx
+2
-2
Resampler.hxx
src/pcm/Resampler.hxx
+2
-1
Thread.cxx
src/player/Thread.cxx
+2
-2
Queue.hxx
src/queue/Queue.hxx
+3
-3
CompositeStorage.cxx
src/storage/CompositeStorage.cxx
+2
-2
CompositeStorage.hxx
src/storage/CompositeStorage.hxx
+3
-3
StorageInterface.hxx
src/storage/StorageInterface.hxx
+0
-2
CurlStorage.cxx
src/storage/plugins/CurlStorage.cxx
+1
-1
ByteOrder.hxx
src/system/ByteOrder.hxx
+9
-0
Builder.hxx
src/tag/Builder.hxx
+1
-1
MixRamp.cxx
src/tag/MixRamp.cxx
+2
-2
ReplayGain.cxx
src/tag/ReplayGain.cxx
+2
-2
Set.cxx
src/tag/Set.cxx
+3
-3
Set.hxx
src/tag/Set.hxx
+4
-4
Id.hxx
src/thread/Id.hxx
+3
-3
Thread.hxx
src/thread/Thread.hxx
+1
-1
ConstBuffer.hxx
src/util/ConstBuffer.hxx
+1
-1
FakeDecoderAPI.cxx
test/FakeDecoderAPI.cxx
+3
-3
FakeDecoderAPI.hxx
test/FakeDecoderAPI.hxx
+3
-3
No files found.
NEWS
View file @
979f1b6c
...
@@ -9,6 +9,12 @@ ver 0.21 (not yet released)
...
@@ -9,6 +9,12 @@ ver 0.21 (not yet released)
* output
* output
- alsa: non-blocking mode
- alsa: non-blocking mode
ver 0.20.9 (2017/06/04)
* decoder
- ffmpeg: support *.adx
* fix byte order detection on FreeBSD/aarch64
* fix more random crashes when compiled with clang
ver 0.20.8 (2017/05/19)
ver 0.20.8 (2017/05/19)
* output
* output
- osx: fix build failure due to missing "noexcept"
- osx: fix build failure due to missing "noexcept"
...
...
This diff is collapsed.
Click to expand it.
src/AudioFormat.hxx
View file @
979f1b6c
...
@@ -127,7 +127,7 @@ struct AudioFormat {
...
@@ -127,7 +127,7 @@ struct AudioFormat {
void
ApplyMask
(
AudioFormat
mask
)
noexcept
;
void
ApplyMask
(
AudioFormat
mask
)
noexcept
;
gcc_pure
gcc_pure
AudioFormat
WithMask
(
AudioFormat
mask
)
const
{
AudioFormat
WithMask
(
AudioFormat
mask
)
const
noexcept
{
AudioFormat
result
=
*
this
;
AudioFormat
result
=
*
this
;
result
.
ApplyMask
(
mask
);
result
.
ApplyMask
(
mask
);
return
result
;
return
result
;
...
...
This diff is collapsed.
Click to expand it.
src/DetachedSong.hxx
View file @
979f1b6c
...
@@ -163,7 +163,7 @@ public:
...
@@ -163,7 +163,7 @@ public:
bool
IsRemote
()
const
noexcept
;
bool
IsRemote
()
const
noexcept
;
gcc_pure
gcc_pure
bool
IsFile
()
const
{
bool
IsFile
()
const
noexcept
{
return
!
IsRemote
();
return
!
IsRemote
();
}
}
...
@@ -173,11 +173,11 @@ public:
...
@@ -173,11 +173,11 @@ public:
gcc_pure
gcc_pure
bool
IsInDatabase
()
const
noexcept
;
bool
IsInDatabase
()
const
noexcept
;
const
Tag
&
GetTag
()
const
{
const
Tag
&
GetTag
()
const
noexcept
{
return
tag
;
return
tag
;
}
}
Tag
&
WritableTag
()
{
Tag
&
WritableTag
()
noexcept
{
return
tag
;
return
tag
;
}
}
...
...
This diff is collapsed.
Click to expand it.
src/MixRampInfo.hxx
View file @
979f1b6c
...
@@ -31,45 +31,45 @@ class MixRampInfo {
...
@@ -31,45 +31,45 @@ class MixRampInfo {
public
:
public
:
MixRampInfo
()
=
default
;
MixRampInfo
()
=
default
;
void
Clear
()
{
void
Clear
()
noexcept
{
start
.
clear
();
start
.
clear
();
end
.
clear
();
end
.
clear
();
}
}
gcc_pure
gcc_pure
bool
IsDefined
()
const
{
bool
IsDefined
()
const
noexcept
{
return
!
start
.
empty
()
||
!
end
.
empty
();
return
!
start
.
empty
()
||
!
end
.
empty
();
}
}
gcc_pure
gcc_pure
const
char
*
GetStart
()
const
{
const
char
*
GetStart
()
const
noexcept
{
return
start
.
empty
()
?
nullptr
:
start
.
c_str
();
return
start
.
empty
()
?
nullptr
:
start
.
c_str
();
}
}
gcc_pure
gcc_pure
const
char
*
GetEnd
()
const
{
const
char
*
GetEnd
()
const
noexcept
{
return
end
.
empty
()
?
nullptr
:
end
.
c_str
();
return
end
.
empty
()
?
nullptr
:
end
.
c_str
();
}
}
void
SetStart
(
const
char
*
new_value
)
{
void
SetStart
(
const
char
*
new_value
)
noexcept
{
if
(
new_value
==
nullptr
)
if
(
new_value
==
nullptr
)
start
.
clear
();
start
.
clear
();
else
else
start
=
new_value
;
start
=
new_value
;
}
}
void
SetStart
(
std
::
string
&&
new_value
)
{
void
SetStart
(
std
::
string
&&
new_value
)
noexcept
{
start
=
std
::
move
(
new_value
);
start
=
std
::
move
(
new_value
);
}
}
void
SetEnd
(
const
char
*
new_value
)
{
void
SetEnd
(
const
char
*
new_value
)
noexcept
{
if
(
new_value
==
nullptr
)
if
(
new_value
==
nullptr
)
end
.
clear
();
end
.
clear
();
else
else
end
=
new_value
;
end
=
new_value
;
}
}
void
SetEnd
(
std
::
string
&&
new_value
)
{
void
SetEnd
(
std
::
string
&&
new_value
)
noexcept
{
end
=
std
::
move
(
new_value
);
end
=
std
::
move
(
new_value
);
}
}
};
};
...
...
This diff is collapsed.
Click to expand it.
src/MusicBuffer.hxx
View file @
979f1b6c
...
@@ -60,7 +60,7 @@ public:
...
@@ -60,7 +60,7 @@ public:
* music_buffer_new().
* music_buffer_new().
*/
*/
gcc_pure
gcc_pure
unsigned
GetSize
()
const
{
unsigned
GetSize
()
const
noexcept
{
return
buffer
.
GetCapacity
();
return
buffer
.
GetCapacity
();
}
}
...
...
This diff is collapsed.
Click to expand it.
src/MusicPipe.cxx
View file @
979f1b6c
...
@@ -39,7 +39,7 @@ MusicPipe::Contains(const MusicChunk *chunk) const noexcept
...
@@ -39,7 +39,7 @@ MusicPipe::Contains(const MusicChunk *chunk) const noexcept
#endif
#endif
MusicChunk
*
MusicChunk
*
MusicPipe
::
Shift
()
MusicPipe
::
Shift
()
noexcept
{
{
const
std
::
lock_guard
<
Mutex
>
protect
(
mutex
);
const
std
::
lock_guard
<
Mutex
>
protect
(
mutex
);
...
@@ -73,7 +73,7 @@ MusicPipe::Shift()
...
@@ -73,7 +73,7 @@ MusicPipe::Shift()
}
}
void
void
MusicPipe
::
Clear
(
MusicBuffer
&
buffer
)
MusicPipe
::
Clear
(
MusicBuffer
&
buffer
)
noexcept
{
{
MusicChunk
*
chunk
;
MusicChunk
*
chunk
;
...
@@ -82,7 +82,7 @@ MusicPipe::Clear(MusicBuffer &buffer)
...
@@ -82,7 +82,7 @@ MusicPipe::Clear(MusicBuffer &buffer)
}
}
void
void
MusicPipe
::
Push
(
MusicChunk
*
chunk
)
MusicPipe
::
Push
(
MusicChunk
*
chunk
)
noexcept
{
{
assert
(
!
chunk
->
IsEmpty
());
assert
(
!
chunk
->
IsEmpty
());
assert
(
chunk
->
length
==
0
||
chunk
->
audio_format
.
IsValid
());
assert
(
chunk
->
length
==
0
||
chunk
->
audio_format
.
IsValid
());
...
...
This diff is collapsed.
Click to expand it.
src/MusicPipe.hxx
View file @
979f1b6c
...
@@ -77,7 +77,7 @@ public:
...
@@ -77,7 +77,7 @@ public:
* audio_format.
* audio_format.
*/
*/
gcc_pure
gcc_pure
bool
CheckFormat
(
AudioFormat
other
)
const
{
bool
CheckFormat
(
AudioFormat
other
)
const
noexcept
{
return
!
audio_format
.
IsDefined
()
||
return
!
audio_format
.
IsDefined
()
||
audio_format
==
other
;
audio_format
==
other
;
}
}
...
@@ -94,37 +94,37 @@ public:
...
@@ -94,37 +94,37 @@ public:
* nullptr if the pipe is empty.
* nullptr if the pipe is empty.
*/
*/
gcc_pure
gcc_pure
const
MusicChunk
*
Peek
()
const
{
const
MusicChunk
*
Peek
()
const
noexcept
{
return
head
;
return
head
;
}
}
/**
/**
* Removes the first chunk from the head, and returns it.
* Removes the first chunk from the head, and returns it.
*/
*/
MusicChunk
*
Shift
();
MusicChunk
*
Shift
()
noexcept
;
/**
/**
* Clears the whole pipe and returns the chunks to the buffer.
* Clears the whole pipe and returns the chunks to the buffer.
*
*
* @param buffer the buffer object to return the chunks to
* @param buffer the buffer object to return the chunks to
*/
*/
void
Clear
(
MusicBuffer
&
buffer
);
void
Clear
(
MusicBuffer
&
buffer
)
noexcept
;
/**
/**
* Pushes a chunk to the tail of the pipe.
* Pushes a chunk to the tail of the pipe.
*/
*/
void
Push
(
MusicChunk
*
chunk
);
void
Push
(
MusicChunk
*
chunk
)
noexcept
;
/**
/**
* Returns the number of chunks currently in this pipe.
* Returns the number of chunks currently in this pipe.
*/
*/
gcc_pure
gcc_pure
unsigned
GetSize
()
const
{
unsigned
GetSize
()
const
noexcept
{
return
size
;
return
size
;
}
}
gcc_pure
gcc_pure
bool
IsEmpty
()
const
{
bool
IsEmpty
()
const
noexcept
{
return
GetSize
()
==
0
;
return
GetSize
()
==
0
;
}
}
};
};
...
...
This diff is collapsed.
Click to expand it.
src/client/Client.hxx
View file @
979f1b6c
...
@@ -106,7 +106,7 @@ public:
...
@@ -106,7 +106,7 @@ public:
}
}
gcc_pure
gcc_pure
bool
IsExpired
()
const
{
bool
IsExpired
()
const
noexcept
{
return
!
FullyBufferedSocket
::
IsDefined
();
return
!
FullyBufferedSocket
::
IsDefined
();
}
}
...
...
This diff is collapsed.
Click to expand it.
src/command/Request.hxx
View file @
979f1b6c
...
@@ -45,68 +45,57 @@ public:
...
@@ -45,68 +45,57 @@ public:
:
default_value
;
:
default_value
;
}
}
gcc_pure
int
ParseInt
(
unsigned
idx
)
const
{
int
ParseInt
(
unsigned
idx
)
const
{
assert
(
idx
<
size
);
assert
(
idx
<
size
);
return
ParseCommandArgInt
(
data
[
idx
]);
return
ParseCommandArgInt
(
data
[
idx
]);
}
}
gcc_pure
int
ParseInt
(
unsigned
idx
,
int
min_value
,
int
max_value
)
const
{
int
ParseInt
(
unsigned
idx
,
int
min_value
,
int
max_value
)
const
{
assert
(
idx
<
size
);
assert
(
idx
<
size
);
return
ParseCommandArgInt
(
data
[
idx
],
min_value
,
max_value
);
return
ParseCommandArgInt
(
data
[
idx
],
min_value
,
max_value
);
}
}
gcc_pure
int
ParseUnsigned
(
unsigned
idx
)
const
{
int
ParseUnsigned
(
unsigned
idx
)
const
{
assert
(
idx
<
size
);
assert
(
idx
<
size
);
return
ParseCommandArgUnsigned
(
data
[
idx
]);
return
ParseCommandArgUnsigned
(
data
[
idx
]);
}
}
gcc_pure
int
ParseUnsigned
(
unsigned
idx
,
unsigned
max_value
)
const
{
int
ParseUnsigned
(
unsigned
idx
,
unsigned
max_value
)
const
{
assert
(
idx
<
size
);
assert
(
idx
<
size
);
return
ParseCommandArgUnsigned
(
data
[
idx
],
max_value
);
return
ParseCommandArgUnsigned
(
data
[
idx
],
max_value
);
}
}
gcc_pure
bool
ParseBool
(
unsigned
idx
)
const
{
bool
ParseBool
(
unsigned
idx
)
const
{
assert
(
idx
<
size
);
assert
(
idx
<
size
);
return
ParseCommandArgBool
(
data
[
idx
]);
return
ParseCommandArgBool
(
data
[
idx
]);
}
}
gcc_pure
RangeArg
ParseRange
(
unsigned
idx
)
const
{
RangeArg
ParseRange
(
unsigned
idx
)
const
{
assert
(
idx
<
size
);
assert
(
idx
<
size
);
return
ParseCommandArgRange
(
data
[
idx
]);
return
ParseCommandArgRange
(
data
[
idx
]);
}
}
gcc_pure
float
ParseFloat
(
unsigned
idx
)
const
{
float
ParseFloat
(
unsigned
idx
)
const
{
assert
(
idx
<
size
);
assert
(
idx
<
size
);
return
ParseCommandArgFloat
(
data
[
idx
]);
return
ParseCommandArgFloat
(
data
[
idx
]);
}
}
gcc_pure
SongTime
ParseSongTime
(
unsigned
idx
)
const
{
SongTime
ParseSongTime
(
unsigned
idx
)
const
{
assert
(
idx
<
size
);
assert
(
idx
<
size
);
return
ParseCommandArgSongTime
(
data
[
idx
]);
return
ParseCommandArgSongTime
(
data
[
idx
]);
}
}
gcc_pure
SignedSongTime
ParseSignedSongTime
(
unsigned
idx
)
const
{
SignedSongTime
ParseSignedSongTime
(
unsigned
idx
)
const
{
assert
(
idx
<
size
);
assert
(
idx
<
size
);
return
ParseCommandArgSignedSongTime
(
data
[
idx
]);
return
ParseCommandArgSignedSongTime
(
data
[
idx
]);
}
}
gcc_pure
int
ParseOptional
(
unsigned
idx
,
int
default_value
)
const
{
int
ParseOptional
(
unsigned
idx
,
int
default_value
)
const
{
return
idx
<
size
return
idx
<
size
?
ParseInt
(
idx
)
?
ParseInt
(
idx
)
:
default_value
;
:
default_value
;
}
}
gcc_pure
RangeArg
ParseOptional
(
unsigned
idx
,
RangeArg
default_value
)
const
{
RangeArg
ParseOptional
(
unsigned
idx
,
RangeArg
default_value
)
const
{
return
idx
<
size
return
idx
<
size
?
ParseRange
(
idx
)
?
ParseRange
(
idx
)
...
...
This diff is collapsed.
Click to expand it.
src/config/Block.hxx
View file @
979f1b6c
...
@@ -82,12 +82,12 @@ struct ConfigBlock {
...
@@ -82,12 +82,12 @@ struct ConfigBlock {
* object that was synthesized and not loaded from a
* object that was synthesized and not loaded from a
* configuration file.
* configuration file.
*/
*/
bool
IsNull
()
const
{
bool
IsNull
()
const
noexcept
{
return
line
<
0
;
return
line
<
0
;
}
}
gcc_pure
gcc_pure
bool
IsEmpty
()
const
{
bool
IsEmpty
()
const
noexcept
{
return
block_params
.
empty
();
return
block_params
.
empty
();
}
}
...
...
This diff is collapsed.
Click to expand it.
src/db/Helpers.cxx
View file @
979f1b6c
...
@@ -29,7 +29,7 @@
...
@@ -29,7 +29,7 @@
struct
StringLess
{
struct
StringLess
{
gcc_pure
gcc_pure
bool
operator
()(
const
char
*
a
,
const
char
*
b
)
const
{
bool
operator
()(
const
char
*
a
,
const
char
*
b
)
const
noexcept
{
return
strcmp
(
a
,
b
)
<
0
;
return
strcmp
(
a
,
b
)
<
0
;
}
}
};
};
...
...
This diff is collapsed.
Click to expand it.
src/db/Interface.hxx
View file @
979f1b6c
...
@@ -111,7 +111,6 @@ public:
...
@@ -111,7 +111,6 @@ public:
TagType
tag_type
,
TagMask
group_mask
,
TagType
tag_type
,
TagMask
group_mask
,
VisitTag
visit_tag
)
const
=
0
;
VisitTag
visit_tag
)
const
=
0
;
gcc_pure
virtual
DatabaseStats
GetStats
(
const
DatabaseSelection
&
selection
)
const
=
0
;
virtual
DatabaseStats
GetStats
(
const
DatabaseSelection
&
selection
)
const
=
0
;
/**
/**
...
@@ -132,7 +131,7 @@ public:
...
@@ -132,7 +131,7 @@ public:
* Returns a negative value if that is not not known/available.
* Returns a negative value if that is not not known/available.
*/
*/
gcc_pure
gcc_pure
virtual
std
::
chrono
::
system_clock
::
time_point
GetUpdateStamp
()
const
=
0
;
virtual
std
::
chrono
::
system_clock
::
time_point
GetUpdateStamp
()
const
noexcept
=
0
;
};
};
#endif
#endif
This diff is collapsed.
Click to expand it.
src/db/LightDirectory.hxx
View file @
979f1b6c
...
@@ -44,16 +44,16 @@ struct LightDirectory {
...
@@ -44,16 +44,16 @@ struct LightDirectory {
constexpr
LightDirectory
(
const
char
*
_uri
,
time_t
_mtime
)
constexpr
LightDirectory
(
const
char
*
_uri
,
time_t
_mtime
)
:
uri
(
_uri
),
mtime
(
_mtime
)
{}
:
uri
(
_uri
),
mtime
(
_mtime
)
{}
static
constexpr
LightDirectory
Root
()
{
static
constexpr
LightDirectory
Root
()
noexcept
{
return
LightDirectory
(
""
,
0
);
return
LightDirectory
(
""
,
0
);
}
}
bool
IsRoot
()
const
{
bool
IsRoot
()
const
noexcept
{
return
*
uri
==
0
;
return
*
uri
==
0
;
}
}
gcc_pure
gcc_pure
const
char
*
GetPath
()
const
{
const
char
*
GetPath
()
const
noexcept
{
return
uri
;
return
uri
;
}
}
};
};
...
...
This diff is collapsed.
Click to expand it.
src/db/PlaylistInfo.hxx
View file @
979f1b6c
...
@@ -45,7 +45,7 @@ struct PlaylistInfo {
...
@@ -45,7 +45,7 @@ struct PlaylistInfo {
constexpr
CompareName
(
const
char
*
_name
)
:
name
(
_name
)
{}
constexpr
CompareName
(
const
char
*
_name
)
:
name
(
_name
)
{}
gcc_pure
gcc_pure
bool
operator
()(
const
PlaylistInfo
&
pi
)
const
{
bool
operator
()(
const
PlaylistInfo
&
pi
)
const
noexcept
{
return
pi
.
name
.
compare
(
name
)
==
0
;
return
pi
.
name
.
compare
(
name
)
==
0
;
}
}
};
};
...
...
This diff is collapsed.
Click to expand it.
src/db/plugins/ProxyDatabasePlugin.cxx
View file @
979f1b6c
...
@@ -128,7 +128,7 @@ public:
...
@@ -128,7 +128,7 @@ public:
unsigned
Update
(
const
char
*
uri_utf8
,
bool
discard
)
override
;
unsigned
Update
(
const
char
*
uri_utf8
,
bool
discard
)
override
;
std
::
chrono
::
system_clock
::
time_point
GetUpdateStamp
()
const
override
{
std
::
chrono
::
system_clock
::
time_point
GetUpdateStamp
()
const
noexcept
override
{
return
update_stamp
;
return
update_stamp
;
}
}
...
...
This diff is collapsed.
Click to expand it.
src/db/plugins/simple/Directory.hxx
View file @
979f1b6c
...
@@ -187,7 +187,7 @@ public:
...
@@ -187,7 +187,7 @@ public:
}
}
gcc_pure
gcc_pure
const
char
*
GetPath
()
const
{
const
char
*
GetPath
()
const
noexcept
{
return
path
.
c_str
();
return
path
.
c_str
();
}
}
...
...
This diff is collapsed.
Click to expand it.
src/db/plugins/simple/SimpleDatabasePlugin.hxx
View file @
979f1b6c
...
@@ -76,7 +76,7 @@ public:
...
@@ -76,7 +76,7 @@ public:
const
ConfigBlock
&
block
);
const
ConfigBlock
&
block
);
gcc_pure
gcc_pure
Directory
&
GetRoot
()
{
Directory
&
GetRoot
()
noexcept
{
assert
(
root
!=
NULL
);
assert
(
root
!=
NULL
);
return
*
root
;
return
*
root
;
...
@@ -125,7 +125,7 @@ public:
...
@@ -125,7 +125,7 @@ public:
DatabaseStats
GetStats
(
const
DatabaseSelection
&
selection
)
const
override
;
DatabaseStats
GetStats
(
const
DatabaseSelection
&
selection
)
const
override
;
std
::
chrono
::
system_clock
::
time_point
GetUpdateStamp
()
const
override
{
std
::
chrono
::
system_clock
::
time_point
GetUpdateStamp
()
const
noexcept
override
{
return
mtime
;
return
mtime
;
}
}
...
...
This diff is collapsed.
Click to expand it.
src/db/plugins/upnp/Object.hxx
View file @
979f1b6c
...
@@ -60,7 +60,7 @@ public:
...
@@ -60,7 +60,7 @@ public:
* Parent's ObjectId
* Parent's ObjectId
*/
*/
std
::
string
parent_id
;
std
::
string
parent_id
;
std
::
string
url
;
std
::
string
url
;
/**
/**
...
@@ -80,7 +80,7 @@ public:
...
@@ -80,7 +80,7 @@ public:
UPnPDirObject
&
operator
=
(
UPnPDirObject
&&
)
=
default
;
UPnPDirObject
&
operator
=
(
UPnPDirObject
&&
)
=
default
;
void
Clear
()
{
void
Clear
()
noexcept
{
id
.
clear
();
id
.
clear
();
parent_id
.
clear
();
parent_id
.
clear
();
url
.
clear
();
url
.
clear
();
...
@@ -90,7 +90,7 @@ public:
...
@@ -90,7 +90,7 @@ public:
}
}
gcc_pure
gcc_pure
bool
Check
()
const
{
bool
Check
()
const
noexcept
{
return
!
id
.
empty
()
&&
!
parent_id
.
empty
()
&&
!
name
.
empty
()
&&
return
!
id
.
empty
()
&&
!
parent_id
.
empty
()
&&
!
name
.
empty
()
&&
(
type
!=
UPnPDirObject
::
Type
::
ITEM
||
(
type
!=
UPnPDirObject
::
Type
::
ITEM
||
item_class
!=
UPnPDirObject
::
ItemClass
::
UNKNOWN
);
item_class
!=
UPnPDirObject
::
ItemClass
::
UNKNOWN
);
...
...
This diff is collapsed.
Click to expand it.
src/db/plugins/upnp/UpnpDatabasePlugin.cxx
View file @
979f1b6c
...
@@ -94,7 +94,7 @@ public:
...
@@ -94,7 +94,7 @@ public:
DatabaseStats
GetStats
(
const
DatabaseSelection
&
selection
)
const
override
;
DatabaseStats
GetStats
(
const
DatabaseSelection
&
selection
)
const
override
;
std
::
chrono
::
system_clock
::
time_point
GetUpdateStamp
()
const
override
{
std
::
chrono
::
system_clock
::
time_point
GetUpdateStamp
()
const
noexcept
override
{
return
std
::
chrono
::
system_clock
::
time_point
::
min
();
return
std
::
chrono
::
system_clock
::
time_point
::
min
();
}
}
...
...
This diff is collapsed.
Click to expand it.
src/db/update/ExcludeList.cxx
View file @
979f1b6c
...
@@ -36,7 +36,7 @@
...
@@ -36,7 +36,7 @@
#include <string.h>
#include <string.h>
bool
bool
ExcludeList
::
LoadFile
(
Path
path_fs
)
ExcludeList
::
LoadFile
(
Path
path_fs
)
noexcept
try
{
try
{
#ifdef HAVE_CLASS_GLOB
#ifdef HAVE_CLASS_GLOB
TextFile
file
(
path_fs
);
TextFile
file
(
path_fs
);
...
@@ -67,7 +67,7 @@ try {
...
@@ -67,7 +67,7 @@ try {
}
}
bool
bool
ExcludeList
::
Check
(
Path
name_fs
)
const
ExcludeList
::
Check
(
Path
name_fs
)
const
noexcept
{
{
assert
(
!
name_fs
.
IsNull
());
assert
(
!
name_fs
.
IsNull
());
...
...
This diff is collapsed.
Click to expand it.
src/db/update/ExcludeList.hxx
View file @
979f1b6c
...
@@ -50,7 +50,7 @@ public:
...
@@ -50,7 +50,7 @@ public:
:
parent
(
&
_parent
)
{}
:
parent
(
&
_parent
)
{}
gcc_pure
gcc_pure
bool
IsEmpty
()
const
{
bool
IsEmpty
()
const
noexcept
{
#ifdef HAVE_CLASS_GLOB
#ifdef HAVE_CLASS_GLOB
return
((
parent
==
nullptr
)
||
parent
->
IsEmpty
())
&&
patterns
.
empty
();
return
((
parent
==
nullptr
)
||
parent
->
IsEmpty
())
&&
patterns
.
empty
();
#else
#else
...
@@ -62,13 +62,13 @@ public:
...
@@ -62,13 +62,13 @@ public:
/**
/**
* Loads and parses a .mpdignore file.
* Loads and parses a .mpdignore file.
*/
*/
bool
LoadFile
(
Path
path_fs
);
bool
LoadFile
(
Path
path_fs
)
noexcept
;
/**
/**
* Checks whether one of the patterns in the .mpdignore file matches
* Checks whether one of the patterns in the .mpdignore file matches
* the specified file name.
* the specified file name.
*/
*/
bool
Check
(
Path
name_fs
)
const
;
bool
Check
(
Path
name_fs
)
const
noexcept
;
};
};
...
...
This diff is collapsed.
Click to expand it.
src/decoder/Bridge.cxx
View file @
979f1b6c
...
@@ -277,7 +277,7 @@ DecoderBridge::Ready(const AudioFormat audio_format,
...
@@ -277,7 +277,7 @@ DecoderBridge::Ready(const AudioFormat audio_format,
}
}
DecoderCommand
DecoderCommand
DecoderBridge
::
GetCommand
()
DecoderBridge
::
GetCommand
()
noexcept
{
{
return
LockGetVirtualCommand
();
return
LockGetVirtualCommand
();
}
}
...
@@ -326,7 +326,7 @@ DecoderBridge::CommandFinished()
...
@@ -326,7 +326,7 @@ DecoderBridge::CommandFinished()
}
}
SongTime
SongTime
DecoderBridge
::
GetSeekTime
()
DecoderBridge
::
GetSeekTime
()
noexcept
{
{
assert
(
dc
.
pipe
!=
nullptr
);
assert
(
dc
.
pipe
!=
nullptr
);
...
@@ -341,7 +341,7 @@ DecoderBridge::GetSeekTime()
...
@@ -341,7 +341,7 @@ DecoderBridge::GetSeekTime()
}
}
uint64_t
uint64_t
DecoderBridge
::
GetSeekFrame
()
DecoderBridge
::
GetSeekFrame
()
noexcept
{
{
return
GetSeekTime
().
ToScale
<
uint64_t
>
(
dc
.
in_audio_format
.
sample_rate
);
return
GetSeekTime
().
ToScale
<
uint64_t
>
(
dc
.
in_audio_format
.
sample_rate
);
}
}
...
...
This diff is collapsed.
Click to expand it.
src/decoder/Bridge.hxx
View file @
979f1b6c
...
@@ -134,10 +134,10 @@ public:
...
@@ -134,10 +134,10 @@ public:
/* virtual methods from DecoderClient */
/* virtual methods from DecoderClient */
void
Ready
(
AudioFormat
audio_format
,
void
Ready
(
AudioFormat
audio_format
,
bool
seekable
,
SignedSongTime
duration
)
override
;
bool
seekable
,
SignedSongTime
duration
)
override
;
DecoderCommand
GetCommand
()
override
;
DecoderCommand
GetCommand
()
noexcept
override
;
void
CommandFinished
()
override
;
void
CommandFinished
()
override
;
SongTime
GetSeekTime
()
override
;
SongTime
GetSeekTime
()
noexcept
override
;
uint64_t
GetSeekFrame
()
override
;
uint64_t
GetSeekFrame
()
noexcept
override
;
void
SeekError
()
override
;
void
SeekError
()
override
;
InputStreamPtr
OpenUri
(
const
char
*
uri
)
override
;
InputStreamPtr
OpenUri
(
const
char
*
uri
)
override
;
size_t
Read
(
InputStream
&
is
,
void
*
buffer
,
size_t
length
)
override
;
size_t
Read
(
InputStream
&
is
,
void
*
buffer
,
size_t
length
)
override
;
...
...
This diff is collapsed.
Click to expand it.
src/decoder/Client.hxx
View file @
979f1b6c
...
@@ -58,7 +58,7 @@ public:
...
@@ -58,7 +58,7 @@ public:
* command pending
* command pending
*/
*/
gcc_pure
gcc_pure
virtual
DecoderCommand
GetCommand
()
=
0
;
virtual
DecoderCommand
GetCommand
()
noexcept
=
0
;
/**
/**
* Called by the decoder when it has performed the requested command
* Called by the decoder when it has performed the requested command
...
@@ -73,7 +73,7 @@ public:
...
@@ -73,7 +73,7 @@ public:
* @return the destination position for the seek in milliseconds
* @return the destination position for the seek in milliseconds
*/
*/
gcc_pure
gcc_pure
virtual
SongTime
GetSeekTime
()
=
0
;
virtual
SongTime
GetSeekTime
()
noexcept
=
0
;
/**
/**
* Call this when you have received the DecoderCommand::SEEK command.
* Call this when you have received the DecoderCommand::SEEK command.
...
@@ -81,7 +81,7 @@ public:
...
@@ -81,7 +81,7 @@ public:
* @return the destination position for the seek in frames
* @return the destination position for the seek in frames
*/
*/
gcc_pure
gcc_pure
virtual
uint64_t
GetSeekFrame
()
=
0
;
virtual
uint64_t
GetSeekFrame
()
noexcept
=
0
;
/**
/**
* Call this instead of CommandFinished() when seeking has
* Call this instead of CommandFinished() when seeking has
...
...
This diff is collapsed.
Click to expand it.
src/decoder/DecoderBuffer.hxx
View file @
979f1b6c
...
@@ -54,11 +54,11 @@ public:
...
@@ -54,11 +54,11 @@ public:
size_t
_size
)
size_t
_size
)
:
client
(
_client
),
is
(
_is
),
buffer
(
_size
)
{}
:
client
(
_client
),
is
(
_is
),
buffer
(
_size
)
{}
const
InputStream
&
GetStream
()
const
{
const
InputStream
&
GetStream
()
const
noexcept
{
return
is
;
return
is
;
}
}
void
Clear
()
{
void
Clear
()
noexcept
{
buffer
.
Clear
();
buffer
.
Clear
();
}
}
...
@@ -75,7 +75,7 @@ public:
...
@@ -75,7 +75,7 @@ public:
* How many bytes are stored in the buffer?
* How many bytes are stored in the buffer?
*/
*/
gcc_pure
gcc_pure
size_t
GetAvailable
()
const
{
size_t
GetAvailable
()
const
noexcept
{
return
buffer
.
GetAvailable
();
return
buffer
.
GetAvailable
();
}
}
...
@@ -84,7 +84,7 @@ public:
...
@@ -84,7 +84,7 @@ public:
* you have to call Consume() to do that. The returned buffer
* you have to call Consume() to do that. The returned buffer
* becomes invalid after a Fill() or a Consume() call.
* becomes invalid after a Fill() or a Consume() call.
*/
*/
ConstBuffer
<
void
>
Read
()
const
{
ConstBuffer
<
void
>
Read
()
const
noexcept
{
auto
r
=
buffer
.
Read
();
auto
r
=
buffer
.
Read
();
return
{
r
.
data
,
r
.
size
};
return
{
r
.
data
,
r
.
size
};
}
}
...
@@ -102,7 +102,7 @@ public:
...
@@ -102,7 +102,7 @@ public:
*
*
* @param nbytes the number of bytes to consume
* @param nbytes the number of bytes to consume
*/
*/
void
Consume
(
size_t
nbytes
)
{
void
Consume
(
size_t
nbytes
)
noexcept
{
buffer
.
Consume
(
nbytes
);
buffer
.
Consume
(
nbytes
);
}
}
...
...
This diff is collapsed.
Click to expand it.
src/decoder/DecoderControl.hxx
View file @
979f1b6c
...
@@ -227,29 +227,29 @@ struct DecoderControl {
...
@@ -227,29 +227,29 @@ struct DecoderControl {
}
}
gcc_pure
gcc_pure
bool
LockIsIdle
()
const
{
bool
LockIsIdle
()
const
noexcept
{
const
std
::
lock_guard
<
Mutex
>
protect
(
mutex
);
const
std
::
lock_guard
<
Mutex
>
protect
(
mutex
);
return
IsIdle
();
return
IsIdle
();
}
}
bool
IsStarting
()
const
{
bool
IsStarting
()
const
noexcept
{
return
state
==
DecoderState
::
START
;
return
state
==
DecoderState
::
START
;
}
}
gcc_pure
gcc_pure
bool
LockIsStarting
()
const
{
bool
LockIsStarting
()
const
noexcept
{
const
std
::
lock_guard
<
Mutex
>
protect
(
mutex
);
const
std
::
lock_guard
<
Mutex
>
protect
(
mutex
);
return
IsStarting
();
return
IsStarting
();
}
}
bool
HasFailed
()
const
{
bool
HasFailed
()
const
noexcept
{
assert
(
command
==
DecoderCommand
::
NONE
);
assert
(
command
==
DecoderCommand
::
NONE
);
return
state
==
DecoderState
::
ERROR
;
return
state
==
DecoderState
::
ERROR
;
}
}
gcc_pure
gcc_pure
bool
LockHasFailed
()
const
{
bool
LockHasFailed
()
const
noexcept
{
const
std
::
lock_guard
<
Mutex
>
protect
(
mutex
);
const
std
::
lock_guard
<
Mutex
>
protect
(
mutex
);
return
HasFailed
();
return
HasFailed
();
}
}
...
...
This diff is collapsed.
Click to expand it.
src/decoder/plugins/FfmpegDecoderPlugin.cxx
View file @
979f1b6c
...
@@ -881,7 +881,8 @@ ffmpeg_scan_stream(InputStream &is,
...
@@ -881,7 +881,8 @@ ffmpeg_scan_stream(InputStream &is,
* more formats.
* more formats.
*/
*/
static
const
char
*
const
ffmpeg_suffixes
[]
=
{
static
const
char
*
const
ffmpeg_suffixes
[]
=
{
"16sv"
,
"3g2"
,
"3gp"
,
"4xm"
,
"8svx"
,
"aa3"
,
"aac"
,
"ac3"
,
"afc"
,
"aif"
,
"16sv"
,
"3g2"
,
"3gp"
,
"4xm"
,
"8svx"
,
"aa3"
,
"aac"
,
"ac3"
,
"adx"
,
"afc"
,
"aif"
,
"aifc"
,
"aiff"
,
"al"
,
"alaw"
,
"amr"
,
"anim"
,
"apc"
,
"ape"
,
"asf"
,
"aifc"
,
"aiff"
,
"al"
,
"alaw"
,
"amr"
,
"anim"
,
"apc"
,
"ape"
,
"asf"
,
"atrac"
,
"au"
,
"aud"
,
"avi"
,
"avm2"
,
"avs"
,
"bap"
,
"bfi"
,
"c93"
,
"cak"
,
"atrac"
,
"au"
,
"aud"
,
"avi"
,
"avm2"
,
"avs"
,
"bap"
,
"bfi"
,
"c93"
,
"cak"
,
"cin"
,
"cmv"
,
"cpk"
,
"daud"
,
"dct"
,
"divx"
,
"dts"
,
"dv"
,
"dvd"
,
"dxa"
,
"cin"
,
"cmv"
,
"cpk"
,
"daud"
,
"dct"
,
"divx"
,
"dts"
,
"dv"
,
"dvd"
,
"dxa"
,
...
@@ -934,6 +935,7 @@ static const char *const ffmpeg_mime_types[] = {
...
@@ -934,6 +935,7 @@ static const char *const ffmpeg_mime_types[] = {
"audio/x-16sv"
,
"audio/x-16sv"
,
"audio/x-aac"
,
"audio/x-aac"
,
"audio/x-ac3"
,
"audio/x-ac3"
,
"audio/x-adx"
,
"audio/x-aiff"
"audio/x-aiff"
"audio/x-alaw"
,
"audio/x-alaw"
,
"audio/x-au"
,
"audio/x-au"
,
...
...
This diff is collapsed.
Click to expand it.
src/decoder/plugins/FlacMetadata.hxx
View file @
979f1b6c
...
@@ -42,25 +42,27 @@ public:
...
@@ -42,25 +42,27 @@ public:
return
chain
;
return
chain
;
}
}
bool
Read
(
const
char
*
path
)
{
bool
Read
(
const
char
*
path
)
noexcept
{
return
::
FLAC__metadata_chain_read
(
chain
,
path
);
return
::
FLAC__metadata_chain_read
(
chain
,
path
);
}
}
bool
Read
(
FLAC__IOHandle
handle
,
FLAC__IOCallbacks
callbacks
)
{
bool
Read
(
FLAC__IOHandle
handle
,
FLAC__IOCallbacks
callbacks
)
noexcept
{
return
::
FLAC__metadata_chain_read_with_callbacks
(
chain
,
return
::
FLAC__metadata_chain_read_with_callbacks
(
chain
,
handle
,
handle
,
callbacks
);
callbacks
);
}
}
bool
Read
(
InputStream
&
is
)
{
bool
Read
(
InputStream
&
is
)
noexcept
{
return
Read
(
::
ToFlacIOHandle
(
is
),
::
GetFlacIOCallbacks
(
is
));
return
Read
(
::
ToFlacIOHandle
(
is
),
::
GetFlacIOCallbacks
(
is
));
}
}
bool
ReadOgg
(
const
char
*
path
)
{
bool
ReadOgg
(
const
char
*
path
)
noexcept
{
return
::
FLAC__metadata_chain_read_ogg
(
chain
,
path
);
return
::
FLAC__metadata_chain_read_ogg
(
chain
,
path
);
}
}
bool
ReadOgg
(
FLAC__IOHandle
handle
,
FLAC__IOCallbacks
callbacks
)
{
bool
ReadOgg
(
FLAC__IOHandle
handle
,
FLAC__IOCallbacks
callbacks
)
noexcept
{
return
::
FLAC__metadata_chain_read_ogg_with_callbacks
(
chain
,
return
::
FLAC__metadata_chain_read_ogg_with_callbacks
(
chain
,
handle
,
handle
,
callbacks
);
callbacks
);
...
@@ -71,12 +73,12 @@ public:
...
@@ -71,12 +73,12 @@ public:
}
}
gcc_pure
gcc_pure
FLAC__Metadata_ChainStatus
GetStatus
()
const
{
FLAC__Metadata_ChainStatus
GetStatus
()
const
noexcept
{
return
::
FLAC__metadata_chain_status
(
chain
);
return
::
FLAC__metadata_chain_status
(
chain
);
}
}
gcc_pure
gcc_pure
const
char
*
GetStatusString
()
const
{
const
char
*
GetStatusString
()
const
noexcept
{
return
FLAC__Metadata_ChainStatusString
[
GetStatus
()];
return
FLAC__Metadata_ChainStatusString
[
GetStatus
()];
}
}
...
@@ -99,12 +101,12 @@ public:
...
@@ -99,12 +101,12 @@ public:
::
FLAC__metadata_iterator_delete
(
iterator
);
::
FLAC__metadata_iterator_delete
(
iterator
);
}
}
bool
Next
()
{
bool
Next
()
noexcept
{
return
::
FLAC__metadata_iterator_next
(
iterator
);
return
::
FLAC__metadata_iterator_next
(
iterator
);
}
}
gcc_pure
gcc_pure
FLAC__StreamMetadata
*
GetBlock
()
{
FLAC__StreamMetadata
*
GetBlock
()
noexcept
{
return
::
FLAC__metadata_iterator_get_block
(
iterator
);
return
::
FLAC__metadata_iterator_get_block
(
iterator
);
}
}
};
};
...
...
This diff is collapsed.
Click to expand it.
src/decoder/plugins/OpusDecoderPlugin.cxx
View file @
979f1b6c
...
@@ -52,14 +52,14 @@ static constexpr unsigned opus_output_buffer_frames = opus_sample_rate / 4;
...
@@ -52,14 +52,14 @@ static constexpr unsigned opus_output_buffer_frames = opus_sample_rate / 4;
gcc_pure
gcc_pure
static
bool
static
bool
IsOpusHead
(
const
ogg_packet
&
packet
)
IsOpusHead
(
const
ogg_packet
&
packet
)
noexcept
{
{
return
packet
.
bytes
>=
8
&&
memcmp
(
packet
.
packet
,
"OpusHead"
,
8
)
==
0
;
return
packet
.
bytes
>=
8
&&
memcmp
(
packet
.
packet
,
"OpusHead"
,
8
)
==
0
;
}
}
gcc_pure
gcc_pure
static
bool
static
bool
IsOpusTags
(
const
ogg_packet
&
packet
)
IsOpusTags
(
const
ogg_packet
&
packet
)
noexcept
{
{
return
packet
.
bytes
>=
8
&&
memcmp
(
packet
.
packet
,
"OpusTags"
,
8
)
==
0
;
return
packet
.
bytes
>=
8
&&
memcmp
(
packet
.
packet
,
"OpusTags"
,
8
)
==
0
;
}
}
...
...
This diff is collapsed.
Click to expand it.
src/event/Loop.hxx
View file @
979f1b6c
...
@@ -199,7 +199,7 @@ public:
...
@@ -199,7 +199,7 @@ public:
* Are we currently running inside this EventLoop's thread?
* Are we currently running inside this EventLoop's thread?
*/
*/
gcc_pure
gcc_pure
bool
IsInside
()
const
{
bool
IsInside
()
const
noexcept
{
assert
(
!
thread
.
IsNull
());
assert
(
!
thread
.
IsNull
());
return
thread
.
IsInside
();
return
thread
.
IsInside
();
...
@@ -207,7 +207,7 @@ public:
...
@@ -207,7 +207,7 @@ public:
#ifndef NDEBUG
#ifndef NDEBUG
gcc_pure
gcc_pure
bool
IsInsideOrVirgin
()
const
{
bool
IsInsideOrVirgin
()
const
noexcept
{
return
virgin
||
IsInside
();
return
virgin
||
IsInside
();
}
}
#endif
#endif
...
@@ -219,7 +219,7 @@ public:
...
@@ -219,7 +219,7 @@ public:
* are not yet/anymore handled.
* are not yet/anymore handled.
*/
*/
gcc_pure
gcc_pure
bool
IsInsideOrNull
()
const
{
bool
IsInsideOrNull
()
const
noexcept
{
return
thread
.
IsNull
()
||
thread
.
IsInside
();
return
thread
.
IsNull
()
||
thread
.
IsInside
();
}
}
};
};
...
...
This diff is collapsed.
Click to expand it.
src/fs/AllocatedPath.hxx
View file @
979f1b6c
...
@@ -77,12 +77,12 @@ public:
...
@@ -77,12 +77,12 @@ public:
* @see IsNull()
* @see IsNull()
*/
*/
gcc_const
gcc_const
static
AllocatedPath
Null
()
{
static
AllocatedPath
Null
()
noexcept
{
return
AllocatedPath
(
nullptr
);
return
AllocatedPath
(
nullptr
);
}
}
gcc_pure
gcc_pure
operator
Path
()
const
{
operator
Path
()
const
noexcept
{
return
Path
::
FromFS
(
c_str
());
return
Path
::
FromFS
(
c_str
());
}
}
...
@@ -90,36 +90,39 @@ public:
...
@@ -90,36 +90,39 @@ public:
* Join two path components with the path separator.
* Join two path components with the path separator.
*/
*/
gcc_pure
gcc_nonnull_all
gcc_pure
gcc_nonnull_all
static
AllocatedPath
Build
(
const_pointer_type
a
,
const_pointer_type
b
)
{
static
AllocatedPath
Build
(
const_pointer_type
a
,
const_pointer_type
b
)
noexcept
{
return
Build
(
a
,
PathTraitsFS
::
GetLength
(
a
),
return
Build
(
a
,
PathTraitsFS
::
GetLength
(
a
),
b
,
PathTraitsFS
::
GetLength
(
b
));
b
,
PathTraitsFS
::
GetLength
(
b
));
}
}
gcc_pure
gcc_nonnull_all
gcc_pure
gcc_nonnull_all
static
AllocatedPath
Build
(
Path
a
,
const_pointer_type
b
)
{
static
AllocatedPath
Build
(
Path
a
,
const_pointer_type
b
)
noexcept
{
return
Build
(
a
.
c_str
(),
b
);
return
Build
(
a
.
c_str
(),
b
);
}
}
gcc_pure
gcc_nonnull_all
gcc_pure
gcc_nonnull_all
static
AllocatedPath
Build
(
Path
a
,
Path
b
)
{
static
AllocatedPath
Build
(
Path
a
,
Path
b
)
noexcept
{
return
Build
(
a
,
b
.
c_str
());
return
Build
(
a
,
b
.
c_str
());
}
}
gcc_pure
gcc_nonnull_all
gcc_pure
gcc_nonnull_all
static
AllocatedPath
Build
(
const_pointer_type
a
,
const
AllocatedPath
&
b
)
{
static
AllocatedPath
Build
(
const_pointer_type
a
,
const
AllocatedPath
&
b
)
noexcept
{
return
Build
(
a
,
PathTraitsFS
::
GetLength
(
a
),
return
Build
(
a
,
PathTraitsFS
::
GetLength
(
a
),
b
.
value
.
c_str
(),
b
.
value
.
size
());
b
.
value
.
c_str
(),
b
.
value
.
size
());
}
}
gcc_pure
gcc_nonnull_all
gcc_pure
gcc_nonnull_all
static
AllocatedPath
Build
(
const
AllocatedPath
&
a
,
const_pointer_type
b
)
{
static
AllocatedPath
Build
(
const
AllocatedPath
&
a
,
const_pointer_type
b
)
noexcept
{
return
Build
(
a
.
value
.
c_str
(),
a
.
value
.
size
(),
return
Build
(
a
.
value
.
c_str
(),
a
.
value
.
size
(),
b
,
PathTraitsFS
::
GetLength
(
b
));
b
,
PathTraitsFS
::
GetLength
(
b
));
}
}
gcc_pure
gcc_pure
static
AllocatedPath
Build
(
const
AllocatedPath
&
a
,
static
AllocatedPath
Build
(
const
AllocatedPath
&
a
,
const
AllocatedPath
&
b
)
{
const
AllocatedPath
&
b
)
noexcept
{
return
Build
(
a
.
value
.
c_str
(),
a
.
value
.
size
(),
return
Build
(
a
.
value
.
c_str
(),
a
.
value
.
size
(),
b
.
value
.
c_str
(),
b
.
value
.
size
());
b
.
value
.
c_str
(),
b
.
value
.
size
());
}
}
...
@@ -129,13 +132,13 @@ public:
...
@@ -129,13 +132,13 @@ public:
* character set to a #Path instance.
* character set to a #Path instance.
*/
*/
gcc_pure
gcc_pure
static
AllocatedPath
FromFS
(
const_pointer_type
fs
)
{
static
AllocatedPath
FromFS
(
const_pointer_type
fs
)
noexcept
{
return
AllocatedPath
(
fs
);
return
AllocatedPath
(
fs
);
}
}
gcc_pure
gcc_pure
static
AllocatedPath
FromFS
(
const_pointer_type
_begin
,
static
AllocatedPath
FromFS
(
const_pointer_type
_begin
,
const_pointer_type
_end
)
{
const_pointer_type
_end
)
noexcept
{
return
AllocatedPath
(
_begin
,
_end
);
return
AllocatedPath
(
_begin
,
_end
);
}
}
...
@@ -144,7 +147,7 @@ public:
...
@@ -144,7 +147,7 @@ public:
* character set to a #Path instance.
* character set to a #Path instance.
*/
*/
gcc_pure
gcc_pure
static
AllocatedPath
FromFS
(
string
&&
fs
)
{
static
AllocatedPath
FromFS
(
string
&&
fs
)
noexcept
{
return
AllocatedPath
(
std
::
move
(
fs
));
return
AllocatedPath
(
std
::
move
(
fs
));
}
}
...
@@ -176,12 +179,12 @@ public:
...
@@ -176,12 +179,12 @@ public:
}
}
gcc_pure
gcc_pure
bool
operator
==
(
const
AllocatedPath
&
other
)
const
{
bool
operator
==
(
const
AllocatedPath
&
other
)
const
noexcept
{
return
value
==
other
.
value
;
return
value
==
other
.
value
;
}
}
gcc_pure
gcc_pure
bool
operator
!=
(
const
AllocatedPath
&
other
)
const
{
bool
operator
!=
(
const
AllocatedPath
&
other
)
const
noexcept
{
return
value
!=
other
.
value
;
return
value
!=
other
.
value
;
}
}
...
@@ -197,7 +200,7 @@ public:
...
@@ -197,7 +200,7 @@ public:
* Check if this is a "nulled" instance. A "nulled" instance
* Check if this is a "nulled" instance. A "nulled" instance
* must not be used.
* must not be used.
*/
*/
bool
IsNull
()
const
{
bool
IsNull
()
const
noexcept
{
return
value
.
empty
();
return
value
.
empty
();
}
}
...
@@ -206,7 +209,7 @@ public:
...
@@ -206,7 +209,7 @@ public:
*
*
* @see IsNull()
* @see IsNull()
*/
*/
void
SetNull
()
{
void
SetNull
()
noexcept
{
value
.
clear
();
value
.
clear
();
}
}
...
@@ -215,7 +218,7 @@ public:
...
@@ -215,7 +218,7 @@ public:
* elements (which may not be the number of characters).
* elements (which may not be the number of characters).
*/
*/
gcc_pure
gcc_pure
size_t
length
()
const
{
size_t
length
()
const
noexcept
{
return
value
.
length
();
return
value
.
length
();
}
}
...
@@ -225,7 +228,7 @@ public:
...
@@ -225,7 +228,7 @@ public:
* instance ends.
* instance ends.
*/
*/
gcc_pure
gcc_pure
const_pointer_type
c_str
()
const
{
const_pointer_type
c_str
()
const
noexcept
{
return
value
.
c_str
();
return
value
.
c_str
();
}
}
...
@@ -234,7 +237,7 @@ public:
...
@@ -234,7 +237,7 @@ public:
* null-terminated.
* null-terminated.
*/
*/
gcc_pure
gcc_pure
const_pointer_type
data
()
const
{
const_pointer_type
data
()
const
noexcept
{
return
value
.
data
();
return
value
.
data
();
}
}
...
...
This diff is collapsed.
Click to expand it.
src/fs/Glob.hxx
View file @
979f1b6c
...
@@ -54,7 +54,7 @@ public:
...
@@ -54,7 +54,7 @@ public:
#endif
#endif
gcc_pure
gcc_pure
bool
Check
(
const
char
*
name_fs
)
const
{
bool
Check
(
const
char
*
name_fs
)
const
noexcept
{
#ifdef HAVE_FNMATCH
#ifdef HAVE_FNMATCH
return
fnmatch
(
pattern
.
c_str
(),
name_fs
,
0
)
==
0
;
return
fnmatch
(
pattern
.
c_str
(),
name_fs
,
0
)
==
0
;
#elif defined(WIN32)
#elif defined(WIN32)
...
...
This diff is collapsed.
Click to expand it.
src/fs/Path.hxx
View file @
979f1b6c
...
@@ -92,7 +92,7 @@ public:
...
@@ -92,7 +92,7 @@ public:
* elements (which may not be the number of characters).
* elements (which may not be the number of characters).
*/
*/
gcc_pure
gcc_pure
size_t
length
()
const
{
size_t
length
()
const
noexcept
{
assert
(
!
IsNull
());
assert
(
!
IsNull
());
return
PathTraitsFS
::
GetLength
(
c_str
());
return
PathTraitsFS
::
GetLength
(
c_str
());
...
@@ -104,7 +104,7 @@ public:
...
@@ -104,7 +104,7 @@ public:
* instance ends.
* instance ends.
*/
*/
gcc_pure
gcc_pure
const_pointer_type
c_str
()
const
{
const_pointer_type
c_str
()
const
noexcept
{
return
Base
::
c_str
();
return
Base
::
c_str
();
}
}
...
@@ -113,7 +113,7 @@ public:
...
@@ -113,7 +113,7 @@ public:
* null-terminated.
* null-terminated.
*/
*/
gcc_pure
gcc_pure
const_pointer_type
data
()
const
{
const_pointer_type
data
()
const
noexcept
{
return
c_str
();
return
c_str
();
}
}
...
...
This diff is collapsed.
Click to expand it.
src/fs/Traits.hxx
View file @
979f1b6c
...
@@ -63,7 +63,7 @@ struct PathTraitsFS {
...
@@ -63,7 +63,7 @@ struct PathTraitsFS {
static
constexpr
const_pointer_type
CURRENT_DIRECTORY
=
PATH_LITERAL
(
"."
);
static
constexpr
const_pointer_type
CURRENT_DIRECTORY
=
PATH_LITERAL
(
"."
);
static
constexpr
bool
IsSeparator
(
value_type
ch
)
{
static
constexpr
bool
IsSeparator
(
value_type
ch
)
noexcept
{
return
return
#ifdef WIN32
#ifdef WIN32
ch
==
'/'
||
ch
==
'/'
||
...
@@ -72,7 +72,7 @@ struct PathTraitsFS {
...
@@ -72,7 +72,7 @@ struct PathTraitsFS {
}
}
gcc_pure
gcc_nonnull_all
gcc_pure
gcc_nonnull_all
static
const_pointer_type
FindLastSeparator
(
const_pointer_type
p
)
{
static
const_pointer_type
FindLastSeparator
(
const_pointer_type
p
)
noexcept
{
#if !CLANG_CHECK_VERSION(3,6)
#if !CLANG_CHECK_VERSION(3,6)
/* disabled on clang due to -Wtautological-pointer-compare */
/* disabled on clang due to -Wtautological-pointer-compare */
assert
(
p
!=
nullptr
);
assert
(
p
!=
nullptr
);
...
@@ -90,13 +90,13 @@ struct PathTraitsFS {
...
@@ -90,13 +90,13 @@ struct PathTraitsFS {
#ifdef WIN32
#ifdef WIN32
gcc_pure
gcc_nonnull_all
gcc_pure
gcc_nonnull_all
static
constexpr
bool
IsDrive
(
const_pointer_type
p
)
{
static
constexpr
bool
IsDrive
(
const_pointer_type
p
)
noexcept
{
return
IsAlphaASCII
(
p
[
0
])
&&
p
[
1
]
==
':'
;
return
IsAlphaASCII
(
p
[
0
])
&&
p
[
1
]
==
':'
;
}
}
#endif
#endif
gcc_pure
gcc_nonnull_all
gcc_pure
gcc_nonnull_all
static
bool
IsAbsolute
(
const_pointer_type
p
)
{
static
bool
IsAbsolute
(
const_pointer_type
p
)
noexcept
{
#if !CLANG_CHECK_VERSION(3,6)
#if !CLANG_CHECK_VERSION(3,6)
/* disabled on clang due to -Wtautological-pointer-compare */
/* disabled on clang due to -Wtautological-pointer-compare */
assert
(
p
!=
nullptr
);
assert
(
p
!=
nullptr
);
...
@@ -110,12 +110,12 @@ struct PathTraitsFS {
...
@@ -110,12 +110,12 @@ struct PathTraitsFS {
}
}
gcc_pure
gcc_nonnull_all
gcc_pure
gcc_nonnull_all
static
size_t
GetLength
(
const_pointer_type
p
)
{
static
size_t
GetLength
(
const_pointer_type
p
)
noexcept
{
return
StringLength
(
p
);
return
StringLength
(
p
);
}
}
gcc_pure
gcc_nonnull_all
gcc_pure
gcc_nonnull_all
static
const_pointer_type
Find
(
const_pointer_type
p
,
value_type
ch
)
{
static
const_pointer_type
Find
(
const_pointer_type
p
,
value_type
ch
)
noexcept
{
return
StringFind
(
p
,
ch
);
return
StringFind
(
p
,
ch
);
}
}
...
@@ -179,7 +179,7 @@ struct PathTraitsUTF8 {
...
@@ -179,7 +179,7 @@ struct PathTraitsUTF8 {
}
}
gcc_pure
gcc_nonnull_all
gcc_pure
gcc_nonnull_all
static
const_pointer_type
FindLastSeparator
(
const_pointer_type
p
)
{
static
const_pointer_type
FindLastSeparator
(
const_pointer_type
p
)
noexcept
{
#if !CLANG_CHECK_VERSION(3,6)
#if !CLANG_CHECK_VERSION(3,6)
/* disabled on clang due to -Wtautological-pointer-compare */
/* disabled on clang due to -Wtautological-pointer-compare */
assert
(
p
!=
nullptr
);
assert
(
p
!=
nullptr
);
...
@@ -190,13 +190,13 @@ struct PathTraitsUTF8 {
...
@@ -190,13 +190,13 @@ struct PathTraitsUTF8 {
#ifdef WIN32
#ifdef WIN32
gcc_pure
gcc_nonnull_all
gcc_pure
gcc_nonnull_all
static
constexpr
bool
IsDrive
(
const_pointer_type
p
)
{
static
constexpr
bool
IsDrive
(
const_pointer_type
p
)
noexcept
{
return
IsAlphaASCII
(
p
[
0
])
&&
p
[
1
]
==
':'
;
return
IsAlphaASCII
(
p
[
0
])
&&
p
[
1
]
==
':'
;
}
}
#endif
#endif
gcc_pure
gcc_nonnull_all
gcc_pure
gcc_nonnull_all
static
bool
IsAbsolute
(
const_pointer_type
p
)
{
static
bool
IsAbsolute
(
const_pointer_type
p
)
noexcept
{
#if !CLANG_CHECK_VERSION(3,6)
#if !CLANG_CHECK_VERSION(3,6)
/* disabled on clang due to -Wtautological-pointer-compare */
/* disabled on clang due to -Wtautological-pointer-compare */
assert
(
p
!=
nullptr
);
assert
(
p
!=
nullptr
);
...
@@ -210,12 +210,12 @@ struct PathTraitsUTF8 {
...
@@ -210,12 +210,12 @@ struct PathTraitsUTF8 {
}
}
gcc_pure
gcc_nonnull_all
gcc_pure
gcc_nonnull_all
static
size_t
GetLength
(
const_pointer_type
p
)
{
static
size_t
GetLength
(
const_pointer_type
p
)
noexcept
{
return
StringLength
(
p
);
return
StringLength
(
p
);
}
}
gcc_pure
gcc_nonnull_all
gcc_pure
gcc_nonnull_all
static
const_pointer_type
Find
(
const_pointer_type
p
,
value_type
ch
)
{
static
const_pointer_type
Find
(
const_pointer_type
p
,
value_type
ch
)
noexcept
{
return
StringFind
(
p
,
ch
);
return
StringFind
(
p
,
ch
);
}
}
...
@@ -255,7 +255,7 @@ struct PathTraitsUTF8 {
...
@@ -255,7 +255,7 @@ struct PathTraitsUTF8 {
const_pointer_type
b
,
size_t
b_size
)
noexcept
;
const_pointer_type
b
,
size_t
b_size
)
noexcept
;
gcc_pure
gcc_nonnull_all
gcc_pure
gcc_nonnull_all
static
string
Build
(
const_pointer_type
a
,
const_pointer_type
b
)
{
static
string
Build
(
const_pointer_type
a
,
const_pointer_type
b
)
noexcept
{
return
Build
(
a
,
GetLength
(
a
),
b
,
GetLength
(
b
));
return
Build
(
a
,
GetLength
(
a
),
b
,
GetLength
(
b
));
}
}
};
};
...
...
This diff is collapsed.
Click to expand it.
src/fs/io/BufferedReader.cxx
View file @
979f1b6c
...
@@ -67,7 +67,7 @@ BufferedReader::ReadFull(size_t size)
...
@@ -67,7 +67,7 @@ BufferedReader::ReadFull(size_t size)
}
}
size_t
size_t
BufferedReader
::
ReadFromBuffer
(
WritableBuffer
<
void
>
dest
)
BufferedReader
::
ReadFromBuffer
(
WritableBuffer
<
void
>
dest
)
noexcept
{
{
auto
src
=
Read
();
auto
src
=
Read
();
size_t
nbytes
=
std
::
min
(
src
.
size
,
dest
.
size
);
size_t
nbytes
=
std
::
min
(
src
.
size
,
dest
.
size
);
...
...
This diff is collapsed.
Click to expand it.
src/fs/io/BufferedReader.hxx
View file @
979f1b6c
...
@@ -47,7 +47,7 @@ public:
...
@@ -47,7 +47,7 @@ public:
* Reset the internal state. Should be called after rewinding
* Reset the internal state. Should be called after rewinding
* the underlying #Reader.
* the underlying #Reader.
*/
*/
void
Reset
()
{
void
Reset
()
noexcept
{
buffer
.
Clear
();
buffer
.
Clear
();
eof
=
false
;
eof
=
false
;
line_number
=
0
;
line_number
=
0
;
...
@@ -56,7 +56,7 @@ public:
...
@@ -56,7 +56,7 @@ public:
bool
Fill
(
bool
need_more
);
bool
Fill
(
bool
need_more
);
gcc_pure
gcc_pure
WritableBuffer
<
void
>
Read
()
const
{
WritableBuffer
<
void
>
Read
()
const
noexcept
{
return
buffer
.
Read
().
ToVoid
();
return
buffer
.
Read
().
ToVoid
();
}
}
...
@@ -67,7 +67,7 @@ public:
...
@@ -67,7 +67,7 @@ public:
*/
*/
void
*
ReadFull
(
size_t
size
);
void
*
ReadFull
(
size_t
size
);
void
Consume
(
size_t
n
)
{
void
Consume
(
size_t
n
)
noexcept
{
buffer
.
Consume
(
n
);
buffer
.
Consume
(
n
);
}
}
...
@@ -75,7 +75,7 @@ public:
...
@@ -75,7 +75,7 @@ public:
* Read (and consume) data from the input buffer into the
* Read (and consume) data from the input buffer into the
* given buffer. Does not attempt to refill the buffer.
* given buffer. Does not attempt to refill the buffer.
*/
*/
size_t
ReadFromBuffer
(
WritableBuffer
<
void
>
dest
);
size_t
ReadFromBuffer
(
WritableBuffer
<
void
>
dest
)
noexcept
;
/**
/**
* Read data into the given buffer and consume it from our
* Read data into the given buffer and consume it from our
...
@@ -86,7 +86,7 @@ public:
...
@@ -86,7 +86,7 @@ public:
char
*
ReadLine
();
char
*
ReadLine
();
unsigned
GetLineNumber
()
const
{
unsigned
GetLineNumber
()
const
noexcept
{
return
line_number
;
return
line_number
;
}
}
};
};
...
...
This diff is collapsed.
Click to expand it.
src/input/AsyncInputStream.cxx
View file @
979f1b6c
...
@@ -52,14 +52,14 @@ AsyncInputStream::~AsyncInputStream()
...
@@ -52,14 +52,14 @@ AsyncInputStream::~AsyncInputStream()
}
}
void
void
AsyncInputStream
::
SetTag
(
Tag
*
_tag
)
AsyncInputStream
::
SetTag
(
Tag
*
_tag
)
noexcept
{
{
delete
tag
;
delete
tag
;
tag
=
_tag
;
tag
=
_tag
;
}
}
void
void
AsyncInputStream
::
Pause
()
AsyncInputStream
::
Pause
()
noexcept
{
{
assert
(
GetEventLoop
().
IsInside
());
assert
(
GetEventLoop
().
IsInside
());
...
@@ -141,7 +141,7 @@ AsyncInputStream::Seek(offset_type new_offset)
...
@@ -141,7 +141,7 @@ AsyncInputStream::Seek(offset_type new_offset)
}
}
void
void
AsyncInputStream
::
SeekDone
()
AsyncInputStream
::
SeekDone
()
noexcept
{
{
assert
(
GetEventLoop
().
IsInside
());
assert
(
GetEventLoop
().
IsInside
());
assert
(
IsSeekPending
());
assert
(
IsSeekPending
());
...
@@ -201,7 +201,7 @@ AsyncInputStream::Read(void *ptr, size_t read_size)
...
@@ -201,7 +201,7 @@ AsyncInputStream::Read(void *ptr, size_t read_size)
}
}
void
void
AsyncInputStream
::
CommitWriteBuffer
(
size_t
nbytes
)
AsyncInputStream
::
CommitWriteBuffer
(
size_t
nbytes
)
noexcept
{
{
buffer
.
Append
(
nbytes
);
buffer
.
Append
(
nbytes
);
...
@@ -212,7 +212,7 @@ AsyncInputStream::CommitWriteBuffer(size_t nbytes)
...
@@ -212,7 +212,7 @@ AsyncInputStream::CommitWriteBuffer(size_t nbytes)
}
}
void
void
AsyncInputStream
::
AppendToBuffer
(
const
void
*
data
,
size_t
append_size
)
AsyncInputStream
::
AppendToBuffer
(
const
void
*
data
,
size_t
append_size
)
noexcept
{
{
auto
w
=
buffer
.
Write
();
auto
w
=
buffer
.
Write
();
assert
(
!
w
.
IsEmpty
());
assert
(
!
w
.
IsEmpty
());
...
@@ -238,7 +238,7 @@ AsyncInputStream::AppendToBuffer(const void *data, size_t append_size)
...
@@ -238,7 +238,7 @@ AsyncInputStream::AppendToBuffer(const void *data, size_t append_size)
}
}
void
void
AsyncInputStream
::
DeferredResume
()
AsyncInputStream
::
DeferredResume
()
noexcept
{
{
const
std
::
lock_guard
<
Mutex
>
protect
(
mutex
);
const
std
::
lock_guard
<
Mutex
>
protect
(
mutex
);
...
@@ -251,7 +251,7 @@ AsyncInputStream::DeferredResume()
...
@@ -251,7 +251,7 @@ AsyncInputStream::DeferredResume()
}
}
void
void
AsyncInputStream
::
DeferredSeek
()
AsyncInputStream
::
DeferredSeek
()
noexcept
{
{
const
std
::
lock_guard
<
Mutex
>
protect
(
mutex
);
const
std
::
lock_guard
<
Mutex
>
protect
(
mutex
);
if
(
seek_state
!=
SeekState
::
SCHEDULED
)
if
(
seek_state
!=
SeekState
::
SCHEDULED
)
...
...
This diff is collapsed.
Click to expand it.
src/input/AsyncInputStream.hxx
View file @
979f1b6c
...
@@ -96,15 +96,15 @@ protected:
...
@@ -96,15 +96,15 @@ protected:
/**
/**
* Pass an tag from the I/O thread to the client thread.
* Pass an tag from the I/O thread to the client thread.
*/
*/
void
SetTag
(
Tag
*
_tag
);
void
SetTag
(
Tag
*
_tag
)
noexcept
;
void
ClearTag
()
{
void
ClearTag
()
noexcept
{
SetTag
(
nullptr
);
SetTag
(
nullptr
);
}
}
void
Pause
();
void
Pause
()
noexcept
;
bool
IsPaused
()
const
{
bool
IsPaused
()
const
noexcept
{
return
paused
;
return
paused
;
}
}
...
@@ -113,15 +113,15 @@ protected:
...
@@ -113,15 +113,15 @@ protected:
* continue feeding Read() calls from the buffer until it runs
* continue feeding Read() calls from the buffer until it runs
* empty.
* empty.
*/
*/
void
SetClosed
()
{
void
SetClosed
()
noexcept
{
open
=
false
;
open
=
false
;
}
}
bool
IsBufferEmpty
()
const
{
bool
IsBufferEmpty
()
const
noexcept
{
return
buffer
.
IsEmpty
();
return
buffer
.
IsEmpty
();
}
}
bool
IsBufferFull
()
const
{
bool
IsBufferFull
()
const
noexcept
{
return
buffer
.
IsFull
();
return
buffer
.
IsFull
();
}
}
...
@@ -129,21 +129,21 @@ protected:
...
@@ -129,21 +129,21 @@ protected:
* Determine how many bytes can be added to the buffer.
* Determine how many bytes can be added to the buffer.
*/
*/
gcc_pure
gcc_pure
size_t
GetBufferSpace
()
const
{
size_t
GetBufferSpace
()
const
noexcept
{
return
buffer
.
GetSpace
();
return
buffer
.
GetSpace
();
}
}
CircularBuffer
<
uint8_t
>::
Range
PrepareWriteBuffer
()
{
CircularBuffer
<
uint8_t
>::
Range
PrepareWriteBuffer
()
noexcept
{
return
buffer
.
Write
();
return
buffer
.
Write
();
}
}
void
CommitWriteBuffer
(
size_t
nbytes
);
void
CommitWriteBuffer
(
size_t
nbytes
)
noexcept
;
/**
/**
* Append data to the buffer. The size must fit into the
* Append data to the buffer. The size must fit into the
* buffer; see GetBufferSpace().
* buffer; see GetBufferSpace().
*/
*/
void
AppendToBuffer
(
const
void
*
data
,
size_t
append_size
);
void
AppendToBuffer
(
const
void
*
data
,
size_t
append_size
)
noexcept
;
/**
/**
* Implement code here that will resume the stream after it
* Implement code here that will resume the stream after it
...
@@ -158,7 +158,7 @@ protected:
...
@@ -158,7 +158,7 @@ protected:
*/
*/
virtual
void
DoSeek
(
offset_type
new_offset
)
=
0
;
virtual
void
DoSeek
(
offset_type
new_offset
)
=
0
;
bool
IsSeekPending
()
const
{
bool
IsSeekPending
()
const
noexcept
{
return
seek_state
==
SeekState
::
PENDING
;
return
seek_state
==
SeekState
::
PENDING
;
}
}
...
@@ -166,14 +166,14 @@ protected:
...
@@ -166,14 +166,14 @@ protected:
* Call this after seeking has finished. It will notify the
* Call this after seeking has finished. It will notify the
* client thread.
* client thread.
*/
*/
void
SeekDone
();
void
SeekDone
()
noexcept
;
private
:
private
:
void
Resume
();
void
Resume
();
/* for DeferredCall */
/* for DeferredCall */
void
DeferredResume
();
void
DeferredResume
()
noexcept
;
void
DeferredSeek
();
void
DeferredSeek
()
noexcept
;
};
};
#endif
#endif
This diff is collapsed.
Click to expand it.
src/input/InputStream.hxx
View file @
979f1b6c
...
@@ -184,20 +184,20 @@ public:
...
@@ -184,20 +184,20 @@ public:
void
LockWaitReady
();
void
LockWaitReady
();
gcc_pure
gcc_pure
bool
HasMimeType
()
const
{
bool
HasMimeType
()
const
noexcept
{
assert
(
ready
);
assert
(
ready
);
return
!
mime
.
empty
();
return
!
mime
.
empty
();
}
}
gcc_pure
gcc_pure
const
char
*
GetMimeType
()
const
{
const
char
*
GetMimeType
()
const
noexcept
{
assert
(
ready
);
assert
(
ready
);
return
mime
.
empty
()
?
nullptr
:
mime
.
c_str
();
return
mime
.
empty
()
?
nullptr
:
mime
.
c_str
();
}
}
void
ClearMimeType
()
{
void
ClearMimeType
()
noexcept
{
mime
.
clear
();
mime
.
clear
();
}
}
...
@@ -215,35 +215,35 @@ public:
...
@@ -215,35 +215,35 @@ public:
}
}
gcc_pure
gcc_pure
bool
KnownSize
()
const
{
bool
KnownSize
()
const
noexcept
{
assert
(
ready
);
assert
(
ready
);
return
size
!=
UNKNOWN_SIZE
;
return
size
!=
UNKNOWN_SIZE
;
}
}
gcc_pure
gcc_pure
offset_type
GetSize
()
const
{
offset_type
GetSize
()
const
noexcept
{
assert
(
ready
);
assert
(
ready
);
assert
(
KnownSize
());
assert
(
KnownSize
());
return
size
;
return
size
;
}
}
void
AddOffset
(
offset_type
delta
)
{
void
AddOffset
(
offset_type
delta
)
noexcept
{
assert
(
ready
);
assert
(
ready
);
offset
+=
delta
;
offset
+=
delta
;
}
}
gcc_pure
gcc_pure
offset_type
GetOffset
()
const
{
offset_type
GetOffset
()
const
noexcept
{
assert
(
ready
);
assert
(
ready
);
return
offset
;
return
offset
;
}
}
gcc_pure
gcc_pure
offset_type
GetRest
()
const
{
offset_type
GetRest
()
const
noexcept
{
assert
(
ready
);
assert
(
ready
);
assert
(
KnownSize
());
assert
(
KnownSize
());
...
@@ -251,7 +251,7 @@ public:
...
@@ -251,7 +251,7 @@ public:
}
}
gcc_pure
gcc_pure
bool
IsSeekable
()
const
{
bool
IsSeekable
()
const
noexcept
{
assert
(
ready
);
assert
(
ready
);
return
seekable
;
return
seekable
;
...
...
This diff is collapsed.
Click to expand it.
src/lib/curl/Global.cxx
View file @
979f1b6c
...
@@ -63,7 +63,7 @@ public:
...
@@ -63,7 +63,7 @@ public:
*/
*/
static
int
SocketFunction
(
CURL
*
easy
,
static
int
SocketFunction
(
CURL
*
easy
,
curl_socket_t
s
,
int
action
,
curl_socket_t
s
,
int
action
,
void
*
userp
,
void
*
socketp
);
void
*
userp
,
void
*
socketp
)
noexcept
;
virtual
bool
OnSocketReady
(
unsigned
flags
)
override
;
virtual
bool
OnSocketReady
(
unsigned
flags
)
override
;
...
@@ -75,7 +75,7 @@ private:
...
@@ -75,7 +75,7 @@ private:
}
}
gcc_const
gcc_const
static
unsigned
CurlPollToFlags
(
int
action
)
{
static
unsigned
CurlPollToFlags
(
int
action
)
noexcept
{
switch
(
action
)
{
switch
(
action
)
{
case
CURL_POLL_NONE
:
case
CURL_POLL_NONE
:
return
0
;
return
0
;
...
@@ -108,7 +108,7 @@ CurlGlobal::CurlGlobal(EventLoop &_loop)
...
@@ -108,7 +108,7 @@ CurlGlobal::CurlGlobal(EventLoop &_loop)
int
int
CurlSocket
::
SocketFunction
(
gcc_unused
CURL
*
easy
,
CurlSocket
::
SocketFunction
(
gcc_unused
CURL
*
easy
,
curl_socket_t
s
,
int
action
,
curl_socket_t
s
,
int
action
,
void
*
userp
,
void
*
socketp
)
{
void
*
userp
,
void
*
socketp
)
noexcept
{
auto
&
global
=
*
(
CurlGlobal
*
)
userp
;
auto
&
global
=
*
(
CurlGlobal
*
)
userp
;
CurlSocket
*
cs
=
(
CurlSocket
*
)
socketp
;
CurlSocket
*
cs
=
(
CurlSocket
*
)
socketp
;
...
...
This diff is collapsed.
Click to expand it.
src/lib/nfs/Connection.hxx
View file @
979f1b6c
...
@@ -147,16 +147,16 @@ public:
...
@@ -147,16 +147,16 @@ public:
~
NfsConnection
();
~
NfsConnection
();
gcc_pure
gcc_pure
const
char
*
GetServer
()
const
{
const
char
*
GetServer
()
const
noexcept
{
return
server
.
c_str
();
return
server
.
c_str
();
}
}
gcc_pure
gcc_pure
const
char
*
GetExportName
()
const
{
const
char
*
GetExportName
()
const
noexcept
{
return
export_name
.
c_str
();
return
export_name
.
c_str
();
}
}
EventLoop
&
GetEventLoop
()
{
EventLoop
&
GetEventLoop
()
noexcept
{
return
SocketMonitor
::
GetEventLoop
();
return
SocketMonitor
::
GetEventLoop
();
}
}
...
...
This diff is collapsed.
Click to expand it.
src/lib/upnp/ContentDirectoryService.hxx
View file @
979f1b6c
...
@@ -114,12 +114,12 @@ public:
...
@@ -114,12 +114,12 @@ public:
std
::
list
<
std
::
string
>
getSearchCapabilities
(
UpnpClient_Handle
handle
)
const
;
std
::
list
<
std
::
string
>
getSearchCapabilities
(
UpnpClient_Handle
handle
)
const
;
gcc_pure
gcc_pure
std
::
string
GetURI
()
const
{
std
::
string
GetURI
()
const
noexcept
{
return
"upnp://"
+
m_deviceId
+
"/"
+
m_serviceType
;
return
"upnp://"
+
m_deviceId
+
"/"
+
m_serviceType
;
}
}
/** Retrieve the "friendly name" for this server, useful for display. */
/** Retrieve the "friendly name" for this server, useful for display. */
const
char
*
getFriendlyName
()
const
{
const
char
*
getFriendlyName
()
const
noexcept
{
return
m_friendlyName
.
c_str
();
return
m_friendlyName
.
c_str
();
}
}
};
};
...
...
This diff is collapsed.
Click to expand it.
src/mixer/MixerInternal.hxx
View file @
979f1b6c
...
@@ -84,7 +84,6 @@ public:
...
@@ -84,7 +84,6 @@ public:
* @return the current volume (0..100 including) or -1 if
* @return the current volume (0..100 including) or -1 if
* unavailable
* unavailable
*/
*/
gcc_pure
virtual
int
GetVolume
()
=
0
;
virtual
int
GetVolume
()
=
0
;
/**
/**
...
...
This diff is collapsed.
Click to expand it.
src/neighbor/plugins/SmbclientNeighborPlugin.cxx
View file @
979f1b6c
...
@@ -48,12 +48,12 @@ class SmbclientNeighborExplorer final : public NeighborExplorer {
...
@@ -48,12 +48,12 @@ class SmbclientNeighborExplorer final : public NeighborExplorer {
Server
(
const
Server
&
)
=
delete
;
Server
(
const
Server
&
)
=
delete
;
gcc_pure
gcc_pure
bool
operator
==
(
const
Server
&
other
)
const
{
bool
operator
==
(
const
Server
&
other
)
const
noexcept
{
return
name
==
other
.
name
;
return
name
==
other
.
name
;
}
}
gcc_pure
gcc_pure
NeighborInfo
Export
()
const
{
NeighborInfo
Export
()
const
noexcept
{
return
{
"smb://"
+
name
+
"/"
,
comment
};
return
{
"smb://"
+
name
+
"/"
,
comment
};
}
}
};
};
...
...
This diff is collapsed.
Click to expand it.
src/neighbor/plugins/UpnpNeighborPlugin.cxx
View file @
979f1b6c
...
@@ -43,12 +43,12 @@ class UpnpNeighborExplorer final
...
@@ -43,12 +43,12 @@ class UpnpNeighborExplorer final
Server
(
const
Server
&
)
=
delete
;
Server
(
const
Server
&
)
=
delete
;
gcc_pure
gcc_pure
bool
operator
==
(
const
Server
&
other
)
const
{
bool
operator
==
(
const
Server
&
other
)
const
noexcept
{
return
name
==
other
.
name
;
return
name
==
other
.
name
;
}
}
gcc_pure
gcc_pure
NeighborInfo
Export
()
const
{
NeighborInfo
Export
()
const
noexcept
{
return
{
"smb://"
+
name
+
"/"
,
comment
};
return
{
"smb://"
+
name
+
"/"
,
comment
};
}
}
};
};
...
...
This diff is collapsed.
Click to expand it.
src/net/StaticSocketAddress.hxx
View file @
979f1b6c
...
@@ -51,43 +51,43 @@ public:
...
@@ -51,43 +51,43 @@ public:
StaticSocketAddress
&
operator
=
(
SocketAddress
other
)
noexcept
;
StaticSocketAddress
&
operator
=
(
SocketAddress
other
)
noexcept
;
operator
SocketAddress
()
const
{
operator
SocketAddress
()
const
noexcept
{
return
SocketAddress
(
reinterpret_cast
<
const
struct
sockaddr
*>
(
&
address
),
return
SocketAddress
(
reinterpret_cast
<
const
struct
sockaddr
*>
(
&
address
),
size
);
size
);
}
}
struct
sockaddr
*
GetAddress
()
{
struct
sockaddr
*
GetAddress
()
noexcept
{
return
reinterpret_cast
<
struct
sockaddr
*>
(
&
address
);
return
reinterpret_cast
<
struct
sockaddr
*>
(
&
address
);
}
}
const
struct
sockaddr
*
GetAddress
()
const
{
const
struct
sockaddr
*
GetAddress
()
const
noexcept
{
return
reinterpret_cast
<
const
struct
sockaddr
*>
(
&
address
);
return
reinterpret_cast
<
const
struct
sockaddr
*>
(
&
address
);
}
}
constexpr
size_type
GetCapacity
()
const
{
constexpr
size_type
GetCapacity
()
const
noexcept
{
return
sizeof
(
address
);
return
sizeof
(
address
);
}
}
size_type
GetSize
()
const
{
size_type
GetSize
()
const
noexcept
{
return
size
;
return
size
;
}
}
void
SetSize
(
size_type
_size
)
{
void
SetSize
(
size_type
_size
)
noexcept
{
assert
(
_size
>
0
);
assert
(
_size
>
0
);
assert
(
size_t
(
_size
)
<=
sizeof
(
address
));
assert
(
size_t
(
_size
)
<=
sizeof
(
address
));
size
=
_size
;
size
=
_size
;
}
}
int
GetFamily
()
const
{
int
GetFamily
()
const
noexcept
{
return
address
.
ss_family
;
return
address
.
ss_family
;
}
}
bool
IsDefined
()
const
{
bool
IsDefined
()
const
noexcept
{
return
GetFamily
()
!=
AF_UNSPEC
;
return
GetFamily
()
!=
AF_UNSPEC
;
}
}
void
Clear
()
{
void
Clear
()
noexcept
{
address
.
ss_family
=
AF_UNSPEC
;
address
.
ss_family
=
AF_UNSPEC
;
}
}
...
@@ -108,11 +108,11 @@ public:
...
@@ -108,11 +108,11 @@ public:
#endif
#endif
gcc_pure
gcc_pure
bool
operator
==
(
SocketAddress
other
)
const
{
bool
operator
==
(
SocketAddress
other
)
const
noexcept
{
return
(
SocketAddress
)
*
this
==
other
;
return
(
SocketAddress
)
*
this
==
other
;
}
}
bool
operator
!=
(
SocketAddress
&
other
)
const
{
bool
operator
!=
(
SocketAddress
&
other
)
const
noexcept
{
return
!
(
*
this
==
other
);
return
!
(
*
this
==
other
);
}
}
};
};
...
...
This diff is collapsed.
Click to expand it.
src/output/MultipleOutputs.hxx
View file @
979f1b6c
...
@@ -90,7 +90,7 @@ public:
...
@@ -90,7 +90,7 @@ public:
* those which are disabled right now.
* those which are disabled right now.
*/
*/
gcc_pure
gcc_pure
unsigned
Size
()
const
{
unsigned
Size
()
const
noexcept
{
return
outputs
.
size
();
return
outputs
.
size
();
}
}
...
@@ -191,7 +191,7 @@ public:
...
@@ -191,7 +191,7 @@ public:
* finished yet.
* finished yet.
*/
*/
gcc_pure
gcc_pure
SignedSongTime
GetElapsedTime
()
const
{
SignedSongTime
GetElapsedTime
()
const
noexcept
{
return
elapsed_time
;
return
elapsed_time
;
}
}
...
...
This diff is collapsed.
Click to expand it.
src/output/plugins/AlsaOutputPlugin.cxx
View file @
979f1b6c
...
@@ -285,7 +285,7 @@ public:
...
@@ -285,7 +285,7 @@ public:
}
}
gcc_pure
gcc_pure
const
char
*
GetDevice
()
{
const
char
*
GetDevice
()
const
noexcept
{
return
device
.
empty
()
?
default_device
:
device
.
c_str
();
return
device
.
empty
()
?
default_device
:
device
.
c_str
();
}
}
...
...
This diff is collapsed.
Click to expand it.
src/output/plugins/OpenALOutputPlugin.cxx
View file @
979f1b6c
...
@@ -74,19 +74,19 @@ class OpenALOutput {
...
@@ -74,19 +74,19 @@ class OpenALOutput {
private
:
private
:
gcc_pure
gcc_pure
ALint
GetSourceI
(
ALenum
param
)
const
{
ALint
GetSourceI
(
ALenum
param
)
const
noexcept
{
ALint
value
;
ALint
value
;
alGetSourcei
(
source
,
param
,
&
value
);
alGetSourcei
(
source
,
param
,
&
value
);
return
value
;
return
value
;
}
}
gcc_pure
gcc_pure
bool
HasProcessed
()
const
{
bool
HasProcessed
()
const
noexcept
{
return
GetSourceI
(
AL_BUFFERS_PROCESSED
)
>
0
;
return
GetSourceI
(
AL_BUFFERS_PROCESSED
)
>
0
;
}
}
gcc_pure
gcc_pure
bool
IsPlaying
()
const
{
bool
IsPlaying
()
const
noexcept
{
return
GetSourceI
(
AL_SOURCE_STATE
)
==
AL_PLAYING
;
return
GetSourceI
(
AL_SOURCE_STATE
)
==
AL_PLAYING
;
}
}
...
...
This diff is collapsed.
Click to expand it.
src/output/plugins/RecorderOutputPlugin.cxx
View file @
979f1b6c
...
@@ -98,7 +98,7 @@ class RecorderOutput {
...
@@ -98,7 +98,7 @@ class RecorderOutput {
private
:
private
:
gcc_pure
gcc_pure
bool
HasDynamicPath
()
const
{
bool
HasDynamicPath
()
const
noexcept
{
return
!
format_path
.
empty
();
return
!
format_path
.
empty
();
}
}
...
...
This diff is collapsed.
Click to expand it.
src/output/plugins/httpd/HttpdInternal.hxx
View file @
979f1b6c
...
@@ -200,7 +200,7 @@ public:
...
@@ -200,7 +200,7 @@ public:
* Caller must lock the mutex.
* Caller must lock the mutex.
*/
*/
gcc_pure
gcc_pure
bool
HasClients
()
const
{
bool
HasClients
()
const
noexcept
{
return
!
clients
.
empty
();
return
!
clients
.
empty
();
}
}
...
@@ -208,7 +208,7 @@ public:
...
@@ -208,7 +208,7 @@ public:
* Check whether there is at least one client.
* Check whether there is at least one client.
*/
*/
gcc_pure
gcc_pure
bool
LockHasClients
()
const
{
bool
LockHasClients
()
const
noexcept
{
const
std
::
lock_guard
<
Mutex
>
protect
(
mutex
);
const
std
::
lock_guard
<
Mutex
>
protect
(
mutex
);
return
HasClients
();
return
HasClients
();
}
}
...
...
This diff is collapsed.
Click to expand it.
src/pcm/Resampler.hxx
View file @
979f1b6c
...
@@ -63,11 +63,12 @@ public:
...
@@ -63,11 +63,12 @@ public:
/**
/**
* Resamples a block of PCM data.
* Resamples a block of PCM data.
*
*
* Throws std::runtime_error on error.
*
* @param src the input buffer
* @param src the input buffer
* @return the destination buffer (will be invalidated by
* @return the destination buffer (will be invalidated by
* filter_close() or filter_filter())
* filter_close() or filter_filter())
*/
*/
gcc_pure
virtual
ConstBuffer
<
void
>
Resample
(
ConstBuffer
<
void
>
src
)
=
0
;
virtual
ConstBuffer
<
void
>
Resample
(
ConstBuffer
<
void
>
src
)
=
0
;
};
};
...
...
This diff is collapsed.
Click to expand it.
src/player/Thread.cxx
View file @
979f1b6c
...
@@ -247,7 +247,7 @@ private:
...
@@ -247,7 +247,7 @@ private:
* finished.
* finished.
*/
*/
gcc_pure
gcc_pure
bool
IsDecoderAtCurrentSong
()
const
{
bool
IsDecoderAtCurrentSong
()
const
noexcept
{
assert
(
pipe
!=
nullptr
);
assert
(
pipe
!=
nullptr
);
return
dc
.
pipe
==
pipe
;
return
dc
.
pipe
==
pipe
;
...
@@ -259,7 +259,7 @@ private:
...
@@ -259,7 +259,7 @@ private:
* switched to that song yet.
* switched to that song yet.
*/
*/
gcc_pure
gcc_pure
bool
IsDecoderAtNextSong
()
const
{
bool
IsDecoderAtNextSong
()
const
noexcept
{
return
dc
.
pipe
!=
nullptr
&&
!
IsDecoderAtCurrentSong
();
return
dc
.
pipe
!=
nullptr
&&
!
IsDecoderAtCurrentSong
();
}
}
...
...
This diff is collapsed.
Click to expand it.
src/queue/Queue.hxx
View file @
979f1b6c
...
@@ -162,14 +162,14 @@ struct Queue {
...
@@ -162,14 +162,14 @@ struct Queue {
}
}
gcc_pure
gcc_pure
unsigned
OrderToPosition
(
unsigned
_order
)
const
{
unsigned
OrderToPosition
(
unsigned
_order
)
const
noexcept
{
assert
(
_order
<
length
);
assert
(
_order
<
length
);
return
order
[
_order
];
return
order
[
_order
];
}
}
gcc_pure
gcc_pure
unsigned
PositionToOrder
(
unsigned
position
)
const
{
unsigned
PositionToOrder
(
unsigned
position
)
const
noexcept
{
assert
(
position
<
length
);
assert
(
position
<
length
);
for
(
unsigned
i
=
0
;;
++
i
)
{
for
(
unsigned
i
=
0
;;
++
i
)
{
...
@@ -181,7 +181,7 @@ struct Queue {
...
@@ -181,7 +181,7 @@ struct Queue {
}
}
gcc_pure
gcc_pure
uint8_t
GetPriorityAtPosition
(
unsigned
position
)
const
{
uint8_t
GetPriorityAtPosition
(
unsigned
position
)
const
noexcept
{
assert
(
position
<
length
);
assert
(
position
<
length
);
return
items
[
position
].
priority
;
return
items
[
position
].
priority
;
...
...
This diff is collapsed.
Click to expand it.
src/storage/CompositeStorage.cxx
View file @
979f1b6c
...
@@ -139,7 +139,7 @@ CompositeStorage::Directory::Make(const char *uri)
...
@@ -139,7 +139,7 @@ CompositeStorage::Directory::Make(const char *uri)
}
}
bool
bool
CompositeStorage
::
Directory
::
Unmount
()
CompositeStorage
::
Directory
::
Unmount
()
noexcept
{
{
if
(
storage
==
nullptr
)
if
(
storage
==
nullptr
)
return
false
;
return
false
;
...
@@ -150,7 +150,7 @@ CompositeStorage::Directory::Unmount()
...
@@ -150,7 +150,7 @@ CompositeStorage::Directory::Unmount()
}
}
bool
bool
CompositeStorage
::
Directory
::
Unmount
(
const
char
*
uri
)
CompositeStorage
::
Directory
::
Unmount
(
const
char
*
uri
)
noexcept
{
{
if
(
StringIsEmpty
(
uri
))
if
(
StringIsEmpty
(
uri
))
return
Unmount
();
return
Unmount
();
...
...
This diff is collapsed.
Click to expand it.
src/storage/CompositeStorage.hxx
View file @
979f1b6c
...
@@ -55,7 +55,7 @@ class CompositeStorage final : public Storage {
...
@@ -55,7 +55,7 @@ class CompositeStorage final : public Storage {
~
Directory
();
~
Directory
();
gcc_pure
gcc_pure
bool
IsEmpty
()
const
{
bool
IsEmpty
()
const
noexcept
{
return
storage
==
nullptr
&&
children
.
empty
();
return
storage
==
nullptr
&&
children
.
empty
();
}
}
...
@@ -64,8 +64,8 @@ class CompositeStorage final : public Storage {
...
@@ -64,8 +64,8 @@ class CompositeStorage final : public Storage {
Directory
&
Make
(
const
char
*
uri
);
Directory
&
Make
(
const
char
*
uri
);
bool
Unmount
();
bool
Unmount
()
noexcept
;
bool
Unmount
(
const
char
*
uri
);
bool
Unmount
(
const
char
*
uri
)
noexcept
;
gcc_pure
gcc_pure
bool
MapToRelativeUTF8
(
std
::
string
&
buffer
,
bool
MapToRelativeUTF8
(
std
::
string
&
buffer
,
...
...
This diff is collapsed.
Click to expand it.
src/storage/StorageInterface.hxx
View file @
979f1b6c
...
@@ -39,7 +39,6 @@ public:
...
@@ -39,7 +39,6 @@ public:
/**
/**
* Throws #std::runtime_error on error.
* Throws #std::runtime_error on error.
*/
*/
gcc_pure
virtual
StorageFileInfo
GetInfo
(
bool
follow
)
=
0
;
virtual
StorageFileInfo
GetInfo
(
bool
follow
)
=
0
;
};
};
...
@@ -52,7 +51,6 @@ public:
...
@@ -52,7 +51,6 @@ public:
/**
/**
* Throws #std::runtime_error on error.
* Throws #std::runtime_error on error.
*/
*/
gcc_pure
virtual
StorageFileInfo
GetInfo
(
const
char
*
uri_utf8
,
bool
follow
)
=
0
;
virtual
StorageFileInfo
GetInfo
(
const
char
*
uri_utf8
,
bool
follow
)
=
0
;
/**
/**
...
...
This diff is collapsed.
Click to expand it.
src/storage/plugins/CurlStorage.cxx
View file @
979f1b6c
...
@@ -471,7 +471,7 @@ private:
...
@@ -471,7 +471,7 @@ private:
* to the base file name.
* to the base file name.
*/
*/
gcc_pure
gcc_pure
StringView
HrefToEscapedName
(
const
char
*
href
)
const
{
StringView
HrefToEscapedName
(
const
char
*
href
)
const
noexcept
{
const
char
*
path
=
uri_get_path
(
href
);
const
char
*
path
=
uri_get_path
(
href
);
if
(
path
==
nullptr
)
if
(
path
==
nullptr
)
return
nullptr
;
return
nullptr
;
...
...
This diff is collapsed.
Click to expand it.
src/system/ByteOrder.hxx
View file @
979f1b6c
...
@@ -52,6 +52,15 @@
...
@@ -52,6 +52,15 @@
# define IS_LITTLE_ENDIAN false
# define IS_LITTLE_ENDIAN false
# define IS_BIG_ENDIAN true
# define IS_BIG_ENDIAN true
# endif
# endif
#elif defined(__BYTE_ORDER__)
/* GCC-specific macros */
# if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
# define IS_LITTLE_ENDIAN true
# define IS_BIG_ENDIAN false
# else
# define IS_LITTLE_ENDIAN false
# define IS_BIG_ENDIAN true
# endif
#else
#else
/* generic compile-time check */
/* generic compile-time check */
# include <endian.h>
# include <endian.h>
...
...
This diff is collapsed.
Click to expand it.
src/tag/Builder.hxx
View file @
979f1b6c
...
@@ -82,7 +82,7 @@ public:
...
@@ -82,7 +82,7 @@ public:
* Returns true if the object contains any information.
* Returns true if the object contains any information.
*/
*/
gcc_pure
gcc_pure
bool
IsDefined
()
const
{
bool
IsDefined
()
const
noexcept
{
return
!
duration
.
IsNegative
()
||
has_playlist
||
!
IsEmpty
();
return
!
duration
.
IsNegative
()
||
has_playlist
||
!
IsEmpty
();
}
}
...
...
This diff is collapsed.
Click to expand it.
src/tag/MixRamp.cxx
View file @
979f1b6c
...
@@ -53,7 +53,7 @@ ParseMixRampTag(MixRampInfo &info, const char *name, const char *value)
...
@@ -53,7 +53,7 @@ ParseMixRampTag(MixRampInfo &info, const char *name, const char *value)
const
char
*
value
;
const
char
*
value
;
gcc_pure
gcc_pure
const
char
*
operator
[](
const
char
*
n
)
const
{
const
char
*
operator
[](
const
char
*
n
)
const
noexcept
{
return
StringEqualsCaseASCII
(
name
,
n
)
return
StringEqualsCaseASCII
(
name
,
n
)
?
value
?
value
:
nullptr
;
:
nullptr
;
...
@@ -70,7 +70,7 @@ ParseMixRampVorbis(MixRampInfo &info, const char *entry)
...
@@ -70,7 +70,7 @@ ParseMixRampVorbis(MixRampInfo &info, const char *entry)
const
char
*
entry
;
const
char
*
entry
;
gcc_pure
gcc_pure
const
char
*
operator
[](
const
char
*
n
)
const
{
const
char
*
operator
[](
const
char
*
n
)
const
noexcept
{
return
vorbis_comment_value
(
entry
,
n
);
return
vorbis_comment_value
(
entry
,
n
);
}
}
};
};
...
...
This diff is collapsed.
Click to expand it.
src/tag/ReplayGain.cxx
View file @
979f1b6c
...
@@ -60,7 +60,7 @@ ParseReplayGainTag(ReplayGainInfo &info, const char *name, const char *value)
...
@@ -60,7 +60,7 @@ ParseReplayGainTag(ReplayGainInfo &info, const char *name, const char *value)
const
char
*
value
;
const
char
*
value
;
gcc_pure
gcc_pure
const
char
*
operator
[](
const
char
*
n
)
const
{
const
char
*
operator
[](
const
char
*
n
)
const
noexcept
{
return
StringEqualsCaseASCII
(
name
,
n
)
return
StringEqualsCaseASCII
(
name
,
n
)
?
value
?
value
:
nullptr
;
:
nullptr
;
...
@@ -77,7 +77,7 @@ ParseReplayGainVorbis(ReplayGainInfo &info, const char *entry)
...
@@ -77,7 +77,7 @@ ParseReplayGainVorbis(ReplayGainInfo &info, const char *entry)
const
char
*
entry
;
const
char
*
entry
;
gcc_pure
gcc_pure
const
char
*
operator
[](
const
char
*
n
)
const
{
const
char
*
operator
[](
const
char
*
n
)
const
noexcept
{
return
vorbis_comment_value
(
entry
,
n
);
return
vorbis_comment_value
(
entry
,
n
);
}
}
};
};
...
...
This diff is collapsed.
Click to expand it.
src/tag/Set.cxx
View file @
979f1b6c
...
@@ -68,7 +68,7 @@ CopyTagMask(TagBuilder &dest, const Tag &src, TagMask mask)
...
@@ -68,7 +68,7 @@ CopyTagMask(TagBuilder &dest, const Tag &src, TagMask mask)
void
void
TagSet
::
InsertUnique
(
const
Tag
&
src
,
TagType
type
,
const
char
*
value
,
TagSet
::
InsertUnique
(
const
Tag
&
src
,
TagType
type
,
const
char
*
value
,
TagMask
group_mask
)
TagMask
group_mask
)
noexcept
{
{
TagBuilder
builder
;
TagBuilder
builder
;
if
(
value
==
nullptr
)
if
(
value
==
nullptr
)
...
@@ -82,7 +82,7 @@ TagSet::InsertUnique(const Tag &src, TagType type, const char *value,
...
@@ -82,7 +82,7 @@ TagSet::InsertUnique(const Tag &src, TagType type, const char *value,
bool
bool
TagSet
::
CheckUnique
(
TagType
dest_type
,
TagSet
::
CheckUnique
(
TagType
dest_type
,
const
Tag
&
tag
,
TagType
src_type
,
const
Tag
&
tag
,
TagType
src_type
,
TagMask
group_mask
)
TagMask
group_mask
)
noexcept
{
{
bool
found
=
false
;
bool
found
=
false
;
...
@@ -98,7 +98,7 @@ TagSet::CheckUnique(TagType dest_type,
...
@@ -98,7 +98,7 @@ TagSet::CheckUnique(TagType dest_type,
void
void
TagSet
::
InsertUnique
(
const
Tag
&
tag
,
TagSet
::
InsertUnique
(
const
Tag
&
tag
,
TagType
type
,
TagMask
group_mask
)
TagType
type
,
TagMask
group_mask
)
noexcept
{
{
static_assert
(
sizeof
(
group_mask
)
*
8
>=
TAG_NUM_OF_ITEM_TYPES
,
static_assert
(
sizeof
(
group_mask
)
*
8
>=
TAG_NUM_OF_ITEM_TYPES
,
"Mask is too small"
);
"Mask is too small"
);
...
...
This diff is collapsed.
Click to expand it.
src/tag/Set.hxx
View file @
979f1b6c
...
@@ -34,7 +34,7 @@ class TagMask;
...
@@ -34,7 +34,7 @@ class TagMask;
*/
*/
struct
TagLess
{
struct
TagLess
{
gcc_pure
gcc_pure
bool
operator
()(
const
Tag
&
a
,
const
Tag
&
b
)
const
{
bool
operator
()(
const
Tag
&
a
,
const
Tag
&
b
)
const
noexcept
{
if
(
a
.
num_items
!=
b
.
num_items
)
if
(
a
.
num_items
!=
b
.
num_items
)
return
a
.
num_items
<
b
.
num_items
;
return
a
.
num_items
<
b
.
num_items
;
...
@@ -60,15 +60,15 @@ struct TagLess {
...
@@ -60,15 +60,15 @@ struct TagLess {
class
TagSet
:
public
std
::
set
<
Tag
,
TagLess
>
{
class
TagSet
:
public
std
::
set
<
Tag
,
TagLess
>
{
public
:
public
:
void
InsertUnique
(
const
Tag
&
tag
,
void
InsertUnique
(
const
Tag
&
tag
,
TagType
type
,
TagMask
group_mask
);
TagType
type
,
TagMask
group_mask
)
noexcept
;
private
:
private
:
void
InsertUnique
(
const
Tag
&
src
,
TagType
type
,
const
char
*
value
,
void
InsertUnique
(
const
Tag
&
src
,
TagType
type
,
const
char
*
value
,
TagMask
group_mask
);
TagMask
group_mask
)
noexcept
;
bool
CheckUnique
(
TagType
dest_type
,
bool
CheckUnique
(
TagType
dest_type
,
const
Tag
&
tag
,
TagType
src_type
,
const
Tag
&
tag
,
TagType
src_type
,
TagMask
group_mask
);
TagMask
group_mask
)
noexcept
;
};
};
#endif
#endif
This diff is collapsed.
Click to expand it.
src/thread/Id.hxx
View file @
979f1b6c
...
@@ -53,7 +53,7 @@ public:
...
@@ -53,7 +53,7 @@ public:
#endif
#endif
gcc_const
gcc_const
static
ThreadId
Null
()
{
static
ThreadId
Null
()
noexcept
{
#ifdef WIN32
#ifdef WIN32
return
0
;
return
0
;
#else
#else
...
@@ -63,7 +63,7 @@ public:
...
@@ -63,7 +63,7 @@ public:
}
}
gcc_pure
gcc_pure
bool
IsNull
()
const
{
bool
IsNull
()
const
noexcept
{
return
*
this
==
Null
();
return
*
this
==
Null
();
}
}
...
@@ -80,7 +80,7 @@ public:
...
@@ -80,7 +80,7 @@ public:
}
}
gcc_pure
gcc_pure
bool
operator
==
(
const
ThreadId
&
other
)
const
{
bool
operator
==
(
const
ThreadId
&
other
)
const
noexcept
{
#ifdef WIN32
#ifdef WIN32
return
id
==
other
.
id
;
return
id
==
other
.
id
;
#else
#else
...
...
This diff is collapsed.
Click to expand it.
src/thread/Thread.hxx
View file @
979f1b6c
...
@@ -78,7 +78,7 @@ public:
...
@@ -78,7 +78,7 @@ public:
* Check if this thread is the current thread.
* Check if this thread is the current thread.
*/
*/
gcc_pure
gcc_pure
bool
IsInside
()
const
{
bool
IsInside
()
const
noexcept
{
#ifdef WIN32
#ifdef WIN32
return
GetCurrentThreadId
()
==
id
;
return
GetCurrentThreadId
()
==
id
;
#else
#else
...
...
This diff is collapsed.
Click to expand it.
src/util/ConstBuffer.hxx
View file @
979f1b6c
...
@@ -140,7 +140,7 @@ struct ConstBuffer {
...
@@ -140,7 +140,7 @@ struct ConstBuffer {
template
<
typename
U
>
template
<
typename
U
>
gcc_pure
gcc_pure
bool
Contains
(
U
&&
u
)
const
{
bool
Contains
(
U
&&
u
)
const
noexcept
{
for
(
const
auto
&
i
:
*
this
)
for
(
const
auto
&
i
:
*
this
)
if
(
u
==
i
)
if
(
u
==
i
)
return
true
;
return
true
;
...
...
This diff is collapsed.
Click to expand it.
test/FakeDecoderAPI.cxx
View file @
979f1b6c
...
@@ -45,7 +45,7 @@ FakeDecoder::Ready(const AudioFormat audio_format,
...
@@ -45,7 +45,7 @@ FakeDecoder::Ready(const AudioFormat audio_format,
}
}
DecoderCommand
DecoderCommand
FakeDecoder
::
GetCommand
()
FakeDecoder
::
GetCommand
()
noexcept
{
{
return
DecoderCommand
::
NONE
;
return
DecoderCommand
::
NONE
;
}
}
...
@@ -56,13 +56,13 @@ FakeDecoder::CommandFinished()
...
@@ -56,13 +56,13 @@ FakeDecoder::CommandFinished()
}
}
SongTime
SongTime
FakeDecoder
::
GetSeekTime
()
FakeDecoder
::
GetSeekTime
()
noexcept
{
{
return
SongTime
();
return
SongTime
();
}
}
uint64_t
uint64_t
FakeDecoder
::
GetSeekFrame
()
FakeDecoder
::
GetSeekFrame
()
noexcept
{
{
return
1
;
return
1
;
}
}
...
...
This diff is collapsed.
Click to expand it.
test/FakeDecoderAPI.hxx
View file @
979f1b6c
...
@@ -34,10 +34,10 @@ struct FakeDecoder final : DecoderClient {
...
@@ -34,10 +34,10 @@ struct FakeDecoder final : DecoderClient {
/* virtual methods from DecoderClient */
/* virtual methods from DecoderClient */
void
Ready
(
AudioFormat
audio_format
,
void
Ready
(
AudioFormat
audio_format
,
bool
seekable
,
SignedSongTime
duration
)
override
;
bool
seekable
,
SignedSongTime
duration
)
override
;
DecoderCommand
GetCommand
()
override
;
DecoderCommand
GetCommand
()
noexcept
override
;
void
CommandFinished
()
override
;
void
CommandFinished
()
override
;
SongTime
GetSeekTime
()
override
;
SongTime
GetSeekTime
()
noexcept
override
;
uint64_t
GetSeekFrame
()
override
;
uint64_t
GetSeekFrame
()
noexcept
override
;
void
SeekError
()
override
;
void
SeekError
()
override
;
InputStreamPtr
OpenUri
(
const
char
*
uri
)
override
;
InputStreamPtr
OpenUri
(
const
char
*
uri
)
override
;
size_t
Read
(
InputStream
&
is
,
void
*
buffer
,
size_t
length
)
override
;
size_t
Read
(
InputStream
&
is
,
void
*
buffer
,
size_t
length
)
override
;
...
...
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