From f73593a4034d9eec0ec4466b8e173d4a4daece1f Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Thu, 26 Dec 2024 19:41:53 +0000 Subject: Drop usage of macro APT_OVERRIDE for simple override We were rather inconsistent in using it and as our public headers contain deduction guides (a c++17 feature) it seems silly to try to hide a c++11 feature in a macro, so lets stop this charade and drop the macro and while we are changing all these lines lets apply [[nodiscard]] (another c++17 feature) and other suggestions from clang-tidy and formatting for a little more consistency. --- methods/http.cc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'methods/http.cc') diff --git a/methods/http.cc b/methods/http.cc index 3574bcad5..f2514eb9d 100644 --- a/methods/http.cc +++ b/methods/http.cc @@ -284,9 +284,9 @@ struct HttpConnectFd final : public MethodFd std::unique_ptr UnderlyingFd; std::string Buffer; - int Fd() APT_OVERRIDE { return UnderlyingFd->Fd(); } + int Fd() override { return UnderlyingFd->Fd(); } - ssize_t Read(void *buf, size_t count) APT_OVERRIDE + ssize_t Read(void *buf, size_t count) override { if (!Buffer.empty()) { @@ -299,17 +299,17 @@ struct HttpConnectFd final : public MethodFd return UnderlyingFd->Read(buf, count); } - ssize_t Write(void *buf, size_t count) APT_OVERRIDE + ssize_t Write(void *buf, size_t count) override { return UnderlyingFd->Write(buf, count); } - int Close() APT_OVERRIDE + int Close() override { return UnderlyingFd->Close(); } - bool HasPending() APT_OVERRIDE + bool HasPending() override { return !Buffer.empty(); } -- cgit v1.2.3-70-g09d2