summaryrefslogtreecommitdiff
path: root/methods/http.h
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2015-07-09 00:35:40 +0200
committerDavid Kalnischkies <david@kalnischkies.de>2015-08-10 17:27:17 +0200
commit3b3028467ceccca0b73a8f53051c0fa4de313111 (patch)
treeff51789a82630e3fb61a25f8b7c970854b753dc9 /methods/http.h
parent2893325927f6e4d55dc4bd148093351d4f8300f9 (diff)
add c++11 override marker to overridden methods
C++11 adds the 'override' specifier to mark that a method is overriding a base class method and error out if not. We hide it in the APT_OVERRIDE macro to ensure that we keep compiling in pre-c++11 standards. Reported-By: clang-modernize -add-override -override-macros Git-Dch: Ignore
Diffstat (limited to 'methods/http.h')
-rw-r--r--methods/http.h34
1 files changed, 17 insertions, 17 deletions
diff --git a/methods/http.h b/methods/http.h
index e73871931..da6139b02 100644
--- a/methods/http.h
+++ b/methods/http.h
@@ -99,23 +99,23 @@ struct HttpServerState: public ServerState
int ServerFd;
protected:
- virtual bool ReadHeaderLines(std::string &Data);
- virtual bool LoadNextResponse(bool const ToFile, FileFd * const File);
- virtual bool WriteResponse(std::string const &Data);
+ virtual bool ReadHeaderLines(std::string &Data) APT_OVERRIDE;
+ virtual bool LoadNextResponse(bool const ToFile, FileFd * const File) APT_OVERRIDE;
+ virtual bool WriteResponse(std::string const &Data) APT_OVERRIDE;
public:
- virtual void Reset() { ServerState::Reset(); ServerFd = -1; };
+ virtual void Reset() APT_OVERRIDE { ServerState::Reset(); ServerFd = -1; };
- virtual bool RunData(FileFd * const File);
+ virtual bool RunData(FileFd * const File) APT_OVERRIDE;
- virtual bool Open();
- virtual bool IsOpen();
- virtual bool Close();
- virtual bool InitHashes(HashStringList const &ExpectedHashes);
- virtual Hashes * GetHashes();
- virtual bool Die(FileFd &File);
- virtual bool Flush(FileFd * const File);
- virtual bool Go(bool ToFile, FileFd * const File);
+ virtual bool 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 bool Die(FileFd &File) APT_OVERRIDE;
+ virtual bool Flush(FileFd * const File) APT_OVERRIDE;
+ virtual bool Go(bool ToFile, FileFd * const File) APT_OVERRIDE;
HttpServerState(URI Srv, HttpMethod *Owner);
virtual ~HttpServerState() {Close();};
@@ -124,12 +124,12 @@ struct HttpServerState: public ServerState
class HttpMethod : public ServerMethod
{
public:
- virtual void SendReq(FetchItem *Itm);
+ virtual void SendReq(FetchItem *Itm) APT_OVERRIDE;
- virtual bool Configuration(std::string Message);
+ virtual bool Configuration(std::string Message) APT_OVERRIDE;
- virtual ServerState * CreateServerState(URI uri);
- virtual void RotateDNS();
+ virtual ServerState * CreateServerState(URI uri) APT_OVERRIDE;
+ virtual void RotateDNS() APT_OVERRIDE;
protected:
std::string AutoDetectProxyCmd;