diff options
| author | David Kalnischkies <david@kalnischkies.de> | 2024-12-26 19:41:53 +0000 |
|---|---|---|
| committer | David Kalnischkies <david@kalnischkies.de> | 2025-01-05 22:16:08 +0000 |
| commit | f73593a4034d9eec0ec4466b8e173d4a4daece1f (patch) | |
| tree | 9cab47b9426e3e9fff80682b86f8449e3d9c9b53 /methods/http.h | |
| parent | 427f95cedadb5323d35e5174d4592cbdd9c602f4 (diff) | |
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.
Diffstat (limited to 'methods/http.h')
| -rw-r--r-- | methods/http.h | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/methods/http.h b/methods/http.h index 5bfcbc8a2..5d6a8aad1 100644 --- a/methods/http.h +++ b/methods/http.h @@ -98,37 +98,37 @@ struct HttpServerState final : public ServerState std::unique_ptr<MethodFd> ServerFd; protected: - virtual bool ReadHeaderLines(std::string &Data) APT_OVERRIDE; - virtual ResultState LoadNextResponse(bool const ToFile, RequestState &Req) APT_OVERRIDE; - virtual bool WriteResponse(std::string const &Data) APT_OVERRIDE; + bool ReadHeaderLines(std::string &Data) override; + ResultState LoadNextResponse(bool ToFile, RequestState &Req) override; + bool WriteResponse(std::string const &Data) override; public: - virtual void Reset() APT_OVERRIDE; + void Reset() override; - virtual ResultState RunData(RequestState &Req) APT_OVERRIDE; - virtual ResultState RunDataToDevNull(RequestState &Req) APT_OVERRIDE; + ResultState RunData(RequestState &Req) override; + ResultState RunDataToDevNull(RequestState &Req) override; - virtual ResultState Open() APT_OVERRIDE; - virtual bool IsOpen() APT_OVERRIDE; - virtual bool Close() APT_OVERRIDE; - virtual bool InitHashes(HashStringList const &ExpectedHashes) APT_OVERRIDE; - virtual Hashes * GetHashes() APT_OVERRIDE; - virtual ResultState Die(RequestState &Req) APT_OVERRIDE; - virtual bool Flush(FileFd *const File, bool MustComplete = true) APT_OVERRIDE; - virtual ResultState Go(bool ToFile, RequestState &Req) APT_OVERRIDE; + ResultState Open() override; + bool IsOpen() override; + bool Close() override; + bool InitHashes(HashStringList const &ExpectedHashes) override; + Hashes * GetHashes() override; + ResultState Die(RequestState &Req) override; + bool Flush(FileFd *File, bool MustComplete = true) override; + ResultState Go(bool ToFile, RequestState &Req) override; HttpServerState(URI Srv, HttpMethod *Owner); - virtual ~HttpServerState() {Close();}; + ~HttpServerState() override {Close();}; }; class HttpMethod final : public BaseHttpMethod { public: - virtual void SendReq(FetchItem *Itm) APT_OVERRIDE; + void SendReq(FetchItem *Itm) override; - virtual std::unique_ptr<ServerState> CreateServerState(URI const &uri) APT_OVERRIDE; - virtual void RotateDNS() APT_OVERRIDE; - virtual DealWithHeadersResult DealWithHeaders(FetchResult &Res, RequestState &Req) APT_OVERRIDE; + std::unique_ptr<ServerState> CreateServerState(URI const &uri) override; + void RotateDNS() override; + DealWithHeadersResult DealWithHeaders(FetchResult &Res, RequestState &Req) override; protected: std::string AutoDetectProxyCmd; |
