diff options
author | Max Kellermann <max@musicpd.org> | 2017-05-08 14:44:49 +0200 |
---|---|---|
committer | Max Kellermann <max@musicpd.org> | 2017-05-08 14:44:49 +0200 |
commit | 71f0ed8b7499011b53f90998ebfbd3250fd80948 (patch) | |
tree | e9c2f66fbef231858f46d878864199d46e6ce21c /src/event/ServerSocket.cxx | |
parent | ac2e4e593d407e41db49fdb9ae2da6bc1557f618 (diff) |
*: add "noexcept" to many, many function prototypes
This eliminates some overhead, because the compiler doesn't need to
consider these functions throwing.
Diffstat (limited to 'src/event/ServerSocket.cxx')
-rw-r--r-- | src/event/ServerSocket.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/event/ServerSocket.cxx b/src/event/ServerSocket.cxx index 6b36ed815..556648cc4 100644 --- a/src/event/ServerSocket.cxx +++ b/src/event/ServerSocket.cxx @@ -103,16 +103,16 @@ public: using SocketMonitor::Close; gcc_pure - std::string ToString() const { + std::string ToString() const noexcept { return ::ToString(address); } - void SetFD(int _fd) { + void SetFD(int _fd) noexcept { SocketMonitor::Open(_fd); SocketMonitor::ScheduleRead(); } - void Accept(); + void Accept() noexcept; private: virtual bool OnSocketReady(unsigned flags) override; @@ -146,7 +146,7 @@ get_remote_uid(int fd) } inline void -OneServerSocket::Accept() +OneServerSocket::Accept() noexcept { StaticSocketAddress peer_address; size_t peer_address_length = sizeof(peer_address); @@ -343,7 +343,7 @@ ServerSocket::AddPortIPv6(unsigned port) */ gcc_pure static bool -SupportsIPv6() +SupportsIPv6() noexcept { int fd = socket(AF_INET6, SOCK_STREAM, 0); if (fd < 0) |