summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2017-05-15 23:05:45 +0200
committerMax Kellermann <max@musicpd.org>2017-05-15 23:05:45 +0200
commitc5996c059371753420e347b7eb77fca7ad9ca7cd (patch)
tree09f430cf9f1a00dab9c25d0bce476c87454f25ba
parentcde5a0798117f3a3cc65032877c416caa8c23bb2 (diff)
*: add "noexcept" to many, many function prototypes
See commit 71f0ed8b7499011b53f90998ebfbd3250fd80948
-rw-r--r--src/DetachedSong.cxx2
-rw-r--r--src/DetachedSong.hxx2
-rw-r--r--src/Instance.cxx2
-rw-r--r--src/Instance.hxx2
-rw-r--r--src/client/Client.cxx6
-rw-r--r--src/client/Client.hxx10
-rw-r--r--src/lib/alsa/Version.cxx4
-rw-r--r--src/lib/alsa/Version.hxx2
-rw-r--r--src/lib/nfs/Glue.cxx4
-rw-r--r--src/lib/nfs/Glue.hxx4
-rw-r--r--src/output/plugins/AlsaOutputPlugin.cxx2
11 files changed, 20 insertions, 20 deletions
diff --git a/src/DetachedSong.cxx b/src/DetachedSong.cxx
index 8c5ff5371..e1d82c113 100644
--- a/src/DetachedSong.cxx
+++ b/src/DetachedSong.cxx
@@ -31,7 +31,7 @@ DetachedSong::DetachedSong(const LightSong &other)
start_time(other.start_time),
end_time(other.end_time) {}
-DetachedSong::operator LightSong() const
+DetachedSong::operator LightSong() const noexcept
{
LightSong result;
result.directory = nullptr;
diff --git a/src/DetachedSong.hxx b/src/DetachedSong.hxx
index c05ca82dd..9a0ef8e24 100644
--- a/src/DetachedSong.hxx
+++ b/src/DetachedSong.hxx
@@ -108,7 +108,7 @@ public:
DetachedSong &operator=(DetachedSong &&) = default;
gcc_pure
- explicit operator LightSong() const;
+ explicit operator LightSong() const noexcept;
gcc_pure
const char *GetURI() const noexcept {
diff --git a/src/Instance.cxx b/src/Instance.cxx
index 9b6c8ac65..d1196cfb8 100644
--- a/src/Instance.cxx
+++ b/src/Instance.cxx
@@ -40,7 +40,7 @@ Instance::Instance()
}
Partition *
-Instance::FindPartition(const char *name)
+Instance::FindPartition(const char *name) noexcept
{
for (auto &partition : partitions)
if (partition.name == name)
diff --git a/src/Instance.hxx b/src/Instance.hxx
index 04cb0a1e1..204b526a2 100644
--- a/src/Instance.hxx
+++ b/src/Instance.hxx
@@ -111,7 +111,7 @@ struct Instance final
* no such partition was found.
*/
gcc_pure
- Partition *FindPartition(const char *name);
+ Partition *FindPartition(const char *name) noexcept;
#ifdef ENABLE_DATABASE
/**
diff --git a/src/client/Client.cxx b/src/client/Client.cxx
index 922e901ab..2b10e0b02 100644
--- a/src/client/Client.cxx
+++ b/src/client/Client.cxx
@@ -26,19 +26,19 @@
const Domain client_domain("client");
Instance &
-Client::GetInstance()
+Client::GetInstance() noexcept
{
return partition->instance;
}
playlist &
-Client::GetPlaylist()
+Client::GetPlaylist() noexcept
{
return partition->playlist;
}
PlayerControl &
-Client::GetPlayerControl()
+Client::GetPlayerControl() noexcept
{
return partition->pc;
}
diff --git a/src/client/Client.hxx b/src/client/Client.hxx
index 762eccd18..f23f1324d 100644
--- a/src/client/Client.hxx
+++ b/src/client/Client.hxx
@@ -188,24 +188,24 @@ public:
*/
void AllowFile(Path path_fs) const;
- Partition &GetPartition() {
+ Partition &GetPartition() noexcept {
return *partition;
}
- void SetPartition(Partition &new_partition) {
+ void SetPartition(Partition &new_partition) noexcept {
partition = &new_partition;
// TODO: set various idle flags?
}
gcc_pure
- Instance &GetInstance();
+ Instance &GetInstance() noexcept;
gcc_pure
- playlist &GetPlaylist();
+ playlist &GetPlaylist() noexcept;
gcc_pure
- PlayerControl &GetPlayerControl();
+ PlayerControl &GetPlayerControl() noexcept;
/**
* Wrapper for Instance::GetDatabase().
diff --git a/src/lib/alsa/Version.cxx b/src/lib/alsa/Version.cxx
index b24ded778..9aed77683 100644
--- a/src/lib/alsa/Version.cxx
+++ b/src/lib/alsa/Version.cxx
@@ -23,7 +23,7 @@
gcc_pure
static uint_least32_t
-ParseAlsaVersion(const char *p)
+ParseAlsaVersion(const char *p) noexcept
{
char *endptr;
unsigned long major, minor = 0, subminor = 0;
@@ -42,7 +42,7 @@ ParseAlsaVersion(const char *p)
}
uint_least32_t
-GetRuntimeAlsaVersion()
+GetRuntimeAlsaVersion() noexcept
{
const char *version = snd_asoundlib_version();
if (version == nullptr)
diff --git a/src/lib/alsa/Version.hxx b/src/lib/alsa/Version.hxx
index 4a595ca28..5ff6a04f1 100644
--- a/src/lib/alsa/Version.hxx
+++ b/src/lib/alsa/Version.hxx
@@ -37,6 +37,6 @@ MakeAlsaVersion(uint_least32_t major, uint_least32_t minor,
*/
gcc_const
uint_least32_t
-GetRuntimeAlsaVersion();
+GetRuntimeAlsaVersion() noexcept;
#endif
diff --git a/src/lib/nfs/Glue.cxx b/src/lib/nfs/Glue.cxx
index be8c5a135..bd437fa2b 100644
--- a/src/lib/nfs/Glue.cxx
+++ b/src/lib/nfs/Glue.cxx
@@ -38,7 +38,7 @@ nfs_init(EventLoop &event_loop)
}
void
-nfs_finish()
+nfs_finish() noexcept
{
assert(in_use > 0);
@@ -49,7 +49,7 @@ nfs_finish()
}
EventLoop &
-nfs_get_event_loop()
+nfs_get_event_loop() noexcept
{
assert(in_use > 0);
diff --git a/src/lib/nfs/Glue.hxx b/src/lib/nfs/Glue.hxx
index 66c154ddd..28dba89c2 100644
--- a/src/lib/nfs/Glue.hxx
+++ b/src/lib/nfs/Glue.hxx
@@ -30,14 +30,14 @@ void
nfs_init(EventLoop &event_loop);
void
-nfs_finish();
+nfs_finish() noexcept;
/**
* Return the EventLoop that was passed to nfs_init().
*/
gcc_const
EventLoop &
-nfs_get_event_loop();
+nfs_get_event_loop() noexcept;
gcc_pure
NfsConnection &
diff --git a/src/output/plugins/AlsaOutputPlugin.cxx b/src/output/plugins/AlsaOutputPlugin.cxx
index 58071f4d1..363437b48 100644
--- a/src/output/plugins/AlsaOutputPlugin.cxx
+++ b/src/output/plugins/AlsaOutputPlugin.cxx
@@ -1009,7 +1009,7 @@ MaybeDmix(snd_pcm_type_t type)
gcc_pure
static bool
-MaybeDmix(snd_pcm_t *pcm)
+MaybeDmix(snd_pcm_t *pcm) noexcept
{
return MaybeDmix(snd_pcm_type(pcm));
}