Skip to content

Commit c5996c0

Browse files
committed
*: add "noexcept" to many, many function prototypes
See commit 71f0ed8
1 parent cde5a07 commit c5996c0

File tree

11 files changed

+20
-20
lines changed

11 files changed

+20
-20
lines changed

src/DetachedSong.cxx

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ DetachedSong::DetachedSong(const LightSong &other)
3131
start_time(other.start_time),
3232
end_time(other.end_time) {}
3333

34-
DetachedSong::operator LightSong() const
34+
DetachedSong::operator LightSong() const noexcept
3535
{
3636
LightSong result;
3737
result.directory = nullptr;

src/DetachedSong.hxx

+1-1
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ public:
108108
DetachedSong &operator=(DetachedSong &&) = default;
109109

110110
gcc_pure
111-
explicit operator LightSong() const;
111+
explicit operator LightSong() const noexcept;
112112

113113
gcc_pure
114114
const char *GetURI() const noexcept {

src/Instance.cxx

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ Instance::Instance()
4040
}
4141

4242
Partition *
43-
Instance::FindPartition(const char *name)
43+
Instance::FindPartition(const char *name) noexcept
4444
{
4545
for (auto &partition : partitions)
4646
if (partition.name == name)

src/Instance.hxx

+1-1
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ struct Instance final
111111
* no such partition was found.
112112
*/
113113
gcc_pure
114-
Partition *FindPartition(const char *name);
114+
Partition *FindPartition(const char *name) noexcept;
115115

116116
#ifdef ENABLE_DATABASE
117117
/**

src/client/Client.cxx

+3-3
Original file line numberDiff line numberDiff line change
@@ -26,19 +26,19 @@
2626
const Domain client_domain("client");
2727

2828
Instance &
29-
Client::GetInstance()
29+
Client::GetInstance() noexcept
3030
{
3131
return partition->instance;
3232
}
3333

3434
playlist &
35-
Client::GetPlaylist()
35+
Client::GetPlaylist() noexcept
3636
{
3737
return partition->playlist;
3838
}
3939

4040
PlayerControl &
41-
Client::GetPlayerControl()
41+
Client::GetPlayerControl() noexcept
4242
{
4343
return partition->pc;
4444
}

src/client/Client.hxx

+5-5
Original file line numberDiff line numberDiff line change
@@ -188,24 +188,24 @@ public:
188188
*/
189189
void AllowFile(Path path_fs) const;
190190

191-
Partition &GetPartition() {
191+
Partition &GetPartition() noexcept {
192192
return *partition;
193193
}
194194

195-
void SetPartition(Partition &new_partition) {
195+
void SetPartition(Partition &new_partition) noexcept {
196196
partition = &new_partition;
197197

198198
// TODO: set various idle flags?
199199
}
200200

201201
gcc_pure
202-
Instance &GetInstance();
202+
Instance &GetInstance() noexcept;
203203

204204
gcc_pure
205-
playlist &GetPlaylist();
205+
playlist &GetPlaylist() noexcept;
206206

207207
gcc_pure
208-
PlayerControl &GetPlayerControl();
208+
PlayerControl &GetPlayerControl() noexcept;
209209

210210
/**
211211
* Wrapper for Instance::GetDatabase().

src/lib/alsa/Version.cxx

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
gcc_pure
2525
static uint_least32_t
26-
ParseAlsaVersion(const char *p)
26+
ParseAlsaVersion(const char *p) noexcept
2727
{
2828
char *endptr;
2929
unsigned long major, minor = 0, subminor = 0;
@@ -42,7 +42,7 @@ ParseAlsaVersion(const char *p)
4242
}
4343

4444
uint_least32_t
45-
GetRuntimeAlsaVersion()
45+
GetRuntimeAlsaVersion() noexcept
4646
{
4747
const char *version = snd_asoundlib_version();
4848
if (version == nullptr)

src/lib/alsa/Version.hxx

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,6 @@ MakeAlsaVersion(uint_least32_t major, uint_least32_t minor,
3737
*/
3838
gcc_const
3939
uint_least32_t
40-
GetRuntimeAlsaVersion();
40+
GetRuntimeAlsaVersion() noexcept;
4141

4242
#endif

src/lib/nfs/Glue.cxx

+2-2
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ nfs_init(EventLoop &event_loop)
3838
}
3939

4040
void
41-
nfs_finish()
41+
nfs_finish() noexcept
4242
{
4343
assert(in_use > 0);
4444

@@ -49,7 +49,7 @@ nfs_finish()
4949
}
5050

5151
EventLoop &
52-
nfs_get_event_loop()
52+
nfs_get_event_loop() noexcept
5353
{
5454
assert(in_use > 0);
5555

src/lib/nfs/Glue.hxx

+2-2
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,14 @@ void
3030
nfs_init(EventLoop &event_loop);
3131

3232
void
33-
nfs_finish();
33+
nfs_finish() noexcept;
3434

3535
/**
3636
* Return the EventLoop that was passed to nfs_init().
3737
*/
3838
gcc_const
3939
EventLoop &
40-
nfs_get_event_loop();
40+
nfs_get_event_loop() noexcept;
4141

4242
gcc_pure
4343
NfsConnection &

src/output/plugins/AlsaOutputPlugin.cxx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1009,7 +1009,7 @@ MaybeDmix(snd_pcm_type_t type)
10091009

10101010
gcc_pure
10111011
static bool
1012-
MaybeDmix(snd_pcm_t *pcm)
1012+
MaybeDmix(snd_pcm_t *pcm) noexcept
10131013
{
10141014
return MaybeDmix(snd_pcm_type(pcm));
10151015
}

0 commit comments

Comments
 (0)