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
ae713cb0
Commit
ae713cb0
authored
Jun 04, 2017
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
*: add lots of "noexcept" specifications
parent
979f1b6c
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
20 additions
and
20 deletions
+20
-20
Response.cxx
src/client/Response.cxx
+1
-1
Response.hxx
src/client/Response.hxx
+1
-1
PartitionCommands.cxx
src/command/PartitionCommands.cxx
+2
-2
StaticSocketAddress.cxx
src/net/StaticSocketAddress.cxx
+1
-1
StaticSocketAddress.hxx
src/net/StaticSocketAddress.hxx
+2
-2
PcmPack.cxx
src/pcm/PcmPack.cxx
+3
-3
Tag.cxx
src/tag/Tag.cxx
+4
-4
Tag.hxx
src/tag/Tag.hxx
+5
-5
test_queue_priority.cxx
test/test_queue_priority.cxx
+1
-1
No files found.
src/client/Response.cxx
View file @
ae713cb0
...
...
@@ -24,7 +24,7 @@
#include "util/AllocatedString.hxx"
TagMask
Response
::
GetTagMask
()
const
Response
::
GetTagMask
()
const
noexcept
{
return
GetClient
().
tag_mask
;
}
...
...
src/client/Response.hxx
View file @
ae713cb0
...
...
@@ -66,7 +66,7 @@ public:
* to avoid including Client.hxx.
*/
gcc_pure
TagMask
GetTagMask
()
const
;
TagMask
GetTagMask
()
const
noexcept
;
void
SetCommand
(
const
char
*
_command
)
{
command
=
_command
;
...
...
src/command/PartitionCommands.cxx
View file @
ae713cb0
...
...
@@ -61,7 +61,7 @@ IsValidPartitionChar(char ch)
gcc_pure
static
bool
IsValidPartitionName
(
const
char
*
name
)
IsValidPartitionName
(
const
char
*
name
)
noexcept
{
do
{
if
(
!
IsValidPartitionChar
(
*
name
))
...
...
@@ -73,7 +73,7 @@ IsValidPartitionName(const char *name)
gcc_pure
static
bool
HasPartitionNamed
(
Instance
&
instance
,
const
char
*
name
)
HasPartitionNamed
(
Instance
&
instance
,
const
char
*
name
)
noexcept
{
return
instance
.
FindPartition
(
name
)
!=
nullptr
;
}
...
...
src/net/StaticSocketAddress.cxx
View file @
ae713cb0
...
...
@@ -53,7 +53,7 @@ StaticSocketAddress::operator=(SocketAddress other) noexcept
#ifdef HAVE_TCP
bool
StaticSocketAddress
::
SetPort
(
unsigned
port
)
StaticSocketAddress
::
SetPort
(
unsigned
port
)
noexcept
{
switch
(
GetFamily
())
{
case
AF_INET
:
...
...
src/net/StaticSocketAddress.hxx
View file @
ae713cb0
...
...
@@ -96,7 +96,7 @@ public:
* Extract the port number. Returns 0 if not applicable.
*/
gcc_pure
unsigned
GetPort
()
const
{
unsigned
GetPort
()
const
noexcept
{
return
((
SocketAddress
)
*
this
).
GetPort
();
}
...
...
@@ -104,7 +104,7 @@ public:
* @return true on success, false if this address cannot have
* a port number
*/
bool
SetPort
(
unsigned
port
);
bool
SetPort
(
unsigned
port
)
noexcept
;
#endif
gcc_pure
...
...
src/pcm/PcmPack.cxx
View file @
ae713cb0
...
...
@@ -61,7 +61,7 @@ ConstructS24(uint8_t low, uint8_t mid, uint8_t high)
*/
gcc_pure
static
int32_t
ReadS24LE
(
const
uint8_t
*
src
)
ReadS24LE
(
const
uint8_t
*
src
)
noexcept
{
return
ConstructS24
(
src
[
0
],
src
[
1
],
src
[
2
]);
}
...
...
@@ -71,7 +71,7 @@ ReadS24LE(const uint8_t *src)
*/
gcc_pure
static
int32_t
ReadS24BE
(
const
uint8_t
*
src
)
ReadS24BE
(
const
uint8_t
*
src
)
noexcept
{
return
ConstructS24
(
src
[
2
],
src
[
1
],
src
[
0
]);
}
...
...
@@ -81,7 +81,7 @@ ReadS24BE(const uint8_t *src)
*/
gcc_pure
static
int32_t
ReadS24
(
const
uint8_t
*
src
)
ReadS24
(
const
uint8_t
*
src
)
noexcept
{
return
IsBigEndian
()
?
ReadS24BE
(
src
)
:
ReadS24LE
(
src
);
}
...
...
src/tag/Tag.cxx
View file @
ae713cb0
...
...
@@ -25,7 +25,7 @@
#include <assert.h>
void
Tag
::
Clear
()
Tag
::
Clear
()
noexcept
{
duration
=
SignedSongTime
::
Negative
();
has_playlist
=
false
;
...
...
@@ -98,7 +98,7 @@ Tag::HasType(TagType type) const noexcept
}
static
TagType
DecaySort
(
TagType
type
)
DecaySort
(
TagType
type
)
noexcept
{
switch
(
type
)
{
case
TAG_ARTIST_SORT
:
...
...
@@ -116,7 +116,7 @@ DecaySort(TagType type)
}
static
TagType
Fallback
(
TagType
type
)
Fallback
(
TagType
type
)
noexcept
{
switch
(
type
)
{
case
TAG_ALBUM_ARTIST
:
...
...
@@ -131,7 +131,7 @@ Fallback(TagType type)
}
const
char
*
Tag
::
GetSortValue
(
TagType
type
)
const
Tag
::
GetSortValue
(
TagType
type
)
const
noexcept
{
const
char
*
value
=
GetValue
(
type
);
if
(
value
!=
nullptr
)
...
...
src/tag/Tag.hxx
View file @
ae713cb0
...
...
@@ -85,7 +85,7 @@ struct Tag {
* Similar to the move operator, but move only the #TagItem
* array.
*/
void
MoveItemsFrom
(
Tag
&&
other
)
{
void
MoveItemsFrom
(
Tag
&&
other
)
noexcept
{
std
::
swap
(
items
,
other
.
items
);
std
::
swap
(
num_items
,
other
.
num_items
);
}
...
...
@@ -94,21 +94,21 @@ struct Tag {
* Returns true if the tag contains no items. This ignores
* the "duration" attribute.
*/
bool
IsEmpty
()
const
{
bool
IsEmpty
()
const
noexcept
{
return
num_items
==
0
;
}
/**
* Returns true if the tag contains any information.
*/
bool
IsDefined
()
const
{
bool
IsDefined
()
const
noexcept
{
return
!
IsEmpty
()
||
!
duration
.
IsNegative
();
}
/**
* Clear everything, as if this was a new Tag object.
*/
void
Clear
();
void
Clear
()
noexcept
;
/**
* Merges the data from two tags. If both tags share data for the
...
...
@@ -149,7 +149,7 @@ struct Tag {
* there is no such value, returns an empty string.
*/
gcc_pure
const
char
*
GetSortValue
(
TagType
type
)
const
;
const
char
*
GetSortValue
(
TagType
type
)
const
noexcept
;
class
const_iterator
{
friend
struct
Tag
;
...
...
test/test_queue_priority.cxx
View file @
ae713cb0
...
...
@@ -9,7 +9,7 @@
#include <cppunit/extensions/HelperMacros.h>
Tag
::
Tag
(
const
Tag
&
)
{}
void
Tag
::
Clear
()
{}
void
Tag
::
Clear
()
noexcept
{}
static
void
check_descending_priority
(
const
Queue
*
queue
,
...
...
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