summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2018-08-06 11:57:40 +0200
committerMax Kellermann <max@musicpd.org>2018-08-06 11:57:40 +0200
commit5b09504a7178deb5bb2b5deadcdc42b413128206 (patch)
treeab3ad8e9b71d68b3e88ba0e19567681aa4169b78
parent0c1a001622a06606b8a0c8ff4e168f0b6ffec3a6 (diff)
system/Event{FD,Pipe}: add "noexcept"
-rw-r--r--src/system/EventFD.cxx4
-rw-r--r--src/system/EventFD.hxx6
-rw-r--r--src/system/EventPipe.cxx6
-rw-r--r--src/system/EventPipe.hxx8
4 files changed, 12 insertions, 12 deletions
diff --git a/src/system/EventFD.cxx b/src/system/EventFD.cxx
index 92b5fd1bc..1103176c4 100644
--- a/src/system/EventFD.cxx
+++ b/src/system/EventFD.cxx
@@ -33,7 +33,7 @@ EventFD::EventFD()
}
bool
-EventFD::Read()
+EventFD::Read() noexcept
{
assert(fd.IsDefined());
@@ -42,7 +42,7 @@ EventFD::Read()
}
void
-EventFD::Write()
+EventFD::Write() noexcept
{
assert(fd.IsDefined());
diff --git a/src/system/EventFD.hxx b/src/system/EventFD.hxx
index 306e5ab2f..660e26a32 100644
--- a/src/system/EventFD.hxx
+++ b/src/system/EventFD.hxx
@@ -35,7 +35,7 @@ public:
*/
EventFD();
- int Get() const {
+ int Get() const noexcept {
return fd.Get();
}
@@ -43,13 +43,13 @@ public:
* Checks if Write() was called at least once since the last
* Read() call.
*/
- bool Read();
+ bool Read() noexcept;
/**
* Wakes up the reader. Multiple calls to this function will
* be combined to one wakeup.
*/
- void Write();
+ void Write() noexcept;
};
#endif
diff --git a/src/system/EventPipe.cxx b/src/system/EventPipe.cxx
index ff642cc63..075c2fa0a 100644
--- a/src/system/EventPipe.cxx
+++ b/src/system/EventPipe.cxx
@@ -52,7 +52,7 @@ EventPipe::EventPipe()
#endif
}
-EventPipe::~EventPipe()
+EventPipe::~EventPipe() noexcept
{
#ifdef _WIN32
closesocket(fds[0]);
@@ -64,7 +64,7 @@ EventPipe::~EventPipe()
}
bool
-EventPipe::Read()
+EventPipe::Read() noexcept
{
assert(fds[0] >= 0);
assert(fds[1] >= 0);
@@ -78,7 +78,7 @@ EventPipe::Read()
}
void
-EventPipe::Write()
+EventPipe::Write() noexcept
{
assert(fds[0] >= 0);
assert(fds[1] >= 0);
diff --git a/src/system/EventPipe.hxx b/src/system/EventPipe.hxx
index 1a707bf23..3fd94daa2 100644
--- a/src/system/EventPipe.hxx
+++ b/src/system/EventPipe.hxx
@@ -36,12 +36,12 @@ public:
*/
EventPipe();
- ~EventPipe();
+ ~EventPipe() noexcept;
EventPipe(const EventPipe &other) = delete;
EventPipe &operator=(const EventPipe &other) = delete;
- int Get() const {
+ int Get() const noexcept {
return fds[0];
}
@@ -49,13 +49,13 @@ public:
* Checks if Write() was called at least once since the last
* Read() call.
*/
- bool Read();
+ bool Read() noexcept;
/**
* Wakes up the reader. Multiple calls to this function will
* be combined to one wakeup.
*/
- void Write();
+ void Write() noexcept;
};
#endif /* MAIN_NOTIFY_H */