From 3610f554793cab307e4397ae66c4d1ee43165813 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 3 Apr 2019 21:37:38 +0200 Subject: [PATCH] client/Write: add `noexcept` --- src/client/Client.hxx | 4 ++-- src/client/Write.cxx | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/client/Client.hxx b/src/client/Client.hxx index 74a423149..8f55c43c4 100644 --- a/src/client/Client.hxx +++ b/src/client/Client.hxx @@ -124,12 +124,12 @@ public: void Close() noexcept; void SetExpired() noexcept; - bool Write(const void *data, size_t length); + bool Write(const void *data, size_t length) noexcept; /** * Write a null-terminated string. */ - bool Write(const char *data); + bool Write(const char *data) noexcept; /** * returns the uid of the client process, or a negative value diff --git a/src/client/Write.cxx b/src/client/Write.cxx index 9bc3ec0c4..32ff0a240 100644 --- a/src/client/Write.cxx +++ b/src/client/Write.cxx @@ -22,14 +22,14 @@ #include bool -Client::Write(const void *data, size_t length) +Client::Write(const void *data, size_t length) noexcept { /* if the client is going to be closed, do nothing */ return !IsExpired() && FullyBufferedSocket::Write(data, length); } bool -Client::Write(const char *data) +Client::Write(const char *data) noexcept { return Write(data, strlen(data)); }