]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Maintenance: Consistent use of C++11 "override" specifier (#1224)
authorAlex Rousskov <rousskov@measurement-factory.com>
Mon, 9 Jan 2023 21:12:02 +0000 (21:12 +0000)
committerSquid Anubis <squid-anubis@squid-cache.org>
Fri, 13 Jan 2023 19:24:42 +0000 (19:24 +0000)
Start following CppCoreGuidelines recommendation C.128: Virtual
functions should specify exactly one of virtual, override, or final.

Used clang-tidy modernize-use-override check to mark overridden methods.
Clang-tidy uses clang AST, so we can only modernize code that clang can
see, but we can enable enough ./configure options for clang to reach
most (possibly all) relevant classes in a single build.

Manual gradual conversion of modified (for other reasons) method
declarations is impractical because some compilers complain when a class
uses an inconsistent _mix_ of virtual and override declarations:

    warning: 'toCbdata' overrides a member function but is not marked
    'override' [-Winconsistent-missing-override]

### cbdata changes

The following manual changes avoid -Winconsistent-missing-override
warnings. Doing these separately, either before or after applying
modernize-use-override, would trigger those warnings.

* Replaced CbdataParent-CBDATA_CLASS with CbdataParent-CBDATA_CHILD
  class inheritance sequences. This fix does not really change anything
  except for making toCbdata() specifiers consistent.

* Replaced CbdataParent-CBDATA_CLASS-CBDATA_CHILD with
  CbdataParent-CBDATA_INTERMEDIATE-CBDATA_CHILD class inheritance
  sequences. This fix removes unused new/delete operators in
  intermediate classes (and associated unused static memory pools) and
  makes toCbdata() specifiers consistent. This fix was difficult to get
  right because of the old design problem discussed below.

While working on the second bullet changes, we first tried to simply
drop the intermediate CBDATA_CLASS sequence element because it should
never be needed/used in class hierarchies ending with CBDATA_CHILD.
Fortunately, CI tests discovered that dropping CBDATA_CLASS converts an
old design problem into runtime bugs: Those intermediate class
constructors (e.g., Mgr::StoreToCommWriter) actually call toCbdata()
when creating connection closure callbacks and such!

During intermediate constructor execution, the class virtual table does
not yet point to toCbdata() defined by CBDATA_CHILD. If we simply remove
CBDATA_CLASS, then, during that intermediate constructor execution, the
virtual table would still point to pure CbdataParent::toCbdata(). Those
intermediate constructors would then crash Squid:

    FATAL: Dying from an exception handling failure;
    exception: [no active exception]

    in OnTerminate () at main.cc:1310
    in std::terminate() () from libstdc++.so.6
    in __cxa_pure_virtual () from libstdc++.so.6
    in CbcPointer<Mgr::StoreToCommWriter>::CbcPointer at CbcPointer.h:94
    in Mgr::StoreToCommWriter::StoreToCommWriter at ...oCommWriter.cc:29

We now use lighter CBDATA_INTERMEDIATE() instead of intermediate
CBDATA_CLASS. The resulting code is as risky as it used to be, but at
least we are marking this (old) design problem (in some cases).

We rejected the idea of defining CbdataParent::toCbdata() instead. It
would work fine for linear class inheritance where "this" does not
change -- in those simple class hierarchies, we do not need toCbdata()!
However, such a change would make any constructor-time bugs in multiple
inheritance hierarchies much more difficult to find because the faulty
constructor will work instead of triggering the above FATAL error. The
crashes would happen later, when wrong cbdata pointer is used. While
CBDATA_INTERMEDIATE() cannot fix this design problem, it does not make
it _worse_, so we prefer that solution.

349 files changed:
lib/libTrie/TrieCharTransform.h
src/AccessLogEntry.h
src/BodyPipe.cc
src/BodyPipe.h
src/ClientDelayConfig.h
src/ClientInfo.h
src/ClientRequestContext.h
src/CollapsedForwarding.cc
src/CommCalls.h
src/CompositePoolNode.h
src/ConfigOption.h
src/DelayIdComposite.h
src/DelayTagged.h
src/DelayUser.h
src/DelayVector.h
src/DiskIO/AIO/AIODiskFile.h
src/DiskIO/AIO/AIODiskIOModule.h
src/DiskIO/AIO/AIODiskIOStrategy.h
src/DiskIO/Blocking/BlockingDiskIOModule.h
src/DiskIO/Blocking/BlockingFile.h
src/DiskIO/Blocking/BlockingIOStrategy.h
src/DiskIO/DiskDaemon/DiskDaemonDiskIOModule.h
src/DiskIO/DiskDaemon/DiskdAction.h
src/DiskIO/DiskDaemon/DiskdFile.h
src/DiskIO/DiskDaemon/DiskdIOStrategy.h
src/DiskIO/DiskIOStrategy.h
src/DiskIO/DiskThreads/DiskThreadsDiskFile.h
src/DiskIO/DiskThreads/DiskThreadsDiskIOModule.h
src/DiskIO/DiskThreads/DiskThreadsIOStrategy.h
src/DiskIO/IpcIo/IpcIoDiskIOModule.h
src/DiskIO/IpcIo/IpcIoFile.cc
src/DiskIO/IpcIo/IpcIoFile.h
src/DiskIO/IpcIo/IpcIoIOStrategy.h
src/DiskIO/Mmapped/MmappedDiskIOModule.h
src/DiskIO/Mmapped/MmappedFile.h
src/DiskIO/Mmapped/MmappedIOStrategy.h
src/DiskIO/ReadRequest.h
src/DiskIO/WriteRequest.h
src/Downloader.cc
src/Downloader.h
src/ExternalACL.h
src/ExternalACLEntry.h
src/FwdState.h
src/HappyConnOpener.cc
src/HappyConnOpener.h
src/HttpReply.h
src/HttpRequest.h
src/ICP.h
src/MemBuf.h
src/MemStore.cc
src/MemStore.h
src/MessageBucket.h
src/MessageDelayPools.h
src/Notes.h
src/NullDelayId.h
src/PeerPoolMgr.cc
src/PeerPoolMgr.h
src/PeerSelectState.h
src/SBufStatsAction.h
src/Store.h
src/StoreClient.h
src/StoreIOState.h
src/StoreSearch.h
src/Transients.cc
src/Transients.h
src/acl/AdaptationService.h
src/acl/AdaptationServiceData.h
src/acl/AllOf.h
src/acl/AnnotateClient.h
src/acl/AnnotateTransaction.h
src/acl/AnnotationData.h
src/acl/AnyOf.h
src/acl/Arp.h
src/acl/Asn.h
src/acl/AtStep.h
src/acl/AtStepData.h
src/acl/BoolOps.h
src/acl/Certificate.h
src/acl/CertificateData.h
src/acl/Checklist.h
src/acl/ConnMark.h
src/acl/ConnectionsEncrypted.h
src/acl/DestinationAsn.h
src/acl/DestinationDomain.h
src/acl/DestinationIp.h
src/acl/DomainData.h
src/acl/Eui64.h
src/acl/ExtUser.h
src/acl/FilledChecklist.h
src/acl/HasComponent.h
src/acl/HasComponentData.h
src/acl/HierCode.h
src/acl/HierCodeData.h
src/acl/HttpHeaderData.h
src/acl/HttpRepHeader.h
src/acl/HttpReqHeader.h
src/acl/HttpStatus.h
src/acl/InnerNode.h
src/acl/IntRange.h
src/acl/Ip.h
src/acl/LocalIp.h
src/acl/LocalPort.h
src/acl/MaxConnection.h
src/acl/Method.h
src/acl/MethodData.h
src/acl/MyPortName.h
src/acl/Note.h
src/acl/NoteData.h
src/acl/Options.h
src/acl/PeerName.h
src/acl/Protocol.h
src/acl/ProtocolData.h
src/acl/Random.h
src/acl/RegexData.h
src/acl/ReplyHeaderStrategy.h
src/acl/RequestHeaderStrategy.h
src/acl/ServerCertificate.h
src/acl/ServerName.h
src/acl/SourceAsn.h
src/acl/SourceDomain.h
src/acl/SourceIp.h
src/acl/SquidError.h
src/acl/SquidErrorData.h
src/acl/SslError.h
src/acl/SslErrorData.h
src/acl/Strategised.h
src/acl/StringData.h
src/acl/Tag.h
src/acl/Time.h
src/acl/TimeData.h
src/acl/TransactionInitiator.h
src/acl/Tree.h
src/acl/Url.h
src/acl/UrlLogin.h
src/acl/UrlPath.h
src/acl/UrlPort.h
src/acl/UserData.h
src/adaptation/AccessCheck.h
src/adaptation/Initiate.cc
src/adaptation/Initiate.h
src/adaptation/Initiator.h
src/adaptation/Iterator.h
src/adaptation/Service.h
src/adaptation/ServiceGroups.h
src/adaptation/ecap/Config.h
src/adaptation/ecap/Host.h
src/adaptation/ecap/MessageRep.h
src/adaptation/ecap/ServiceRep.cc
src/adaptation/ecap/ServiceRep.h
src/adaptation/ecap/XactionRep.cc
src/adaptation/ecap/XactionRep.h
src/adaptation/icap/Config.h
src/adaptation/icap/Launcher.h
src/adaptation/icap/ModXact.h
src/adaptation/icap/OptXact.h
src/adaptation/icap/ServiceRep.h
src/adaptation/icap/Xaction.cc
src/adaptation/icap/Xaction.h
src/anyp/PortCfg.h
src/auth/AclMaxUserIp.h
src/auth/AclProxyAuth.h
src/auth/CredentialsCache.cc
src/auth/Scheme.h
src/auth/User.h
src/auth/UserRequest.h
src/auth/basic/Config.h
src/auth/basic/Scheme.h
src/auth/basic/User.h
src/auth/basic/UserRequest.h
src/auth/digest/Config.h
src/auth/digest/Scheme.h
src/auth/digest/User.h
src/auth/digest/UserRequest.h
src/auth/negotiate/Config.h
src/auth/negotiate/Scheme.h
src/auth/negotiate/User.h
src/auth/negotiate/UserRequest.h
src/auth/ntlm/Config.h
src/auth/ntlm/Scheme.cc
src/auth/ntlm/Scheme.h
src/auth/ntlm/User.h
src/auth/ntlm/UserRequest.h
src/base/AsyncCall.h
src/base/AsyncCallbacks.h
src/base/AsyncCbdataCalls.h
src/base/AsyncFunCalls.h
src/base/AsyncJob.h
src/base/AsyncJobCalls.h
src/base/CodeContext.cc
src/base/CodeContext.h
src/base/PackableStream.h
src/base/RunnersRegistry.h
src/base/Subscription.h
src/base/TextException.h
src/cache_cf.cc
src/cache_manager.cc
src/cbdata.h
src/client_db.cc
src/client_side.cc
src/client_side.h
src/client_side_reply.h
src/client_side_request.h
src/clients/Client.h
src/clients/FtpClient.h
src/clients/FtpGateway.cc
src/clients/FtpRelay.cc
src/clients/HttpTunneler.h
src/comm.h
src/comm/ConnOpener.h
src/comm/Connection.h
src/comm/TcpAcceptor.h
src/debug/debug.cc
src/delay_pools.cc
src/dns_internal.cc
src/error/Detail.cc
src/error/Detail.h
src/error/ExceptionErrorDetail.h
src/error/SysErrorDetail.h
src/errorpage.cc
src/esi/Assign.h
src/esi/Context.h
src/esi/Element.h
src/esi/Esi.cc
src/esi/ExpatParser.cc
src/esi/ExpatParser.h
src/esi/Include.h
src/esi/Libxml2Parser.cc
src/esi/Libxml2Parser.h
src/esi/Literal.h
src/esi/Segment.h
src/esi/Sequence.h
src/esi/VarState.h
src/event.cc
src/event.h
src/fs/rock/RockHeaderUpdater.h
src/fs/rock/RockIoState.cc
src/fs/rock/RockIoState.h
src/fs/rock/RockRebuild.h
src/fs/rock/RockStoreFileSystem.h
src/fs/rock/RockSwapDir.h
src/fs/ufs/StoreFSufs.h
src/fs/ufs/StoreSearchUFS.h
src/fs/ufs/UFSStoreState.h
src/fs/ufs/UFSSwapDir.cc
src/fs/ufs/UFSSwapDir.h
src/fs/ufs/UFSSwapLogParser.cc
src/helper.h
src/htcp.cc
src/http.h
src/http/Message.h
src/http/Stream.h
src/http/one/Parser.h
src/http/one/RequestParser.h
src/http/one/ResponseParser.h
src/http/one/TeChunkedParser.h
src/icmp/Icmp4.h
src/icmp/Icmp6.h
src/icmp/IcmpPinger.h
src/icmp/IcmpSquid.h
src/icp_v2.cc
src/icp_v3.cc
src/ident/AclIdent.h
src/ipc/Coordinator.h
src/ipc/Forwarder.cc
src/ipc/Forwarder.h
src/ipc/Inquirer.cc
src/ipc/Inquirer.h
src/ipc/Port.h
src/ipc/Queue.h
src/ipc/Strand.h
src/ipc/UdsOp.h
src/ipc/mem/Pages.cc
src/ipc/mem/Segment.h
src/ipcache.h
src/log/TcpLogger.h
src/main.cc
src/mem/Pool.h
src/mem/PoolChunked.h
src/mem/PoolMalloc.h
src/mgr/Action.h
src/mgr/ActionCreator.h
src/mgr/ActionWriter.h
src/mgr/BasicActions.h
src/mgr/CountersAction.h
src/mgr/Filler.h
src/mgr/Forwarder.h
src/mgr/FunAction.h
src/mgr/InfoAction.h
src/mgr/Inquirer.h
src/mgr/IntParam.h
src/mgr/IntervalAction.h
src/mgr/IoAction.h
src/mgr/QueryParam.h
src/mgr/Request.h
src/mgr/Response.h
src/mgr/ServiceTimesAction.h
src/mgr/StoreIoAction.h
src/mgr/StoreToCommWriter.cc
src/mgr/StoreToCommWriter.h
src/mgr/StringParam.h
src/mime.cc
src/pconn.h
src/sbuf/MemBlob.h
src/security/BlindPeerConnector.h
src/security/ErrorDetail.h
src/security/PeerConnector.cc
src/security/PeerConnector.h
src/security/ServerOptions.h
src/security/Session.cc
src/servers/FtpServer.h
src/servers/Http1Server.h
src/servers/Server.h
src/snmp/Forwarder.h
src/snmp/Inquirer.h
src/snmp/Request.h
src/snmp/Response.h
src/snmp_core.h
src/ssl/ErrorDetailManager.cc
src/ssl/PeekingPeerConnector.h
src/ssl/bio.h
src/ssl/context_storage.h
src/store/Controller.h
src/store/Disk.h
src/store/Disks.h
src/store/LocalSearch.cc
src/store/Storage.h
src/tests/CapturingStoreEntry.h
src/tests/TestSwapDir.h
src/tests/stub_ipc_Forwarder.cc
src/tests/stub_libsecurity.cc
src/tests/testACLMaxUserIP.h
src/tests/testCacheManager.h
src/tests/testConfigParser.h
src/tests/testDiskIO.h
src/tests/testEvent.h
src/tests/testEventLoop.cc
src/tests/testHttpReply.h
src/tests/testHttpRequest.h
src/tests/testIcmp.h
src/tests/testPackableStream.h
src/tests/testRefCount.cc
src/tests/testRock.h
src/tests/testStore.h
src/tests/testString.h
src/tests/testURL.h
src/tests/testUriScheme.h
src/tunnel.cc
src/urn.cc
test-suite/VirtualDeleteOperator.cc

index 80085bee58d0b3cd6844f37db77f322a68864626..f7c532a53583c62563d7c767a927e69b06d93890 100644 (file)
@@ -40,7 +40,7 @@ public:
 
 class TrieCaseless : public TrieCharTransform
 {
-    virtual char operator () (char const aChar) const {return tolower(aChar);}
+    char operator () (char const aChar) const override {return tolower(aChar);}
 };
 
 #endif /* __cplusplus */
index 18a4a6a2688e2b74be2aa08c97330f6bf901fd05..e2039d813b061db8e8b935e64d422db1c7931075 100644 (file)
@@ -44,11 +44,11 @@ public:
     typedef RefCount<AccessLogEntry> Pointer;
 
     AccessLogEntry();
-    virtual ~AccessLogEntry();
+    ~AccessLogEntry() override;
 
     /* CodeContext API */
-    virtual std::ostream &detailCodeContext(std::ostream &os) const override;
-    virtual ScopedId codeContextGist() const override;
+    std::ostream &detailCodeContext(std::ostream &os) const override;
+    ScopedId codeContextGist() const override;
 
     /// Fetch the client IP log string into the given buffer.
     /// Knows about several alternate locations of the IP
index cf2b257290c8dad3dd6f4c2e6757eb087baf64f2..e61b013a14f1b3e225921cfe420738342c6fed13 100644 (file)
 // data from a BodyPipe
 class BodySink: public BodyConsumer
 {
-    CBDATA_CLASS(BodySink);
+    CBDATA_CHILD(BodySink);
 
 public:
     BodySink(const BodyPipe::Pointer &bp): AsyncJob("BodySink"), body_pipe(bp) {}
-    virtual ~BodySink() { assert(!body_pipe); }
+    ~BodySink() override { assert(!body_pipe); }
 
-    virtual void noteMoreBodyDataAvailable(BodyPipe::Pointer bp) {
+    void noteMoreBodyDataAvailable(BodyPipe::Pointer bp) override {
         size_t contentSize = bp->buf().contentSize();
         bp->consume(contentSize);
     }
-    virtual void noteBodyProductionEnded(BodyPipe::Pointer) {
+    void noteBodyProductionEnded(BodyPipe::Pointer) override {
         stopConsumingFrom(body_pipe);
     }
-    virtual void noteBodyProducerAborted(BodyPipe::Pointer) {
+    void noteBodyProducerAborted(BodyPipe::Pointer) override {
         stopConsumingFrom(body_pipe);
     }
-    bool doneAll() const {return !body_pipe && AsyncJob::doneAll();}
+    bool doneAll() const override {return !body_pipe && AsyncJob::doneAll();}
 
 private:
     BodyPipe::Pointer body_pipe; ///< the pipe we are consuming from
@@ -51,7 +51,7 @@ public:
                        Parent::Method aHandler, BodyPipe::Pointer bp):
         Parent(aProducer, aHandler, bp) {}
 
-    virtual bool canDial(AsyncCall &call);
+    bool canDial(AsyncCall &call) override;
 };
 
 // The BodyConsumerDialer is an AsyncCall class which used to schedule BodyConsumer calls.
@@ -66,7 +66,7 @@ public:
                        Parent::Method aHandler, BodyPipe::Pointer bp):
         Parent(aConsumer, aHandler, bp) {}
 
-    virtual bool canDial(AsyncCall &call);
+    bool canDial(AsyncCall &call) override;
 };
 
 bool
index 01d10c9bfe92034f7e5469580242e295a33c1747..ccaf38f8da209cc50f7c228b37df2cad7b6711dd 100644 (file)
@@ -25,7 +25,7 @@ public:
     typedef CbcPointer<BodyProducer> Pointer;
 
     BodyProducer():AsyncJob("BodyProducer") {}
-    virtual ~BodyProducer() {}
+    ~BodyProducer() override {}
 
     virtual void noteMoreBodySpaceAvailable(RefCount<BodyPipe> bp) = 0;
     virtual void noteBodyConsumerAborted(RefCount<BodyPipe> bp) = 0;
@@ -45,7 +45,7 @@ public:
     typedef CbcPointer<BodyConsumer> Pointer;
 
     BodyConsumer():AsyncJob("BodyConsumer") {}
-    virtual ~BodyConsumer() {}
+    ~BodyConsumer() override {}
 
     virtual void noteMoreBodyDataAvailable(RefCount<BodyPipe> bp) = 0;
     virtual void noteBodyProductionEnded(RefCount<BodyPipe> bp) = 0;
@@ -103,7 +103,7 @@ public:
 
 public:
     BodyPipe(Producer *aProducer);
-    ~BodyPipe(); // asserts that producer and consumer are cleared
+    ~BodyPipe() override; // asserts that producer and consumer are cleared
 
     void setBodySize(uint64_t aSize); // set body size
     bool bodySizeKnown() const { return theBodySize >= 0; }
index 94f0863047f5aa364f59c10444defffaee66c64d..b70ad0130c5c13373f32f9a071d090ca382c1945 100644 (file)
@@ -27,7 +27,7 @@ public:
 
     ClientDelayPool()
         :   access(nullptr), rate(0), highwatermark(0) {}
-    ~ClientDelayPool();
+    ~ClientDelayPool() override;
     ClientDelayPool(const ClientDelayPool &) = delete;
     ClientDelayPool &operator=(const ClientDelayPool &) = delete;
 
index 8478c2baa3ac9aa7829aa7001e090d5a5903438b..a0623831b35c7dc6292bde4ae3cbdbdeb69a07be 100644 (file)
@@ -36,7 +36,11 @@ class ClientInfo : public hash_link
 
 public:
     explicit ClientInfo(const Ip::Address &);
+#if USE_DELAY_POOLS
+    ~ClientInfo() override;
+#else
     ~ClientInfo();
+#endif
 
     Ip::Address addr;
 
@@ -82,11 +86,11 @@ public:
     void writeOrDequeue();
 
     /* BandwidthBucket API */
-    virtual int quota() override; ///< allocate quota for a just dequeued client
-    virtual bool applyQuota(int &nleft, Comm::IoCallback *state) override;
-    virtual void scheduleWrite(Comm::IoCallback *state) override;
-    virtual void onFdClosed() override;
-    virtual void reduceBucket(int len) override;
+    int quota() override; ///< allocate quota for a just dequeued client
+    bool applyQuota(int &nleft, Comm::IoCallback *state) override;
+    void scheduleWrite(Comm::IoCallback *state) override;
+    void onFdClosed() override;
+    void reduceBucket(int len) override;
 
     void quotaDumpQueue(); ///< dumps quota queue for debugging
 
index a0c891107d3a96bc9439056b3c7365942746989d..5a00e959aeb1ae3d1fd84d3bd0dec28e63214481 100644 (file)
@@ -29,7 +29,7 @@ class ClientRequestContext : public RefCountable
 
 public:
     ClientRequestContext(ClientHttpRequest *);
-    ~ClientRequestContext();
+    ~ClientRequestContext() override;
 
     bool httpStateIsValid();
     void hostHeaderVerify();
index b7bc488a36428a4f49a81d89f849b02d0d15b516..39a3f2218f7757e4c234b5d6f4d527730f4d8ca8 100644 (file)
@@ -176,11 +176,11 @@ class CollapsedForwardingRr: public Ipc::Mem::RegisteredRunner
 public:
     /* RegisteredRunner API */
     CollapsedForwardingRr(): owner(nullptr) {}
-    virtual ~CollapsedForwardingRr();
+    ~CollapsedForwardingRr() override;
 
 protected:
-    virtual void create();
-    virtual void open();
+    void create() override;
+    void open() override;
 
 private:
     Ipc::MultiQueue::Owner *owner;
index 37d9dcf56f4b5f0741a9f6806262e8fe4223b3c2..ac0382ba320d3e8cdb7b58db94b6117cbfb77f49 100644 (file)
@@ -172,12 +172,12 @@ public:
         CommDialerParamsT<Params_>(aJob->toCbdata()),
         method(aMeth) {}
 
-    virtual bool canDial(AsyncCall &c) {
+    bool canDial(AsyncCall &c) override {
         return JobDialer<C>::canDial(c) &&
                this->params.syncWithComm();
     }
 
-    virtual void print(std::ostream &os) const {
+    void print(std::ostream &os) const override {
         os << '(';
         this->params.print(os);
         os << ')';
@@ -187,7 +187,7 @@ public:
     Method method;
 
 protected:
-    virtual void doDial() { ((&(*this->job))->*method)(this->params); }
+    void doDial() override { ((&(*this->job))->*method)(this->params); }
 };
 
 // accept (IOACB) dialer
@@ -203,7 +203,7 @@ public:
 
     void dial();
 
-    virtual void print(std::ostream &os) const;
+    void print(std::ostream &os) const override;
 
 public:
     IOACB *handler;
@@ -219,7 +219,7 @@ public:
     CommConnectCbPtrFun(CNCB *aHandler, const Params &aParams);
     void dial();
 
-    virtual void print(std::ostream &os) const;
+    void print(std::ostream &os) const override;
 
 public:
     CNCB *handler;
@@ -235,7 +235,7 @@ public:
     CommIoCbPtrFun(IOCB *aHandler, const Params &aParams);
     void dial();
 
-    virtual void print(std::ostream &os) const;
+    void print(std::ostream &os) const override;
 
 public:
     IOCB *handler;
@@ -251,7 +251,7 @@ public:
     CommCloseCbPtrFun(CLCB *aHandler, const Params &aParams);
     void dial();
 
-    virtual void print(std::ostream &os) const;
+    void print(std::ostream &os) const override;
 
 public:
     CLCB *handler;
@@ -266,7 +266,7 @@ public:
     CommTimeoutCbPtrFun(CTCB *aHandler, const Params &aParams);
     void dial();
 
-    virtual void print(std::ostream &os) const;
+    void print(std::ostream &os) const override;
 
 public:
     CTCB *handler;
@@ -290,16 +290,16 @@ public:
         AsyncCall(o.debugSection, o.debugLevel, o.name),
         dialer(o.dialer) {}
 
-    ~CommCbFunPtrCallT() {}
+    ~CommCbFunPtrCallT() override {}
 
-    virtual CallDialer* getDialer() { return &dialer; }
+    CallDialer* getDialer() override { return &dialer; }
 
 public:
     Dialer dialer;
 
 protected:
-    inline virtual bool canFire();
-    inline virtual void fire();
+    inline bool canFire() override;
+    inline void fire() override;
 
 private:
     CommCbFunPtrCallT & operator=(const CommCbFunPtrCallT &); // not defined. not permitted.
index e00df8ff2291957a3f076555a25548577a084df8..23a02bb3bcd0e65f35cfaddf41e3dc915f4e9994 100644 (file)
@@ -28,11 +28,11 @@ class CompositePoolNode : public RefCountable, public Updateable
 
 public:
     typedef RefCount<CompositePoolNode> Pointer;
-    virtual ~CompositePoolNode() {}
+    ~CompositePoolNode() override {}
 
     virtual void stats(StoreEntry * sentry) =0;
     virtual void dump(StoreEntry *entry) const =0;
-    virtual void update(int incr) =0;
+    void update(int incr) override =0;
     virtual void parse() = 0;
 
     class CompositeSelectionDetails;
index 4fce80b1a2e6a41fd3ad4a151ed2d1388b11b447..f79301f45f2cde5f1f8227f6bf8b530588b92980 100644 (file)
@@ -68,9 +68,9 @@ class ConfigOptionVector : public ConfigOption
 {
 
 public:
-    virtual ~ConfigOptionVector();
-    virtual bool parse(char const *option, const char *value, int reconfiguring);
-    virtual void dump(StoreEntry * e) const;
+    ~ConfigOptionVector() override;
+    bool parse(char const *option, const char *value, int reconfiguring) override;
+    void dump(StoreEntry * e) const override;
     std::vector<ConfigOption *>options;
 };
 
@@ -81,14 +81,14 @@ class ConfigOptionAdapter : public ConfigOption
 public:
     ConfigOptionAdapter(C& theObject, bool (C::*parseFP)(char const *option, const char *value, int reconfiguring), void (C::*dumpFP)(StoreEntry * e) const) : object(theObject), parser(parseFP), dumper(dumpFP) {}
 
-    bool parse(char const *option, const char *value, int isaReconf) {
+    bool parse(char const *option, const char *value, int isaReconf) override {
         if (parser)
             return (object.*parser)(option, value, isaReconf);
 
         return false;
     }
 
-    void dump(StoreEntry * e) const {
+    void dump(StoreEntry * e) const override {
         if (dumper)
             (object.*dumper)(e);
     }
index e6c0a53e69362b889e9a1b6c0f3e76ab1e202ee3..e0644da7f61d92c74fbfff5ffb98b13067149b8d 100644 (file)
@@ -21,7 +21,7 @@ class DelayIdComposite : public RefCountable
 
 public:
     typedef RefCount<DelayIdComposite> Pointer;
-    virtual inline ~DelayIdComposite() {}
+    inline ~DelayIdComposite() override {}
 
     virtual int bytesWanted (int min, int max) const =0;
     virtual void bytesIn(int qty) = 0;
index 5061bce6c8e67c7f1831ff6cabf6c9056909030c..eb8ec4429a1c9838319fd31021c242de6240eb2c 100644 (file)
@@ -31,7 +31,7 @@ public:
 
     void stats(StoreEntry *)const;
     DelayTaggedBucket(String &aTag);
-    ~DelayTaggedBucket();
+    ~DelayTaggedBucket() override;
     DelayBucket theBucket;
     String tag;
 };
@@ -45,13 +45,13 @@ public:
     typedef RefCount<DelayTagged> Pointer;
 
     DelayTagged();
-    virtual ~DelayTagged();
-    virtual void stats(StoreEntry * sentry);
-    virtual void dump(StoreEntry *entry) const;
-    virtual void update(int incr);
-    virtual void parse();
+    ~DelayTagged() override;
+    void stats(StoreEntry * sentry) override;
+    void dump(StoreEntry *entry) const override;
+    void update(int incr) override;
+    void parse() override;
 
-    virtual DelayIdComposite::Pointer id(CompositeSelectionDetails &);
+    DelayIdComposite::Pointer id(CompositeSelectionDetails &) override;
 
 private:
 
@@ -62,10 +62,10 @@ private:
 
     public:
         Id (RefCount<DelayTagged>, String &);
-        ~Id();
-        virtual int bytesWanted (int min, int max) const;
-        virtual void bytesIn(int qty);
-        virtual void delayRead(const AsyncCallPointer &);
+        ~Id() override;
+        int bytesWanted (int min, int max) const override;
+        void bytesIn(int qty) override;
+        void delayRead(const AsyncCallPointer &) override;
 
     private:
         RefCount<DelayTagged> theTagged;
index 015c4a1fa2b068d6f869a2224efa0fb5fbe45a19..e576faea1dc6e5e5f507d1988999d629c5b7185f 100644 (file)
@@ -31,7 +31,7 @@ public:
 
     void stats(StoreEntry *)const;
     DelayUserBucket(Auth::User::Pointer);
-    ~DelayUserBucket();
+    ~DelayUserBucket() override;
     DelayBucket theBucket;
     Auth::User::Pointer authUser;
 };
@@ -44,13 +44,13 @@ class DelayUser : public CompositePoolNode
 public:
     typedef RefCount<DelayUser> Pointer;
     DelayUser();
-    virtual ~DelayUser();
-    virtual void stats(StoreEntry * sentry);
-    virtual void dump(StoreEntry *entry) const;
-    virtual void update(int incr);
-    virtual void parse();
+    ~DelayUser() override;
+    void stats(StoreEntry * sentry) override;
+    void dump(StoreEntry *entry) const override;
+    void update(int incr) override;
+    void parse() override;
 
-    virtual DelayIdComposite::Pointer id(CompositeSelectionDetails &);
+    DelayIdComposite::Pointer id(CompositeSelectionDetails &) override;
 
 private:
 
@@ -61,9 +61,9 @@ private:
 
     public:
         Id(RefCount<DelayUser>, Auth::User::Pointer);
-        ~Id();
-        virtual int bytesWanted (int min, int max) const;
-        virtual void bytesIn(int qty);
+        ~Id() override;
+        int bytesWanted (int min, int max) const override;
+        void bytesIn(int qty) override;
 
     private:
         RefCount<DelayUser> theUser;
index d0243721b534a51e049226d6dcaca1dbc03d9612..f653612ff06485ca747dc12d212051f7830bb2c9 100644 (file)
@@ -22,13 +22,13 @@ class DelayVector : public CompositePoolNode
 public:
     typedef RefCount<DelayVector> Pointer;
     DelayVector();
-    virtual ~DelayVector();
-    virtual void stats(StoreEntry * sentry);
-    virtual void dump(StoreEntry *entry) const;
-    virtual void update(int incr);
-    virtual void parse();
+    ~DelayVector() override;
+    void stats(StoreEntry * sentry) override;
+    void dump(StoreEntry *entry) const override;
+    void update(int incr) override;
+    void parse() override;
 
-    virtual DelayIdComposite::Pointer id(CompositeSelectionDetails &);
+    DelayIdComposite::Pointer id(CompositeSelectionDetails &) override;
     void push_back (CompositePoolNode::Pointer);
 
 private:
@@ -40,10 +40,10 @@ private:
 
     public:
         Id (RefCount<DelayVector>,CompositeSelectionDetails &);
-        ~Id();
-        virtual int bytesWanted (int min, int max) const;
-        virtual void bytesIn(int qty);
-        virtual void delayRead(const AsyncCallPointer &);
+        ~Id() override;
+        int bytesWanted (int min, int max) const override;
+        void bytesIn(int qty) override;
+        void delayRead(const AsyncCallPointer &) override;
 
     private:
         RefCount<DelayVector> theVector;
index f6b062b042cfdc2ad47068a6d97d61e1e6b142f5..184bf84a24b79723203d6572bf5ef15718664a7d 100644 (file)
@@ -26,25 +26,25 @@ public:
 
     friend class AIODiskIOStrategy;
     AIODiskFile (char const *path, AIODiskIOStrategy *);
-    ~AIODiskFile();
+    ~AIODiskFile() override;
 
     /// \bug the code has this as "IORequestor::Pointer callback"
-    virtual void open(int flags, mode_t mode, RefCount<IORequestor> callback);
+    void open(int flags, mode_t mode, RefCount<IORequestor> callback) override;
 
-    virtual void create (int, mode_t, RefCount<IORequestor>);
-    virtual void read(ReadRequest *);
-    virtual void write(WriteRequest *);
-    virtual void close ();
-    virtual bool canRead() const;
-    virtual bool canWrite() const;
+    void create (int, mode_t, RefCount<IORequestor>) override;
+    void read(ReadRequest *) override;
+    void write(WriteRequest *) override;
+    void close () override;
+    bool canRead() const override;
+    bool canWrite() const override;
 
     /* During migration only */
-    virtual int getFD() const;
+    int getFD() const override;
 
-    virtual bool error() const;
+    bool error() const override;
 
     /* Inform callers if there is IO in progress */
-    virtual bool ioInProgress() const;
+    bool ioInProgress() const override;
 
 private:
     void error(bool const &);
index c9b3e31219f4296408d7ba59b7df2e3f6de71408..193762c9a0f53b5656b56774b5f7b79e977b5dd3 100644 (file)
@@ -19,10 +19,10 @@ class AIODiskIOModule : public DiskIOModule
 public:
     static AIODiskIOModule &GetInstance();
     AIODiskIOModule();
-    virtual void init();
-    virtual void gracefulShutdown();
-    virtual char const *type () const;
-    virtual DiskIOStrategy* createStrategy();
+    void init() override;
+    void gracefulShutdown() override;
+    char const *type () const override;
+    DiskIOStrategy* createStrategy() override;
 
 private:
     static AIODiskIOModule Instance;
index 09f6f37701faf145e27b59e7e0a9a02840c2847c..9d5b3c6c3e6abc37a062bf7c3a1da903003a707f 100644 (file)
@@ -19,30 +19,30 @@ class AIODiskIOStrategy : public DiskIOStrategy
 
 public:
     AIODiskIOStrategy();
-    virtual ~AIODiskIOStrategy();
+    ~AIODiskIOStrategy() override;
 
-    virtual bool shedLoad();
+    bool shedLoad() override;
     /* What is the current load? 999 = 99.9% */
-    virtual int load();
+    int load() override;
     /* Return a handle for performing IO operations */
-    virtual RefCount<DiskFile> newFile (char const *path);
+    RefCount<DiskFile> newFile (char const *path) override;
     /* flush all IO operations  */
-    virtual void sync();
+    void sync() override;
     /** whether the IO Strategy can use unlinkd */
-    virtual bool unlinkdUseful() const;
+    bool unlinkdUseful() const override;
     /* unlink a file by path */
-    virtual void unlinkFile (char const *);
+    void unlinkFile (char const *) override;
 
     /* perform any pending callbacks */
-    virtual int callback();
+    int callback() override;
 
     /* Init per-instance logic */
-    virtual void init();
+    void init() override;
 
     /* cachemgr output on the IO instance stats */
-    virtual void statfs(StoreEntry & sentry)const;
+    void statfs(StoreEntry & sentry)const override;
     /* module specific options */
-    virtual ConfigOption *getOptionTree() const;
+    ConfigOption *getOptionTree() const override;
     /* a file descriptor */
     int fd;
     /* queue of requests */
index 86428552bbdc26b51dd15b095dff6d722d0fb6b9..30035df4b154e7d60dae7b02d91d85a8a7980125 100644 (file)
@@ -17,10 +17,10 @@ class BlockingDiskIOModule : public DiskIOModule
 public:
     static BlockingDiskIOModule &GetInstance();
     BlockingDiskIOModule();
-    virtual void init();
-    virtual void gracefulShutdown();
-    virtual char const *type () const;
-    virtual DiskIOStrategy* createStrategy();
+    void init() override;
+    void gracefulShutdown() override;
+    char const *type () const override;
+    DiskIOStrategy* createStrategy() override;
 
 private:
     static BlockingDiskIOModule Instance;
index 129d63c66d526dee47a1c4aca93246797bd7e783..9cde9b7f8668ac6c255b43dd4bac0c6672142a19 100644 (file)
@@ -22,17 +22,17 @@ class BlockingFile : public DiskFile
 
 public:
     BlockingFile(char const *path);
-    ~BlockingFile();
-    virtual void open(int flags, mode_t mode, RefCount<IORequestor> callback);
-    virtual void create(int flags, mode_t mode, RefCount<IORequestor> callback);
-    virtual void read(ReadRequest *);
-    virtual void write(WriteRequest *);
-    virtual void close();
-    virtual bool error() const;
-    virtual int getFD() const { return fd;}
-
-    virtual bool canRead() const;
-    virtual bool ioInProgress() const;
+    ~BlockingFile() override;
+    void open(int flags, mode_t mode, RefCount<IORequestor> callback) override;
+    void create(int flags, mode_t mode, RefCount<IORequestor> callback) override;
+    void read(ReadRequest *) override;
+    void write(WriteRequest *) override;
+    void close() override;
+    bool error() const override;
+    int getFD() const override { return fd;}
+
+    bool canRead() const override;
+    bool ioInProgress() const override;
 
 private:
     static DRCB ReadDone;
index 1cd9c0bd0c6c47f3a979739ee7aae1fd7f12bc38..1e32c1b75cac7851a74c8d191fa8fb85a75bc0d0 100644 (file)
@@ -16,11 +16,11 @@ class BlockingIOStrategy : public DiskIOStrategy
 {
 
 public:
-    virtual bool shedLoad();
-    virtual int load();
-    virtual RefCount<DiskFile> newFile(char const *path);
-    virtual bool unlinkdUseful() const;
-    virtual void unlinkFile (char const *);
+    bool shedLoad() override;
+    int load() override;
+    RefCount<DiskFile> newFile(char const *path) override;
+    bool unlinkdUseful() const override;
+    void unlinkFile (char const *) override;
 };
 
 #endif /* SQUID_BLOCKINGIOSTRATEGY_H */
index c5fb8dfe475ee0cb40ff90727fa30dae7175cc55..d65a86e392dcfcdeb941982e99103eac7bab7aad 100644 (file)
@@ -17,10 +17,10 @@ class DiskDaemonDiskIOModule : public DiskIOModule
 public:
     static DiskDaemonDiskIOModule &GetInstance();
     DiskDaemonDiskIOModule();
-    virtual void init();
-    virtual void gracefulShutdown();
-    virtual char const *type () const;
-    virtual DiskIOStrategy* createStrategy();
+    void init() override;
+    void gracefulShutdown() override;
+    char const *type () const override;
+    DiskIOStrategy* createStrategy() override;
 
 private:
     static DiskDaemonDiskIOModule Instance;
index d25679524419b3e2b3c45381986562043d49b85b..28ac95680b2676ba92e5e00e165f0121515e762a 100644 (file)
@@ -58,14 +58,14 @@ protected:
 public:
     static Pointer Create(const Mgr::CommandPointer &aCmd);
     /* Action API */
-    virtual void add(const Mgr::Action& action);
-    virtual void pack(Ipc::TypedMsgHdr& hdrMsg) const;
-    virtual void unpack(const Ipc::TypedMsgHdr& hdrMsg);
+    void add(const Mgr::Action& action) override;
+    void pack(Ipc::TypedMsgHdr& hdrMsg) const override;
+    void unpack(const Ipc::TypedMsgHdr& hdrMsg) override;
 
 protected:
     /* Action API */
-    virtual void collect();
-    virtual void dump(StoreEntry* entry);
+    void collect() override;
+    void dump(StoreEntry* entry) override;
 
 private:
     DiskdActionData data;
index 2934498c83dc31e0e477db256db187497164828f..45c4843f812db907ef24aa4caefc88e6265044dc 100644 (file)
@@ -27,15 +27,15 @@ class DiskdFile : public DiskFile
 
 public:
     DiskdFile(char const *path, DiskdIOStrategy *);
-    ~DiskdFile();
-    virtual void open(int flags, mode_t aMode, RefCount<IORequestor> callback);
-    virtual void create(int flags, mode_t aMode, RefCount<IORequestor> callback);
-    virtual void read(ReadRequest *);
-    virtual void write(WriteRequest *);
-    virtual void close();
-    virtual bool error() const;
-    virtual bool canRead() const;
-    virtual bool ioInProgress() const;
+    ~DiskdFile() override;
+    void open(int flags, mode_t aMode, RefCount<IORequestor> callback) override;
+    void create(int flags, mode_t aMode, RefCount<IORequestor> callback) override;
+    void read(ReadRequest *) override;
+    void write(WriteRequest *) override;
+    void close() override;
+    bool error() const override;
+    bool canRead() const override;
+    bool ioInProgress() const override;
 
     /* Temporary */
     int getID() const {return id;}
index af7ba154a781beb19f353b76316a5f62e5482edb..845d126e2ce52ba3c8809e8ddc261b79ecd951d6 100644 (file)
@@ -44,16 +44,16 @@ class DiskdIOStrategy : public DiskIOStrategy
 
 public:
     DiskdIOStrategy();
-    virtual bool shedLoad();
-    virtual int load();
-    virtual RefCount<DiskFile> newFile(char const *path);
-    virtual bool unlinkdUseful() const;
-    virtual void unlinkFile (char const *);
-    virtual ConfigOption *getOptionTree() const;
-    virtual void init();
-    virtual void sync();
-    virtual int callback();
-    virtual void statfs(StoreEntry & sentry) const;
+    bool shedLoad() override;
+    int load() override;
+    RefCount<DiskFile> newFile(char const *path) override;
+    bool unlinkdUseful() const override;
+    void unlinkFile (char const *) override;
+    ConfigOption *getOptionTree() const override;
+    void init() override;
+    void sync() override;
+    int callback() override;
+    void statfs(StoreEntry & sentry) const override;
     int send(int mtype, int id, DiskdFile *theFile, size_t size, off_t offset, ssize_t shm_offset, Lock *requestor);
 
     /** public for accessing return address's */
index cfb722d9e0aeb5c72d852015f3bba00ca8031e35..72e75889c4d510bf6f7540cb98eea22bdea58b89 100644 (file)
@@ -62,25 +62,25 @@ class SingletonIOStrategy : public DiskIOStrategy
 public:
     SingletonIOStrategy(DiskIOStrategy *anIO) : io(anIO) {}
 
-    virtual bool shedLoad() { return io->shedLoad(); }
+    bool shedLoad() override { return io->shedLoad(); }
 
-    virtual int load() { return io->load(); }
+    int load() override { return io->load(); }
 
-    virtual RefCount<DiskFile> newFile (char const *path) {return io->newFile(path); }
+    RefCount<DiskFile> newFile (char const *path) override {return io->newFile(path); }
 
-    virtual void sync() { io->sync(); }
+    void sync() override { io->sync(); }
 
-    virtual bool unlinkdUseful() const { return io->unlinkdUseful(); }
+    bool unlinkdUseful() const override { return io->unlinkdUseful(); }
 
-    virtual void unlinkFile(char const *path) { io->unlinkFile(path); }
+    void unlinkFile(char const *path) override { io->unlinkFile(path); }
 
-    virtual int callback() { return io->callback(); }
+    int callback() override { return io->callback(); }
 
-    virtual void init() { io->init(); }
+    void init() override { io->init(); }
 
-    virtual void statfs(StoreEntry & sentry) const { io->statfs(sentry); }
+    void statfs(StoreEntry & sentry) const override { io->statfs(sentry); }
 
-    virtual ConfigOption *getOptionTree() const { return io->getOptionTree(); }
+    ConfigOption *getOptionTree() const override { return io->getOptionTree(); }
 
 private:
     DiskIOStrategy *io;
index d2689585a0edcb84ee0940da2587025c2fb8527c..3be9b5411afee611ade04b1bfb96bf801c0a3d91 100644 (file)
@@ -22,18 +22,18 @@ class DiskThreadsDiskFile : public DiskFile
 
 public:
     DiskThreadsDiskFile(char const *path);
-    ~DiskThreadsDiskFile();
-    virtual void open(int flags, mode_t mode, RefCount<IORequestor> callback);
-    virtual void create(int flags, mode_t mode, RefCount<IORequestor> callback);
-    virtual void read(ReadRequest *);
-    virtual void write(WriteRequest *);
-    virtual void close();
-    virtual bool error() const;
-    virtual int getFD() const { return fd;}
-
-    virtual bool canRead() const;
-    virtual bool canWrite() const;
-    virtual bool ioInProgress() const;
+    ~DiskThreadsDiskFile() override;
+    void open(int flags, mode_t mode, RefCount<IORequestor> callback) override;
+    void create(int flags, mode_t mode, RefCount<IORequestor> callback) override;
+    void read(ReadRequest *) override;
+    void write(WriteRequest *) override;
+    void close() override;
+    bool error() const override;
+    int getFD() const override { return fd;}
+
+    bool canRead() const override;
+    bool canWrite() const override;
+    bool ioInProgress() const override;
 
 private:
 #if ASYNC_READ
index 6653655f261dd509dfbc1e75349083b40462414c..69974fe05bdcea508a93df1f60c702beddf8e882 100644 (file)
@@ -17,11 +17,11 @@ class DiskThreadsDiskIOModule : public DiskIOModule
 public:
     static DiskThreadsDiskIOModule &GetInstance();
     DiskThreadsDiskIOModule();
-    virtual void init();
+    void init() override;
     //virtual void registerWithCacheManager(void);
-    virtual void gracefulShutdown();
-    virtual char const *type () const;
-    virtual DiskIOStrategy* createStrategy();
+    void gracefulShutdown() override;
+    char const *type () const override;
+    DiskIOStrategy* createStrategy() override;
 
 private:
     static DiskThreadsDiskIOModule Instance;
index 7ebcf74d279865eac1670e8c20f76a4cfaf085b6..f46e674d6220424b715ed8b3be94d5a81ce45452 100644 (file)
@@ -25,14 +25,14 @@ class DiskThreadsIOStrategy : public DiskIOStrategy
 
 public:
     DiskThreadsIOStrategy();
-    virtual bool shedLoad();
-    virtual int load();
-    virtual RefCount<DiskFile> newFile(char const *path);
-    virtual bool unlinkdUseful() const;
-    virtual void unlinkFile (char const *);
-    virtual int callback();
-    virtual void sync();
-    virtual void init();
+    bool shedLoad() override;
+    int load() override;
+    RefCount<DiskFile> newFile(char const *path) override;
+    bool unlinkdUseful() const override;
+    void unlinkFile (char const *) override;
+    int callback() override;
+    void sync() override;
+    void init() override;
     void done();
     /* Todo: add access limitations */
     bool initialised;
index cd73930c1bd06bd5df2d525e37babb135df01e62..305a0e6be07ace2e94f62c6fddd55f3d8020d274 100644 (file)
@@ -17,10 +17,10 @@ class IpcIoDiskIOModule : public DiskIOModule
 public:
     static IpcIoDiskIOModule &GetInstance();
     IpcIoDiskIOModule();
-    virtual void init();
-    virtual void gracefulShutdown();
-    virtual char const *type () const;
-    virtual DiskIOStrategy* createStrategy();
+    void init() override;
+    void gracefulShutdown() override;
+    char const *type () const override;
+    DiskIOStrategy* createStrategy() override;
 
 private:
     static IpcIoDiskIOModule Instance;
index 0d8e947746df25caf42b646fa04ed6dbfb7f1e63..04e85c42d0a265e04f4aa89e56402fc0b4ea45bc 100644 (file)
@@ -1015,12 +1015,12 @@ class IpcIoRr: public Ipc::Mem::RegisteredRunner
 public:
     /* RegisteredRunner API */
     IpcIoRr(): owner(nullptr) {}
-    virtual ~IpcIoRr();
-    virtual void claimMemoryNeeds();
+    ~IpcIoRr() override;
+    void claimMemoryNeeds() override;
 
 protected:
     /* Ipc::Mem::RegisteredRunner API */
-    virtual void create();
+    void create() override;
 
 private:
     Ipc::FewToFewBiQueue::Owner *owner;
index 665f0d33e127929017d2cf8625da9c32c2a53963..56a2f15252069c734b6ebc17bd6aae796dd2e2e9 100644 (file)
@@ -71,20 +71,20 @@ public:
     typedef RefCount<IpcIoFile> Pointer;
 
     IpcIoFile(char const *aDb);
-    virtual ~IpcIoFile();
+    ~IpcIoFile() override;
 
     /* DiskFile API */
-    virtual void configure(const Config &cfg);
-    virtual void open(int flags, mode_t mode, RefCount<IORequestor> callback);
-    virtual void create(int flags, mode_t mode, RefCount<IORequestor> callback);
-    virtual void read(ReadRequest *);
-    virtual void write(WriteRequest *);
-    virtual void close();
-    virtual bool error() const;
-    virtual int getFD() const;
-    virtual bool canRead() const;
-    virtual bool canWrite() const;
-    virtual bool ioInProgress() const;
+    void configure(const Config &cfg) override;
+    void open(int flags, mode_t mode, RefCount<IORequestor> callback) override;
+    void create(int flags, mode_t mode, RefCount<IORequestor> callback) override;
+    void read(ReadRequest *) override;
+    void write(WriteRequest *) override;
+    void close() override;
+    bool error() const override;
+    int getFD() const override;
+    bool canRead() const override;
+    bool canWrite() const override;
+    bool ioInProgress() const override;
 
     /// handle open response from coordinator
     static void HandleOpenResponse(const Ipc::StrandMessage &);
index 7ba6b7acb8be142fb5f6098098bfa94270eb2864..b075d82b85ae19e942d9840fd5411d8261ee2cd3 100644 (file)
@@ -14,11 +14,11 @@ class IpcIoIOStrategy : public DiskIOStrategy
 {
 
 public:
-    virtual bool shedLoad();
-    virtual int load();
-    virtual RefCount<DiskFile> newFile(char const *path);
-    virtual bool unlinkdUseful() const;
-    virtual void unlinkFile (char const *);
+    bool shedLoad() override;
+    int load() override;
+    RefCount<DiskFile> newFile(char const *path) override;
+    bool unlinkdUseful() const override;
+    void unlinkFile (char const *) override;
 };
 
 #endif /* SQUID_IPC_IOIOSTRATEGY_H */
index 574bf5b81a1bf8229775db31e2da7743ed19ce18..57370410f3dfc43d2a3c964fb844f3cfbae60a4f 100644 (file)
@@ -17,10 +17,10 @@ class MmappedDiskIOModule : public DiskIOModule
 public:
     static MmappedDiskIOModule &GetInstance();
     MmappedDiskIOModule();
-    virtual void init();
-    virtual void gracefulShutdown();
-    virtual char const *type () const;
-    virtual DiskIOStrategy* createStrategy();
+    void init() override;
+    void gracefulShutdown() override;
+    char const *type () const override;
+    DiskIOStrategy* createStrategy() override;
 
 private:
     static MmappedDiskIOModule Instance;
index c7c6796feebbdde3924a568801674c49499d40a9..806c262dd0b6ff6376344630ddf9b113f45b02f0 100644 (file)
@@ -19,18 +19,18 @@ class MmappedFile : public DiskFile
 
 public:
     MmappedFile(char const *path);
-    ~MmappedFile();
-    virtual void open(int flags, mode_t mode, RefCount<IORequestor> callback);
-    virtual void create(int flags, mode_t mode, RefCount<IORequestor> callback);
-    virtual void read(ReadRequest *);
-    virtual void write(WriteRequest *);
-    virtual void close();
-    virtual bool error() const;
-    virtual int getFD() const { return fd;}
-
-    virtual bool canRead() const;
-    virtual bool canWrite() const;
-    virtual bool ioInProgress() const;
+    ~MmappedFile() override;
+    void open(int flags, mode_t mode, RefCount<IORequestor> callback) override;
+    void create(int flags, mode_t mode, RefCount<IORequestor> callback) override;
+    void read(ReadRequest *) override;
+    void write(WriteRequest *) override;
+    void close() override;
+    bool error() const override;
+    int getFD() const override { return fd;}
+
+    bool canRead() const override;
+    bool canWrite() const override;
+    bool ioInProgress() const override;
 
 private:
     char const *path_;
index 3479f187ee3d111d5f5b7bff30dfcfa3e1e5faa8..5e978dbb38da75be6b47d5816140e4a5bcd3b88f 100644 (file)
@@ -14,11 +14,11 @@ class MmappedIOStrategy : public DiskIOStrategy
 {
 
 public:
-    virtual bool shedLoad();
-    virtual int load();
-    virtual RefCount<DiskFile> newFile(char const *path);
-    virtual bool unlinkdUseful() const;
-    virtual void unlinkFile (char const *);
+    bool shedLoad() override;
+    int load() override;
+    RefCount<DiskFile> newFile(char const *path) override;
+    bool unlinkdUseful() const override;
+    void unlinkFile (char const *) override;
 };
 
 #endif /* SQUID_MMAPPEDIOSTRATEGY_H */
index 9c57cc224f8e697cdf0a11665630c93030a2dd1d..df6a3c4a84178170ca830d7fd18cc49bf8683ef8 100644 (file)
@@ -19,7 +19,7 @@ class ReadRequest : public RefCountable
 public:
     typedef RefCount<ReadRequest> Pointer;
     ReadRequest(char *buf, off_t offset, size_t len);
-    virtual ~ReadRequest() {}
+    ~ReadRequest() override {}
 
     char *buf;
     off_t offset;
index 9f3b60d69ee531b8c44fe25dbdec8cd4428de7a5..1af44ab210d62b1e2ea59bce0ee8101722ce6e8e 100644 (file)
@@ -20,7 +20,7 @@ class WriteRequest : public RefCountable
 public:
     typedef RefCount<WriteRequest> Pointer;
     WriteRequest(char const *buf, off_t offset, size_t len, FREE *);
-    virtual ~WriteRequest() {}
+    ~WriteRequest() override {}
 
     char const *buf;
     off_t offset;
index e3228a888c20ffd00ce9e1d5a5344a1ed5f603b5..e890640d9b4897f1491d7d86730cb97ee1dae846 100644 (file)
@@ -29,7 +29,7 @@ public:
     typedef RefCount<DownloaderContext> Pointer;
 
     DownloaderContext(Downloader *dl, ClientHttpRequest *h);
-    ~DownloaderContext();
+    ~DownloaderContext() override;
     void finished();
 
     CbcPointer<Downloader> downloader;
index ec06b2ffdf2041e4b40d10742caedfa3450d4572..48478bfb03a0cee50a8480bdf1d0c1cfb8e3a2eb 100644 (file)
@@ -44,13 +44,13 @@ std::ostream &operator <<(std::ostream &, const DownloaderAnswer &);
 /// certificate chains.
 class Downloader: virtual public AsyncJob
 {
-    CBDATA_CLASS(Downloader);
+    CBDATA_CHILD(Downloader);
 public:
     using Answer = DownloaderAnswer;
 
     Downloader(const SBuf &url, const AsyncCallback<Answer> &, const MasterXactionPointer &, unsigned int level = 0);
-    virtual ~Downloader();
-    virtual void swanSong();
+    ~Downloader() override;
+    void swanSong() override;
 
     /// delays destruction to protect doCallouts()
     void downloadFinished();
@@ -63,8 +63,8 @@ public:
 protected:
 
     /* AsyncJob API */
-    virtual bool doneAll() const;
-    virtual void start();
+    bool doneAll() const override;
+    void start() override;
 
 private:
 
index 1f6e74877741a04ee94be58927ad9a0f7c683091..c340bf974b129dabf4258336d96442521eeb5374 100644 (file)
@@ -21,7 +21,7 @@ class ExternalACLLookup : public ACLChecklist::AsyncState
 
 public:
     static ExternalACLLookup *Instance();
-    virtual void checkForAsync(ACLChecklist *)const;
+    void checkForAsync(ACLChecklist *)const override;
 
     // If possible, starts an asynchronous lookup of an external ACL.
     // Otherwise, asserts (or bails if background refresh is requested).
@@ -42,21 +42,21 @@ public:
     static void ExternalAclLookup(ACLChecklist * ch, ACLExternal *);
 
     ACLExternal(char const *);
-    ~ACLExternal();
+    ~ACLExternal() override;
 
-    virtual char const *typeString() const;
-    virtual void parse();
-    virtual int match(ACLChecklist *checklist);
+    char const *typeString() const override;
+    void parse() override;
+    int match(ACLChecklist *checklist) override;
     /* This really should be dynamic based on the external class defn */
-    virtual bool requiresAle() const {return true;}
-    virtual bool requiresRequest() const {return true;}
+    bool requiresAle() const override {return true;}
+    bool requiresRequest() const override {return true;}
 
     /* when requiresRequest is made dynamic, review this too */
     //    virtual bool requiresReply() const {return true;}
-    virtual bool isProxyAuth() const;
-    virtual SBufList dump() const;
-    virtual bool valid () const;
-    virtual bool empty () const;
+    bool isProxyAuth() const override;
+    SBufList dump() const override;
+    bool valid () const override;
+    bool empty () const override;
 
 protected:
     external_acl_data *data;
index f04b60453c123e3a79808e83fd96a8557b082a0d..ace7100453ca09786fe66d45022d212db3d10382 100644 (file)
@@ -57,7 +57,7 @@ class ExternalACLEntry: public hash_link, public RefCountable
 
 public:
     ExternalACLEntry();
-    ~ExternalACLEntry();
+    ~ExternalACLEntry() override;
 
     void update(ExternalACLEntryData const &);
     dlink_node lru;
index e9a907d36e9d9182eedd22e32ec26c859daedc49..75d4150610e9b38ea2cf950e76dc97dae6b3b291 100644 (file)
@@ -55,7 +55,7 @@ class FwdState: public RefCountable, public PeerSelectionInitiator
 
 public:
     typedef RefCount<FwdState> Pointer;
-    virtual ~FwdState();
+    ~FwdState() override;
     static void initModule();
 
     /// Initiates request forwarding to a peer or origin server.
@@ -110,8 +110,8 @@ private:
     void stopAndDestroy(const char *reason);
 
     /* PeerSelectionInitiator API */
-    virtual void noteDestination(Comm::ConnectionPointer conn) override;
-    virtual void noteDestinationsEnd(ErrorState *selectionError) override;
+    void noteDestination(Comm::ConnectionPointer conn) override;
+    void noteDestinationsEnd(ErrorState *selectionError) override;
 
     bool transporting() const;
 
index 1beca7cc5eb10a8383b86ddc763192482d19952d..8607455ba4e130d7efb78c0f442b5cdceb18dd2f 100644 (file)
@@ -101,11 +101,11 @@ public:
     PrimeChanceGiver(): HappyOrderEnforcer("happy_eyeballs_connect_timeout enforcement") {}
 
     /* HappyOrderEnforcer API */
-    virtual bool readyNow(const HappyConnOpener &job) const override;
+    bool readyNow(const HappyConnOpener &job) const override;
 
 private:
     /* HappyOrderEnforcer API */
-    virtual AsyncCall::Pointer notify(const CbcPointer<HappyConnOpener> &) override;
+    AsyncCall::Pointer notify(const CbcPointer<HappyConnOpener> &) override;
 };
 
 /// enforces happy_eyeballs_connect_gap and happy_eyeballs_connect_limit
@@ -115,7 +115,7 @@ public:
     SpareAllowanceGiver(): HappyOrderEnforcer("happy_eyeballs_connect_gap/happy_eyeballs_connect_limit enforcement") {}
 
     /* HappyOrderEnforcer API */
-    virtual bool readyNow(const HappyConnOpener &job) const override;
+    bool readyNow(const HappyConnOpener &job) const override;
 
     /// reacts to HappyConnOpener discovering readyNow() conditions for a spare path
     /// the caller must attempt to open a spare connection immediately
@@ -129,7 +129,7 @@ public:
 
 private:
     /* HappyOrderEnforcer API */
-    virtual AsyncCall::Pointer notify(const CbcPointer<HappyConnOpener> &) override;
+    AsyncCall::Pointer notify(const CbcPointer<HappyConnOpener> &) override;
 
     bool concurrencyLimitReached() const;
     void recordAllowance();
index fbde2162853c45cb039cb17de28a4948db0a7971..e2e8b2491949c48ec7a0bb5bb9ff5aa0dab67098 100644 (file)
@@ -107,7 +107,7 @@ public:
 
 public:
     HappyConnOpener(const ResolvedPeersPointer &, const AsyncCallback<Answer> &, const HttpRequestPointer &, time_t aFwdStart, int tries, const AccessLogEntryPointer &);
-    virtual ~HappyConnOpener() override;
+    ~HappyConnOpener() override;
 
     /// configures reuse of old connections
     void allowPersistent(bool permitted) { allowPconn_ = permitted; }
@@ -158,10 +158,10 @@ private:
     friend std::ostream &operator <<(std::ostream &, const Attempt &);
 
     /* AsyncJob API */
-    virtual void start() override;
-    virtual bool doneAll() const override;
-    virtual void swanSong() override;
-    virtual const char *status() const override;
+    void start() override;
+    bool doneAll() const override;
+    void swanSong() override;
+    const char *status() const override;
 
     void maybeOpenPrimeConnection();
     void maybeOpenSpareConnection();
index 6f44ef527c64eda281ab54691fbd006adcfb141c..d1b545a114f4828d5c23b0e9e47718ee2fed4fce 100644 (file)
@@ -29,12 +29,12 @@ public:
     typedef RefCount<HttpReply> Pointer;
 
     HttpReply();
-    ~HttpReply();
+    ~HttpReply() override;
 
-    virtual void reset();
+    void reset() override;
 
     /* Http::Message API */
-    virtual bool sanityCheckStartLine(const char *buf, const size_t hdr_len, Http::StatusCode *error);
+    bool sanityCheckStartLine(const char *buf, const size_t hdr_len, Http::StatusCode *error) override;
 
     /** \par public, readable; never update these or their .hdr equivalents directly */
     time_t date;
@@ -62,11 +62,11 @@ public:
     bool do_clean;
 
 public:
-    virtual int httpMsgParseError();
+    int httpMsgParseError() override;
 
-    virtual bool expectingBody(const HttpRequestMethod&, int64_t&) const;
+    bool expectingBody(const HttpRequestMethod&, int64_t&) const override;
 
-    virtual bool inheritProperties(const Http::Message *);
+    bool inheritProperties(const Http::Message *) override;
 
     /// \returns nil (if no updates are necessary)
     /// \returns a new reply combining this reply with 304 updates (otherwise)
@@ -110,9 +110,9 @@ public:
     /** Clone this reply.
      *  Could be done as a copy-contructor but we do not want to accidentally copy a HttpReply..
      */
-    HttpReply *clone() const;
+    HttpReply *clone() const override;
 
-    virtual void hdrCacheInit();
+    void hdrCacheInit() override;
 
     /// whether our Date header value is smaller than theirs
     /// \returns false if any information is missing
@@ -121,7 +121,7 @@ public:
     /// Some response status codes prohibit sending Content-Length (RFC 7230 section 3.3.2).
     void removeIrrelevantContentLength();
 
-    virtual void configureContentLengthInterpreter(Http::ContentLengthInterpreter &);
+    void configureContentLengthInterpreter(Http::ContentLengthInterpreter &) override;
     /// parses reply header using Parser
     bool parseHeader(Http1::Parser &hp);
 
@@ -152,9 +152,9 @@ private:
     HttpHdrContRange *content_range; ///< parsed Content-Range; nil for non-206 responses!
 
 protected:
-    virtual void packFirstLineInto(Packable * p, bool) const { sline.packInto(p); }
+    void packFirstLineInto(Packable * p, bool) const override { sline.packInto(p); }
 
-    virtual bool parseFirstLine(const char *start, const char *end);
+    bool parseFirstLine(const char *start, const char *end) override;
 };
 
 #endif /* SQUID_HTTPREPLY_H */
index 98aeea9b56edde9c2f3471cc785614b36e268d8f..7a2280fa410f516a32aa9d6d0be9c67ce7ee9812 100644 (file)
@@ -54,12 +54,12 @@ public:
 
     HttpRequest(const MasterXaction::Pointer &);
     HttpRequest(const HttpRequestMethod& aMethod, AnyP::ProtocolType aProtocol, const char *schemeImage, const char *aUrlpath, const MasterXaction::Pointer &);
-    ~HttpRequest();
-    virtual void reset();
+    ~HttpRequest() override;
+    void reset() override;
 
     void initHTTP(const HttpRequestMethod& aMethod, AnyP::ProtocolType aProtocol, const char *schemeImage, const char *aUrlpath);
 
-    virtual HttpRequest *clone() const;
+    HttpRequest *clone() const override;
 
     /// Whether response to this request is potentially cachable
     /// \retval false  Not cacheable.
@@ -196,9 +196,9 @@ public:
 public:
     bool multipartRangeRequest() const;
 
-    bool parseFirstLine(const char *start, const char *end);
+    bool parseFirstLine(const char *start, const char *end) override;
 
-    virtual bool expectingBody(const HttpRequestMethod& unused, int64_t&) const;
+    bool expectingBody(const HttpRequestMethod& unused, int64_t&) const override;
 
     bool bodyNibbled() const; // the request has a [partially] consumed body
 
@@ -246,7 +246,7 @@ public:
     NotePairs::Pointer notes();
     bool hasNotes() const { return bool(theNotes) && !theNotes->empty(); }
 
-    virtual void configureContentLengthInterpreter(Http::ContentLengthInterpreter &) {}
+    void configureContentLengthInterpreter(Http::ContentLengthInterpreter &) override {}
 
     /// Check whether the message framing headers are valid.
     /// \returns Http::scNone or an HTTP error status
@@ -266,13 +266,13 @@ private:
     /// and(or) by annotate_transaction/annotate_client ACLs.
     NotePairs::Pointer theNotes;
 protected:
-    virtual void packFirstLineInto(Packable * p, bool full_uri) const;
+    void packFirstLineInto(Packable * p, bool full_uri) const override;
 
-    virtual bool sanityCheckStartLine(const char *buf, const size_t hdr_len, Http::StatusCode *error);
+    bool sanityCheckStartLine(const char *buf, const size_t hdr_len, Http::StatusCode *error) override;
 
-    virtual void hdrCacheInit();
+    void hdrCacheInit() override;
 
-    virtual bool inheritProperties(const Http::Message *);
+    bool inheritProperties(const Http::Message *) override;
 };
 
 class ConnStateData;
index c0e898d97f2cb319019e38d2e5aa9a85132c4933..f86f81fb2afd2366fee78fbe430c5ed4939db95c 100644 (file)
--- a/src/ICP.h
+++ b/src/ICP.h
@@ -63,7 +63,7 @@ class ICPState: public StoreClient
 
 public:
     ICPState(icp_common_t &aHeader, HttpRequest *aRequest);
-    virtual ~ICPState();
+    ~ICPState() override;
 
     /// whether the cache contains the requested entry
     bool isHit() const;
@@ -78,8 +78,8 @@ public:
 
 protected:
     /* StoreClient API */
-    virtual LogTags *loggingTags() const override;
-    virtual void fillChecklist(ACLFilledChecklist &) const override;
+    LogTags *loggingTags() const override;
+    void fillChecklist(ACLFilledChecklist &) const override;
 
     /// either confirms and starts processing a cache hit or returns false
     bool confirmAndPrepHit(const StoreEntry &) const;
index 61c05e19fda30ab9154a6b06411bf3f3d7eea419..316159ddd8239978a507e50c317373ce80bb1a9d 100644 (file)
@@ -32,7 +32,7 @@ public:
         capacity(0),
         stolen(0)
     {}
-    virtual ~MemBuf() {
+    ~MemBuf() override {
         if (!stolen && buf)
             clean();
     }
@@ -109,8 +109,8 @@ public:
     FREE *freeFunc();
 
     /* Packable API */
-    virtual void append(const char *c, int sz);
-    virtual void vappendf(const char *fmt, va_list ap);
+    void append(const char *c, int sz) override;
+    void vappendf(const char *fmt, va_list ap) override;
 
 private:
     /**
index 68b2585c66481a7d939fb2a55a409a68210d50dc..09d4197a335b455aff6858c718fee3fd6057f830 100644 (file)
@@ -38,8 +38,8 @@ public:
     ShmWriter(MemStore &aStore, StoreEntry *anEntry, const sfileno aFileNo, Ipc::StoreMapSliceId aFirstSlice = -1);
 
     /* Packable API */
-    virtual void append(const char *aBuf, int aSize) override;
-    virtual void vappendf(const char *fmt, va_list ap) override;
+    void append(const char *aBuf, int aSize) override;
+    void vappendf(const char *fmt, va_list ap) override;
 
 public:
     StoreEntry *entry; ///< the entry being updated
@@ -973,14 +973,14 @@ class MemStoreRr: public Ipc::Mem::RegisteredRunner
 public:
     /* RegisteredRunner API */
     MemStoreRr(): spaceOwner(nullptr), mapOwner(nullptr), extrasOwner(nullptr) {}
-    virtual void finalizeConfig();
-    virtual void claimMemoryNeeds();
-    virtual void useConfig();
-    virtual ~MemStoreRr();
+    void finalizeConfig() override;
+    void claimMemoryNeeds() override;
+    void useConfig() override;
+    ~MemStoreRr() override;
 
 protected:
     /* Ipc::Mem::RegisteredRunner API */
-    virtual void create();
+    void create() override;
 
 private:
     Ipc::Mem::Owner<Ipc::Mem::PageStack> *spaceOwner; ///< free slices Owner
index 7c94a33f768add801db7ab2a65834cffda95f74d..d9878a76b569ae7a536e1849daf117ea229942c6 100644 (file)
@@ -30,7 +30,7 @@ class MemStore: public Store::Controlled, public Ipc::StoreMapCleaner
 {
 public:
     MemStore();
-    virtual ~MemStore();
+    ~MemStore() override;
 
     /// whether e should be kept in local RAM for possible future caching
     bool keepInLocalMemory(const StoreEntry &e) const;
@@ -45,24 +45,24 @@ public:
     void disconnect(StoreEntry &e);
 
     /* Storage API */
-    virtual void create() override {}
-    virtual void init() override;
-    virtual StoreEntry *get(const cache_key *) override;
-    virtual uint64_t maxSize() const override;
-    virtual uint64_t minSize() const override;
-    virtual uint64_t currentSize() const override;
-    virtual uint64_t currentCount() const override;
-    virtual int64_t maxObjectSize() const override;
-    virtual void getStats(StoreInfoStats &stats) const override;
-    virtual void stat(StoreEntry &e) const override;
-    virtual void reference(StoreEntry &e) override;
-    virtual bool dereference(StoreEntry &e) override;
-    virtual void updateHeaders(StoreEntry *e) override;
-    virtual void maintain() override;
-    virtual bool anchorToCache(StoreEntry &) override;
-    virtual bool updateAnchored(StoreEntry &) override;
-    virtual void evictCached(StoreEntry &) override;
-    virtual void evictIfFound(const cache_key *) override;
+    void create() override {}
+    void init() override;
+    StoreEntry *get(const cache_key *) override;
+    uint64_t maxSize() const override;
+    uint64_t minSize() const override;
+    uint64_t currentSize() const override;
+    uint64_t currentCount() const override;
+    int64_t maxObjectSize() const override;
+    void getStats(StoreInfoStats &stats) const override;
+    void stat(StoreEntry &e) const override;
+    void reference(StoreEntry &e) override;
+    bool dereference(StoreEntry &e) override;
+    void updateHeaders(StoreEntry *e) override;
+    void maintain() override;
+    bool anchorToCache(StoreEntry &) override;
+    bool updateAnchored(StoreEntry &) override;
+    void evictCached(StoreEntry &) override;
+    void evictIfFound(const cache_key *) override;
 
     /// whether Squid is correctly configured to use a shared memory cache
     static bool Enabled() { return EntryLimit() > 0; }
@@ -92,7 +92,7 @@ protected:
     sfileno reserveSapForWriting(Ipc::Mem::PageId &page);
 
     // Ipc::StoreMapCleaner API
-    virtual void noteFreeMapSlice(const Ipc::StoreMapSliceId sliceId) override;
+    void noteFreeMapSlice(const Ipc::StoreMapSliceId sliceId) override;
 
 private:
     // TODO: move freeSlots into map
index 524001d703739dc9fd81acf8c416932e48e2a631..156d9663b1be2315353be378b51f483ee6a70424 100644 (file)
@@ -27,9 +27,9 @@ public:
     MessageBucket(const int speed, const int initialLevelPercent, const double sizeLimit, MessageDelayPool::Pointer pool);
 
     /* BandwidthBucket API */
-    virtual int quota() override;
-    virtual void scheduleWrite(Comm::IoCallback *state) override;
-    virtual void reduceBucket(int len) override;
+    int quota() override;
+    void scheduleWrite(Comm::IoCallback *state) override;
+    void reduceBucket(int len) override;
 
 private:
     MessageDelayPool::Pointer theAggregate;
index 36bf64abf5d82aa426cb84871d0ff845ce4f0576..2c79b65baea8ddc101cfc2f331bac3933b9a0793 100644 (file)
@@ -30,7 +30,7 @@ public:
 
     MessageDelayPool(const SBuf &name, int64_t bucketSpeed, int64_t bucketSize,
                      int64_t aggregateSpeed, int64_t aggregateSize, uint16_t initialBucketPercent);
-    ~MessageDelayPool();
+    ~MessageDelayPool() override;
     MessageDelayPool(const MessageDelayPool &) = delete;
     MessageDelayPool &operator=(const MessageDelayPool &) = delete;
 
index 46e27e2342aaf9c062955ac5cb7341db51df6904..9b279e4f811172227600e0e6ec537671a01be17d 100644 (file)
@@ -47,7 +47,7 @@ public:
         enum Method { mhReplace, mhAppend };
 
         Value(const char *aVal, const bool quoted, const char *descr, const Method method = mhReplace);
-        ~Value();
+        ~Value() override;
         Value(const Value&) = delete;
         Value &operator=(const Value&) = delete;
 
@@ -116,7 +116,7 @@ public:
 
     explicit Notes(const char *aDescr, const Keys *extraReservedKeys = nullptr, bool allowFormatted = true);
     Notes() = default;
-    ~Notes() { notes.clear(); }
+    ~Notes() override { notes.clear(); }
     Notes(const Notes&) = delete;
     Notes &operator=(const Notes&) = delete;
 
index 1e1ab192bb4d53d8d91d09c87db4d2e97b84c4b4..31b1adfc5cb0ae0e53c29358af920a066d3720aa 100644 (file)
@@ -19,9 +19,9 @@ class NullDelayId : public DelayIdComposite
     MEMPROXY_CLASS(NullDelayId);
 
 public:
-    virtual int bytesWanted (int minimum, int maximum) const {return max(minimum,maximum);}
+    int bytesWanted (int minimum, int maximum) const override {return max(minimum,maximum);}
 
-    virtual void bytesIn(int) {}
+    void bytesIn(int) override {}
 };
 #endif
 #endif /* NULLDELAYID_H */
index 6ec043665cc90ed1abc67b2478d8dae0a469c4eb..263faaa5fe7faa217e9b5565288f66f7e262c5af 100644 (file)
@@ -235,8 +235,8 @@ class PeerPoolMgrsRr: public RegisteredRunner
 {
 public:
     /* RegisteredRunner API */
-    virtual void useConfig() { syncConfig(); }
-    virtual void syncConfig();
+    void useConfig() override { syncConfig(); }
+    void syncConfig() override;
 };
 
 RunnerRegistrationEntry(PeerPoolMgrsRr);
index 6da61b10bc0a4d8e509bab133695b62c87a544a2..dbc6ce8803ad79e4465a6351e1c418147bd65ce5 100644 (file)
@@ -21,7 +21,7 @@ class CommConnectCbParams;
 /// Maintains an fixed-size "standby" PconnPool for a single CachePeer.
 class PeerPoolMgr: public AsyncJob
 {
-    CBDATA_CLASS(PeerPoolMgr);
+    CBDATA_CHILD(PeerPoolMgr);
 
 public:
     typedef CbcPointer<PeerPoolMgr> Pointer;
@@ -30,13 +30,13 @@ public:
     static void Checkpoint(const Pointer &mgr, const char *reason);
 
     explicit PeerPoolMgr(CachePeer *aPeer);
-    virtual ~PeerPoolMgr();
+    ~PeerPoolMgr() override;
 
 protected:
     /* AsyncJob API */
-    virtual void start();
-    virtual void swanSong();
-    virtual bool doneAll() const;
+    void start() override;
+    void swanSong() override;
+    bool doneAll() const override;
 
     /// whether the peer is still out there and in a valid state we can safely use
     bool validPeer() const;
index 914b2c9bca6157949b94e5ba538d30bd188b50cd..40a5bd34ef28e45becd05eebf7eab51823419737 100644 (file)
@@ -32,7 +32,7 @@ void peerSelectInit(void);
 class PeerSelectionInitiator: public CbdataParent
 {
 public:
-    virtual ~PeerSelectionInitiator() = default;
+    ~PeerSelectionInitiator() override = default;
 
     /// called when a new unique destination has been found
     virtual void noteDestination(Comm::ConnectionPointer path) = 0;
@@ -62,12 +62,12 @@ class PeerSelector: public Dns::IpReceiver
 
 public:
     explicit PeerSelector(PeerSelectionInitiator*);
-    virtual ~PeerSelector() override;
+    ~PeerSelector() override;
 
     /* Dns::IpReceiver API */
-    virtual void noteIp(const Ip::Address &ip) override;
-    virtual void noteIps(const Dns::CachedIps *ips, const Dns::LookupDetails &details) override;
-    virtual void noteLookup(const Dns::LookupDetails &details) override;
+    void noteIp(const Ip::Address &ip) override;
+    void noteIps(const Dns::CachedIps *ips, const Dns::LookupDetails &details) override;
+    void noteLookup(const Dns::LookupDetails &details) override;
 
     // Produce a URL for display identifying the transaction we are
     // trying to locate a peer for.
index 4ae3989659f2642459711a9cfa107ddf3995160e..d878d39893c23f6391b4e2eb914a9483338b5adb 100644 (file)
@@ -26,14 +26,14 @@ public:
 protected:
     explicit SBufStatsAction(const Mgr::CommandPointer &cmd);
     /* Mgr::Action API */
-    virtual void collect();
-    virtual void dump(StoreEntry* entry);
+    void collect() override;
+    void dump(StoreEntry* entry) override;
 
 private:
     /* Mgr::Action API */
-    virtual void add(const Mgr::Action& action);
-    virtual void pack(Ipc::TypedMsgHdr& msg) const;
-    virtual void unpack(const Ipc::TypedMsgHdr& msg);
+    void add(const Mgr::Action& action) override;
+    void pack(Ipc::TypedMsgHdr& msg) const override;
+    void unpack(const Ipc::TypedMsgHdr& msg) override;
 
     SBufStats sbdata;
     MemBlobStats mbdata;
index 15102c12d339916f813c0e4587857f5c4d76a997..f1c7dcaf138057d6ed6448a13ee979847a485abb 100644 (file)
@@ -46,7 +46,7 @@ public:
 
     const char *getMD5Text() const;
     StoreEntry();
-    virtual ~StoreEntry();
+    ~StoreEntry() override;
 
     MemObject &mem() { assert(mem_obj); return *mem_obj; }
     const MemObject &mem() const { assert(mem_obj); return *mem_obj; }
@@ -297,10 +297,10 @@ public:
 #endif
 
     /* Packable API */
-    virtual void append(char const *, int);
-    virtual void vappendf(const char *, va_list);
-    virtual void buffer();
-    virtual void flush();
+    void append(char const *, int) override;
+    void vappendf(const char *, va_list) override;
+    void buffer() override;
+    void flush() override;
 
 protected:
     typedef Store::EntryGuard EntryGuard;
index e6f01a31a9866816be0630a9dbbc6feb866f8738..111bcc41606c2bb27eef565a6146d05384791257 100644 (file)
@@ -27,7 +27,7 @@ class StoreClient: public Acl::ChecklistFiller
 {
 
 public:
-    virtual ~StoreClient () {}
+    ~StoreClient () override {}
 
     /// \return LogTags (if the class logs transactions) or nil (otherwise)
     virtual LogTags *loggingTags() const = 0;
index d335f360746655af075317928119a9b7090abee3..88f21364419d878b53302ebfc7faf073a9f6b13f 100644 (file)
@@ -55,7 +55,7 @@ public:
     void operator delete (void *address);
 
     StoreIOState(StoreIOState::STFNCB *cbFile, StoreIOState::STIOCB *cbIo, void *data);
-    virtual ~StoreIOState();
+    ~StoreIOState() override;
 
     off_t offset() const {return offset_;}
 
index 87052935eb02b563422d356a34ed648a704e1625..1bdd8d7a74074e388c3e5bb60c198f692b5f7a98 100644 (file)
@@ -19,7 +19,7 @@ public:
     StoreSearch() {}
 
     StoreSearch(StoreSearch const &); /* no implementation - trigger link failures */
-    virtual ~StoreSearch() {}
+    ~StoreSearch() override {}
 
     /* not ready yet
     void asList(void (*) (CbDataList<StoreEntryPointer), void *cbdata);
index a089dab6e76a670d6127a77f73ebe9b04af0e09a..d27576e2172d5178298b2e2e81e4a1410962a947 100644 (file)
@@ -399,11 +399,11 @@ class TransientsRr: public Ipc::Mem::RegisteredRunner
 {
 public:
     /* RegisteredRunner API */
-    virtual void useConfig();
-    virtual ~TransientsRr();
+    void useConfig() override;
+    ~TransientsRr() override;
 
 protected:
-    virtual void create();
+    void create() override;
 
 private:
     TransientsMap::Owner *mapOwner = nullptr;
index 82a42ebdd38bcc31338ff463a65932d61234f846..ad33d3cc974db4f72966dc75f6f2d3de60731a7e 100644 (file)
@@ -36,7 +36,7 @@ public:
     };
 
     Transients();
-    virtual ~Transients();
+    ~Transients() override;
 
     /// return a local, previously collapsed entry
     StoreEntry *findCollapsed(const sfileno xitIndex);
@@ -58,21 +58,21 @@ public:
     void disconnect(StoreEntry &);
 
     /* Store API */
-    virtual StoreEntry *get(const cache_key *) override;
-    virtual void create() override {}
-    virtual void init() override;
-    virtual uint64_t maxSize() const override;
-    virtual uint64_t minSize() const override;
-    virtual uint64_t currentSize() const override;
-    virtual uint64_t currentCount() const override;
-    virtual int64_t maxObjectSize() const override;
-    virtual void getStats(StoreInfoStats &stats) const override;
-    virtual void stat(StoreEntry &e) const override;
-    virtual void reference(StoreEntry &e) override;
-    virtual bool dereference(StoreEntry &e) override;
-    virtual void evictCached(StoreEntry &) override;
-    virtual void evictIfFound(const cache_key *) override;
-    virtual void maintain() override;
+    StoreEntry *get(const cache_key *) override;
+    void create() override {}
+    void init() override;
+    uint64_t maxSize() const override;
+    uint64_t minSize() const override;
+    uint64_t currentSize() const override;
+    uint64_t currentCount() const override;
+    int64_t maxObjectSize() const override;
+    void getStats(StoreInfoStats &stats) const override;
+    void stat(StoreEntry &e) const override;
+    void reference(StoreEntry &e) override;
+    bool dereference(StoreEntry &e) override;
+    void evictCached(StoreEntry &) override;
+    void evictIfFound(const cache_key *) override;
+    void maintain() override;
 
     /// Whether an entry with the given public key exists and (but) was
     /// marked for removal some time ago; get(key) returns nil in such cases.
@@ -97,7 +97,7 @@ protected:
     void anchorEntry(StoreEntry &, const sfileno, const Ipc::StoreMapAnchor &);
 
     // Ipc::StoreMapCleaner API
-    virtual void noteFreeMapSlice(const Ipc::StoreMapSliceId sliceId) override;
+    void noteFreeMapSlice(const Ipc::StoreMapSliceId sliceId) override;
 
 private:
     /// shared packed info indexed by Store keys, for creating new StoreEntries
index f44e48de1402d675b42b9281ed1ea5fcd186a2d2..756f27c6fbd4e6d52a3bab913b8e7ab3e525a7c2 100644 (file)
@@ -16,7 +16,7 @@ class ACLAdaptationServiceStrategy : public ACLStrategy<const char *>
 {
 
 public:
-    virtual int match (ACLData<MatchType> * &, ACLFilledChecklist *) override;
+    int match (ACLData<MatchType> * &, ACLFilledChecklist *) override;
 };
 
 #endif /* SQUID_ACLADAPTATIONSERVICE_H */
index acb6569300fa6ec2ac10f5e2f2e1b3eccc2a3b69..df71a075213ead7a30c82bd78ad64fe17bdbd488 100644 (file)
@@ -18,7 +18,7 @@ class ACLAdaptationServiceData : public ACLStringData
 {
 public:
     ACLAdaptationServiceData() : ACLStringData() {}
-    virtual void parse();
+    void parse() override;
 };
 
 #endif /* SQUID_ADAPTATIONSERVICEDATA_H */
index a85324ee15221bfd98fb5400641c66980cc91880..5d497fdb3f0b8ae108dd9f643f754918ea3c701d 100644 (file)
@@ -23,13 +23,13 @@ class AllOf: public Acl::InnerNode
 
 public:
     /* ACL API */
-    virtual char const *typeString() const;
-    virtual void parse();
-    virtual SBufList dump() const;
+    char const *typeString() const override;
+    void parse() override;
+    SBufList dump() const override;
 
 private:
     /* Acl::InnerNode API */
-    virtual int doMatch(ACLChecklist *checklist, Nodes::const_iterator start) const;
+    int doMatch(ACLChecklist *checklist, Nodes::const_iterator start) const override;
 };
 
 } // namespace Acl
index 139c80ff0257cc60062f74f5400a27817a41767a..d567c65ee329bbf3294b0b67afab7442769234bc 100644 (file)
@@ -16,8 +16,8 @@
 class ACLAnnotateClientStrategy : public Acl::AnnotationStrategy
 {
 public:
-    virtual bool requiresRequest() const { return true; }
-    virtual int match(ACLData<MatchType> * &, ACLFilledChecklist *);
+    bool requiresRequest() const override { return true; }
+    int match(ACLData<MatchType> * &, ACLFilledChecklist *) override;
 };
 
 #endif /* SQUID_ACLANNOTATECLIENT */
index 0f6795c9baef0773bc4413390952c2636d1b7242..29c44ec255cc0aa753a179223130e683f360b729 100644 (file)
@@ -16,8 +16,8 @@
 class ACLAnnotateTransactionStrategy: public Acl::AnnotationStrategy
 {
 public:
-    virtual int match(ACLData<MatchType> * &, ACLFilledChecklist *);
-    virtual bool requiresRequest() const { return true; }
+    int match(ACLData<MatchType> * &, ACLFilledChecklist *) override;
+    bool requiresRequest() const override { return true; }
 };
 
 #endif /* SQUID_ACLANNOTATETRANSACTION */
index f1e07b5a915e278602c861a949667ed41eff94c0..a07d2399d671d18dccf3e16c4b390f827ad6f833 100644 (file)
@@ -22,10 +22,10 @@ public:
     ACLAnnotationData();
 
     /* ACLData<M> API */
-    virtual bool match(NotePairs::Entry *) { return true; }
-    virtual SBufList dump() const;
-    virtual void parse();
-    virtual bool empty() const { return notes->empty(); }
+    bool match(NotePairs::Entry *) override { return true; }
+    SBufList dump() const override;
+    void parse() override;
+    bool empty() const override { return notes->empty(); }
 
     /// Stores annotations into pairs.
     void annotate(NotePairs::Pointer pairs, const CharacterSet *delimiters, const AccessLogEntry::Pointer &al);
index a4d5449561d2db593ea0ba0f06cc1f5fd94ac129..5e824adf9dc5c349f7ac12118d82bdd199b6d57a 100644 (file)
@@ -21,8 +21,8 @@ class AnyOf: public Acl::OrNode
 
 public:
     /* ACL API */
-    virtual char const *typeString() const;
-    virtual void parse();
+    char const *typeString() const override;
+    void parse() override;
 };
 
 } // namespace Acl
index a41e946d90ae9c491c8cb13d1cb8407580a59789..4a8630d8d96479c767de14df63a671a52753b54f 100644 (file)
@@ -25,13 +25,13 @@ class ACLARP : public ACL
 
 public:
     ACLARP(char const *);
-    ~ACLARP() {}
+    ~ACLARP() override {}
 
-    virtual char const *typeString() const;
-    virtual void parse();
-    virtual int match(ACLChecklist *checklist);
-    virtual SBufList dump() const;
-    virtual bool empty () const;
+    char const *typeString() const override;
+    void parse() override;
+    int match(ACLChecklist *checklist) override;
+    SBufList dump() const override;
+    bool empty () const override;
 
 protected:
     char const *class_;
index 49aefca6a99e293035d1bd93a724cd946556a75b..c70ba1659f3665573b044b6c6b95aa388b831144 100644 (file)
@@ -28,13 +28,13 @@ class ACLASN : public ACLData<Ip::Address>
 
 public:
     ACLASN() : data(nullptr) {}
-    virtual ~ACLASN();
+    ~ACLASN() override;
 
-    virtual bool match(Ip::Address);
-    virtual SBufList dump() const;
-    virtual void parse();
-    bool empty() const;
-    virtual void prepareForUse();
+    bool match(Ip::Address) override;
+    SBufList dump() const override;
+    void parse() override;
+    bool empty() const override;
+    void prepareForUse() override;
 
 private:
     CbDataList<int> *data;
index ab93fe17914ccb070df39c7800036656dd008a03..3779afc05eabe02a4e3ce8617ba6d4c02b83112a 100644 (file)
@@ -17,7 +17,7 @@ class ACLAtStepStrategy: public ACLStrategy<XactionStep>
 {
 
 public:
-    virtual int match (ACLData<MatchType> * &, ACLFilledChecklist *) override;
+    int match (ACLData<MatchType> * &, ACLFilledChecklist *) override;
 };
 
 #endif /* SQUID_ACLATSTEP_H */
index d0a96e6a9fe3f21c255ec20df2910997e5531b1e..6fa3a239a4973ae264f5a5aad69e89b1ff9a5be6 100644 (file)
@@ -20,11 +20,11 @@ class ACLAtStepData : public ACLData<XactionStep>
 
 public:
     ACLAtStepData();
-    virtual ~ACLAtStepData();
-    bool match(XactionStep);
-    virtual SBufList dump() const;
-    void parse();
-    bool empty() const;
+    ~ACLAtStepData() override;
+    bool match(XactionStep) override;
+    SBufList dump() const override;
+    void parse() override;
+    bool empty() const override;
 
     std::list<XactionStep> values;
 };
index adf1bd793d16d308480b0eb36bc9d698da9c6362..7bfe53b0dea3384e0a17ddf6f184d8a9f6d0481e 100644 (file)
@@ -28,12 +28,12 @@ public:
 
 private:
     /* ACL API */
-    virtual char const *typeString() const;
-    virtual void parse();
-    virtual SBufList dump() const;
+    char const *typeString() const override;
+    void parse() override;
+    SBufList dump() const override;
 
     /* Acl::InnerNode API */
-    virtual int doMatch(ACLChecklist *checklist, Nodes::const_iterator start) const;
+    int doMatch(ACLChecklist *checklist, Nodes::const_iterator start) const override;
 };
 
 /// An inner ACL expression tree node representing a boolean conjunction (AND)
@@ -45,11 +45,11 @@ class AndNode: public InnerNode
 
 public:
     /* ACL API */
-    virtual char const *typeString() const;
-    virtual void parse();
+    char const *typeString() const override;
+    void parse() override;
 
 private:
-    virtual int doMatch(ACLChecklist *checklist, Nodes::const_iterator start) const;
+    int doMatch(ACLChecklist *checklist, Nodes::const_iterator start) const override;
 };
 
 /// An inner ACL expression tree node representing a boolean disjuction (OR)
@@ -65,14 +65,14 @@ public:
     virtual bool bannedAction(ACLChecklist *, Nodes::const_iterator) const;
 
     /* ACL API */
-    virtual char const *typeString() const;
-    virtual void parse();
+    char const *typeString() const override;
+    void parse() override;
 
 protected:
     mutable Nodes::const_iterator lastMatch_;
 
 private:
-    virtual int doMatch(ACLChecklist *checklist, Nodes::const_iterator start) const;
+    int doMatch(ACLChecklist *checklist, Nodes::const_iterator start) const override;
 };
 
 } // namespace Acl
index 1949f3ebe9531287d3aa30a80e0fd849cc05b69c..a0eeb07f136600c12fbc0c775620f4abc6b1ffef 100644 (file)
@@ -20,7 +20,7 @@ class ACLCertificateStrategy : public ACLStrategy<X509 *>
 {
 
 public:
-    virtual int match (ACLData<MatchType> * &, ACLFilledChecklist *);
+    int match (ACLData<MatchType> * &, ACLFilledChecklist *) override;
 };
 
 #endif /* SQUID_ACLCERTIFICATE_H */
index 6944940755dc595ee24be0e8690b5138b6089e1e..8322c59538983a0f0b8e43bc39aac6ced7c4b1a9 100644 (file)
@@ -23,11 +23,11 @@ class ACLCertificateData : public ACLData<X509 *>
 
 public:
     ACLCertificateData(Ssl::GETX509ATTRIBUTE *, const char *attributes, bool optionalAttr = false);
-    virtual ~ACLCertificateData();
-    bool match(X509 *);
-    virtual SBufList dump() const;
-    void parse();
-    bool empty() const;
+    ~ACLCertificateData() override;
+    bool match(X509 *) override;
+    SBufList dump() const override;
+    void parse() override;
+    bool empty() const override;
 
     /// A '|'-delimited list of valid ACL attributes.
     /// A "*" item means that any attribute is acceptable.
index 07acd4f898e8656796c9f6083196ee002a7e49ad..0ede07582bb2769a978f3207cc12c839796270ae 100644 (file)
@@ -56,8 +56,8 @@ public:
 
     public:
         static NullState *Instance();
-        virtual void checkForAsync(ACLChecklist *) const;
-        virtual ~NullState() {}
+        void checkForAsync(ACLChecklist *) const override;
+        ~NullState() override {}
 
     private:
         static NullState _instance;
index 4a1affd4f7771f186ef83ae8844f0d96cc330188..4f7d15781a6c481976b74ab1c4ec494e095d81e3 100644 (file)
@@ -24,11 +24,11 @@ class ConnMark : public ACL
 
 public:
     /* ACL API */
-    virtual char const *typeString() const override;
-    virtual void parse() override;
-    virtual int match(ACLChecklist *checklist) override;
-    virtual SBufList dump() const override;
-    virtual bool empty() const override;
+    char const *typeString() const override;
+    void parse() override;
+    int match(ACLChecklist *checklist) override;
+    SBufList dump() const override;
+    bool empty() const override;
 
 private:
     std::vector<Ip::NfMarkConfig> marks; ///< marks/masks in configured order
index 91f8148ea292c3a01b0a1762b8b2840bf7a0b3c5..89c04e3ed5aa37635547ca645d362225c407985e 100644 (file)
@@ -21,13 +21,13 @@ class ConnectionsEncrypted : public ACL
 
 public:
     ConnectionsEncrypted(char const *);
-    virtual ~ConnectionsEncrypted();
+    ~ConnectionsEncrypted() override;
 
-    virtual char const *typeString() const;
-    virtual void parse();
-    virtual int match(ACLChecklist *checklist);
-    virtual SBufList dump() const;
-    virtual bool empty () const;
+    char const *typeString() const override;
+    void parse() override;
+    int match(ACLChecklist *checklist) override;
+    SBufList dump() const override;
+    bool empty () const override;
 
 protected:
     char const *class_;
index 5917f7d59b72767939735fc044a47173bf66305e..a68aab5a8ad1343aced4c1f30969b85f25d20a8b 100644 (file)
@@ -18,8 +18,8 @@ class ACLDestinationASNStrategy : public ACLStrategy<Ip::Address>
 {
 
 public:
-    virtual int match (ACLData<MatchType> * &, ACLFilledChecklist *);
-    virtual bool requiresRequest() const {return true;}
+    int match (ACLData<MatchType> * &, ACLFilledChecklist *) override;
+    bool requiresRequest() const override {return true;}
 };
 
 #endif /* SQUID_ACLDESTINATIONASN_H */
index bbabcbdf249c6b8eba095735ffa45cb176cf47fe..fdf889bac60ead4ade5d6f98dcc93d6bb621c455 100644 (file)
@@ -21,9 +21,9 @@ class ACLDestinationDomainStrategy : public ACLStrategy<char const *>
 
 public:
     /* ACLStrategy API */
-    virtual int match (ACLData<MatchType> * &, ACLFilledChecklist *);
-    virtual bool requiresRequest() const {return true;}
-    virtual const Acl::Options &options();
+    int match (ACLData<MatchType> * &, ACLFilledChecklist *) override;
+    bool requiresRequest() const override {return true;}
+    const Acl::Options &options() override;
 
 private:
     Acl::BooleanOptionValue lookupBanned; ///< Are DNS lookups allowed?
@@ -35,7 +35,7 @@ class DestinationDomainLookup : public ACLChecklist::AsyncState
 
 public:
     static DestinationDomainLookup *Instance();
-    virtual void checkForAsync(ACLChecklist *)const;
+    void checkForAsync(ACLChecklist *)const override;
 
 private:
     static DestinationDomainLookup instance_;
index 2658c9ea272f355861a67097cb19a62a4c6fc141..cf79a231a1e7cef8ee2b598fb1e02612b3bf5e62 100644 (file)
@@ -18,7 +18,7 @@ class DestinationIPLookup : public ACLChecklist::AsyncState
 
 public:
     static DestinationIPLookup *Instance();
-    virtual void checkForAsync(ACLChecklist *)const;
+    void checkForAsync(ACLChecklist *)const override;
 
 private:
     static DestinationIPLookup instance_;
@@ -30,9 +30,9 @@ class ACLDestinationIP : public ACLIP
     MEMPROXY_CLASS(ACLDestinationIP);
 
 public:
-    virtual char const *typeString() const;
-    virtual const Acl::Options &options();
-    virtual int match(ACLChecklist *checklist);
+    char const *typeString() const override;
+    const Acl::Options &options() override;
+    int match(ACLChecklist *checklist) override;
 
 private:
     Acl::BooleanOptionValue lookupBanned; ///< are DNS lookups allowed?
index cd1b3a5c21b785e93dee93985a35932fcdc9ceb1..59780deff616d17de901fde9a291efc68ca2500d 100644 (file)
@@ -19,11 +19,11 @@ class ACLDomainData : public ACLData<char const *>
 
 public:
     ACLDomainData() : domains(nullptr) {}
-    virtual ~ACLDomainData();
-    virtual bool match(char const *);
-    virtual SBufList dump() const;
-    void parse();
-    bool empty() const;
+    ~ACLDomainData() override;
+    bool match(char const *) override;
+    SBufList dump() const override;
+    void parse() override;
+    bool empty() const override;
 
     Splay<char *> *domains;
 };
index cc8e24d4e3fdcbabbc7ba59f5a5c8376891a94a8..8f366d9523793a4a2042d6d9a4886e75dd863d6f 100644 (file)
@@ -24,13 +24,13 @@ class ACLEui64 : public ACL
 
 public:
     ACLEui64(char const *);
-    ~ACLEui64() {}
+    ~ACLEui64() override {}
 
-    virtual char const *typeString() const;
-    virtual void parse();
-    virtual int match(ACLChecklist *checklist);
-    virtual SBufList dump() const;
-    virtual bool empty () const;
+    char const *typeString() const override;
+    void parse() override;
+    int match(ACLChecklist *checklist) override;
+    SBufList dump() const override;
+    bool empty () const override;
 
 protected:
     typedef std::set<Eui::Eui64> Eui64Data_t;
index 885f92e4e22ac886d6c9b5c900ce5886f0e1513a..eb43c7f3a537f71888f8ae9072fa552130778660 100644 (file)
@@ -21,18 +21,18 @@ class ACLExtUser : public ACL
 
 public:
     ACLExtUser(ACLData<char const *> *newData, char const *);
-    ~ACLExtUser();
+    ~ACLExtUser() override;
 
     /* ACL API */
-    virtual char const *typeString() const;
-    virtual void parse();
-    virtual int match(ACLChecklist *checklist);
-    virtual SBufList dump() const;
-    virtual bool empty () const;
+    char const *typeString() const override;
+    void parse() override;
+    int match(ACLChecklist *checklist) override;
+    SBufList dump() const override;
+    bool empty () const override;
 
 private:
     /* ACL API */
-    virtual const Acl::Options &lineOptions();
+    const Acl::Options &lineOptions() override;
 
     ACLData<char const *> *data;
     char const *type_;
index 97480ff532ded37b76b062064e7561064b42242f..f24534510904c7327c3a0f35a1fd08cb0b1f2edb 100644 (file)
@@ -36,7 +36,7 @@ class ACLFilledChecklist: public ACLChecklist
 public:
     ACLFilledChecklist();
     ACLFilledChecklist(const acl_access *, HttpRequest *, const char *ident = nullptr);
-    ~ACLFilledChecklist();
+    ~ACLFilledChecklist() override;
 
     /// configure client request-related fields for the first time
     void setRequest(HttpRequest *);
@@ -63,11 +63,11 @@ public:
     void markSourceDomainChecked();
 
     // ACLChecklist API
-    virtual bool hasRequest() const { return request != nullptr; }
-    virtual bool hasReply() const { return reply != nullptr; }
-    virtual bool hasAle() const { return al != nullptr; }
-    virtual void syncAle(HttpRequest *adaptedRequest, const char *logUri) const;
-    virtual void verifyAle() const;
+    bool hasRequest() const override { return request != nullptr; }
+    bool hasReply() const override { return reply != nullptr; }
+    bool hasAle() const override { return al != nullptr; }
+    void syncAle(HttpRequest *adaptedRequest, const char *logUri) const override;
+    void verifyAle() const override;
 
 public:
     Ip::Address src_addr;
index 81f44257e44e7b5643be7f66c2eebbef95274708..f8d4aa932747ab571d9173929a5ea8fb0fe94089 100644 (file)
@@ -16,7 +16,7 @@
 class ACLHasComponentStrategy : public ACLStrategy<ACLChecklist *>
 {
 public:
-    virtual int match(ACLData<MatchType> * &, ACLFilledChecklist *);
+    int match(ACLData<MatchType> * &, ACLFilledChecklist *) override;
 };
 
 #endif
index 7ac7b4d84823b07f7c47d33871b28c8192884fd2..88e43fe6f4b6bb2efd56a43fc009628d754cc180 100644 (file)
@@ -21,10 +21,10 @@ public:
     ACLHasComponentData();
 
     /* ACLData<M> API */
-    virtual bool match(ACLChecklist *) override;
-    virtual SBufList dump() const override;
-    virtual void parse() override;
-    virtual bool empty() const override { return false; }
+    bool match(ACLChecklist *) override;
+    SBufList dump() const override;
+    void parse() override;
+    bool empty() const override { return false; }
 
 private:
     enum ComponentKind { coRequest = 0, coResponse, coAle, coEnd };
index 78b7a1595b7d132e6df936f47664fd924cbce94c..cc6e52fe484b29ab3d6b242443e561323ce6ed70 100644 (file)
@@ -17,8 +17,8 @@ class ACLHierCodeStrategy : public ACLStrategy<hier_code>
 {
 
 public:
-    virtual int match (ACLData<MatchType> * &, ACLFilledChecklist *);
-    virtual bool requiresRequest() const {return true;}
+    int match (ACLData<MatchType> * &, ACLFilledChecklist *) override;
+    bool requiresRequest() const override {return true;}
 };
 
 #endif /* SQUID_ACLHIERCODE_H */
index fcf2d43371ed4aab23f9a1ffc0d6773a2757ad77..475b903f036157aececa62a5da71e0c70d92f134 100644 (file)
@@ -19,11 +19,11 @@ class ACLHierCodeData : public ACLData<hier_code>
 
 public:
     ACLHierCodeData();
-    virtual ~ACLHierCodeData();
-    bool match(hier_code);
-    virtual SBufList dump() const;
-    void parse();
-    bool empty() const;
+    ~ACLHierCodeData() override;
+    bool match(hier_code) override;
+    SBufList dump() const override;
+    void parse() override;
+    bool empty() const override;
 
     /// mask of codes this ACL might match.
     bool values[HIER_MAX];
index 77476d5c1217da0cf4a753af03bf488c76c20878..3c6cc19569c93ea2300eb1095e1deae1899934fb 100644 (file)
@@ -20,15 +20,15 @@ class ACLHTTPHeaderData : public ACLData<HttpHeader*>
 
 public:
     ACLHTTPHeaderData();
-    virtual ~ACLHTTPHeaderData();
-    virtual bool match(HttpHeader* hdr);
-    virtual SBufList dump() const;
-    virtual void parse();
-    virtual bool empty() const;
+    ~ACLHTTPHeaderData() override;
+    bool match(HttpHeader* hdr) override;
+    SBufList dump() const override;
+    void parse() override;
+    bool empty() const override;
 
 private:
     /* ACLData API */
-    virtual const Acl::Options &lineOptions();
+    const Acl::Options &lineOptions() override;
 
     Http::HdrType hdrId;            /**< set if header is known */
     SBuf hdrName;                   /**< always set */
index 639c30dca6f82c32609980ed6f2186ff311b44fb..e774c77a97f306b2ad28d88ce9685f17c19a0a5e 100644 (file)
@@ -18,8 +18,8 @@ class ACLHTTPRepHeaderStrategy : public ACLStrategy<HttpHeader*>
 {
 
 public:
-    virtual int match (ACLData<MatchType> * &, ACLFilledChecklist *);
-    virtual bool requiresReply() const { return true; }
+    int match (ACLData<MatchType> * &, ACLFilledChecklist *) override;
+    bool requiresReply() const override { return true; }
 };
 
 #endif /* SQUID_ACLHTTPREPHEADER_H */
index c57b76f3e7576e9a2285b0e8b4be44a9c1bd6d98..d3371cb5f56cf44efb57b33a184503c72de1cd69 100644 (file)
@@ -17,8 +17,8 @@ class ACLHTTPReqHeaderStrategy : public ACLStrategy<HttpHeader*>
 {
 
 public:
-    virtual int match (ACLData<MatchType> * &, ACLFilledChecklist *);
-    virtual bool requiresRequest() const { return true; }
+    int match (ACLData<MatchType> * &, ACLFilledChecklist *) override;
+    bool requiresRequest() const override { return true; }
 };
 
 #endif /* SQUID_ACLHTTPREQHEADER_H */
index ad72b19098c6d9eec05e7045941341288a2073db..05fa7a782bc2948af2b49db152fdb9408a62d518 100644 (file)
@@ -30,14 +30,14 @@ class ACLHTTPStatus : public ACL
 
 public:
     ACLHTTPStatus(char const *);
-    ~ACLHTTPStatus();
-
-    virtual char const *typeString() const;
-    virtual void parse();
-    virtual int match(ACLChecklist *checklist);
-    virtual SBufList dump() const;
-    virtual bool empty () const;
-    virtual bool requiresReply() const { return true; }
+    ~ACLHTTPStatus() override;
+
+    char const *typeString() const override;
+    void parse() override;
+    int match(ACLChecklist *checklist) override;
+    SBufList dump() const override;
+    bool empty () const override;
+    bool requiresReply() const override { return true; }
 
 protected:
     Splay<acl_httpstatus_data*> *data;
index 3ad2eca22edcc1d344e63f909dc6ea98ff4dd654..f7984a4c0e69760a600fd14963206ebc942e7aad 100644 (file)
@@ -30,9 +30,9 @@ public:
     Nodes::size_type childrenCount() const { return nodes.size(); }
 
     /* ACL API */
-    virtual void prepareForUse();
-    virtual bool empty() const;
-    virtual SBufList dump() const;
+    void prepareForUse() override;
+    bool empty() const override;
+    SBufList dump() const override;
 
     /// parses a [ [!]acl1 [!]acl2... ] sequence, appending to nodes
     /// \returns the number of parsed ACL names
@@ -47,7 +47,7 @@ protected:
     virtual int doMatch(ACLChecklist *checklist, Nodes::const_iterator start) const = 0;
 
     /* ACL API */
-    virtual int match(ACLChecklist *checklist);
+    int match(ACLChecklist *checklist) override;
 
     // XXX: use refcounting instead of raw pointers
     std::vector<ACL*> nodes; ///< children nodes of this intermediate node
index fe372422233e1843d77b3d9c11f3176345a0a3b8..a28674a51c91e4a9790fe7d3d3c0875a266bd9de 100644 (file)
@@ -20,11 +20,11 @@ class ACLIntRange : public ACLData<int>
 public:
     ACLIntRange() {}
 
-    virtual ~ACLIntRange();
-    virtual bool match(int);
-    virtual SBufList dump() const;
-    virtual void parse();
-    virtual bool empty() const;
+    ~ACLIntRange() override;
+    bool match(int) override;
+    SBufList dump() const override;
+    void parse() override;
+    bool empty() const override;
 
 private:
     typedef Range<int> RangeType;
index 8928a57f0e26dec543ff6e5393785194ec4f48c2..871cb4016df55fd57b58b377db692d35276d04d7 100644 (file)
@@ -48,16 +48,16 @@ public:
     void operator delete(void *);
 
     ACLIP() : data(nullptr) {}
-    ~ACLIP();
+    ~ACLIP() override;
 
     typedef Splay<acl_ip_data *> IPSplay;
 
-    virtual char const *typeString() const = 0;
-    virtual void parse();
+    char const *typeString() const override = 0;
+    void parse() override;
     //    virtual bool isProxyAuth() const {return true;}
-    virtual int match(ACLChecklist *checklist) = 0;
-    virtual SBufList dump() const;
-    virtual bool empty () const;
+    int match(ACLChecklist *checklist) override = 0;
+    SBufList dump() const override;
+    bool empty () const override;
 
 protected:
 
index f445524fb8eb70798b6bd5b966e97ca4e9975bde..df8dfa53896aaf94ebfbbd15b9b2147775a62a60 100644 (file)
@@ -17,8 +17,8 @@ class ACLLocalIP : public ACLIP
     MEMPROXY_CLASS(ACLLocalIP);
 
 public:
-    virtual char const *typeString() const;
-    virtual int match(ACLChecklist *checklist);
+    char const *typeString() const override;
+    int match(ACLChecklist *checklist) override;
 };
 
 #endif /* SQUID_ACLLOCALIP_H */
index 5f64278e7f4ea058c9d6470837e8fb0844940458..6fae40aa406df9f07cb8dfa1256ea1a714e26383 100644 (file)
@@ -16,7 +16,7 @@ class ACLLocalPortStrategy : public ACLStrategy<int>
 {
 
 public:
-    virtual int match (ACLData<MatchType> * &, ACLFilledChecklist *) override;
+    int match (ACLData<MatchType> * &, ACLFilledChecklist *) override;
 };
 
 #endif /* SQUID_ACLLOCALPORT_H */
index d6441f7da4dd3c2bec4a4010682b0ad815cd1a32..0a970d998027fac5f180356a86ffdeb5aed97fb0 100644 (file)
@@ -18,15 +18,15 @@ class ACLMaxConnection : public ACL
 
 public:
     ACLMaxConnection(char const *);
-    ~ACLMaxConnection();
-
-    virtual char const *typeString() const;
-    virtual void parse();
-    virtual int match(ACLChecklist *checklist);
-    virtual SBufList dump() const;
-    virtual bool empty () const;
-    virtual bool valid () const;
-    virtual void prepareForUse();
+    ~ACLMaxConnection() override;
+
+    char const *typeString() const override;
+    void parse() override;
+    int match(ACLChecklist *checklist) override;
+    SBufList dump() const override;
+    bool empty () const override;
+    bool valid () const override;
+    void prepareForUse() override;
 
 protected:
     char const *class_;
index 42c0b138f3dce8a0ad85b7addfd414df7dbf707d..584fa680abdac76548cbd984e120abafe82599a6 100644 (file)
@@ -17,8 +17,8 @@ class ACLMethodStrategy : public ACLStrategy<HttpRequestMethod>
 {
 
 public:
-    virtual int match (ACLData<MatchType> * &, ACLFilledChecklist *);
-    virtual bool requiresRequest() const {return true;}
+    int match (ACLData<MatchType> * &, ACLFilledChecklist *) override;
+    bool requiresRequest() const override {return true;}
 };
 
 #endif /* SQUID_ACLMETHOD_H */
index eea68d9c821775721bab84ce164e54acd485228d..fffa56028b582e52c27bfb49ff5d7a2abfe5f509 100644 (file)
@@ -21,11 +21,11 @@ class ACLMethodData : public ACLData<HttpRequestMethod>
 
 public:
     ACLMethodData() {}
-    virtual ~ACLMethodData();
-    bool match(HttpRequestMethod);
-    virtual SBufList dump() const;
-    void parse();
-    bool empty() const {return values.empty();}
+    ~ACLMethodData() override;
+    bool match(HttpRequestMethod) override;
+    SBufList dump() const override;
+    void parse() override;
+    bool empty() const override {return values.empty();}
 
     std::list<HttpRequestMethod> values;
 
index dd40e5fc6414f786b1a5a8e9a903a022acaacc5d..981a2d8c644161fa35a8389adae88ea7bc696d95 100644 (file)
@@ -14,7 +14,7 @@ class ACLMyPortNameStrategy : public ACLStrategy<const char *>
 {
 
 public:
-    virtual int match (ACLData<MatchType> * &, ACLFilledChecklist *) override;
+    int match (ACLData<MatchType> * &, ACLFilledChecklist *) override;
 };
 
 #endif /* SQUID_ACLMYPORTNAME_H */
index 7aea5e00d4f0881f208c8f624add6a154c0e1f79..968a79d1ceb5a047000dd6d9e65dbf8f6a443cc8 100644 (file)
@@ -22,7 +22,7 @@ class AnnotationStrategy: public ACLStrategy<NotePairs::Entry *>
 public:
     AnnotationStrategy(): delimiters(CharacterSet(__FILE__, ",")) {}
 
-    virtual const Acl::Options &options() override;
+    const Acl::Options &options() override;
 
     Acl::CharacterSetOptionValue delimiters; ///< annotation separators
 };
@@ -34,8 +34,8 @@ class ACLNoteStrategy: public Acl::AnnotationStrategy
 {
 
 public:
-    virtual int match (ACLData<MatchType> * &, ACLFilledChecklist *);
-    virtual bool requiresRequest() const { return true; }
+    int match (ACLData<MatchType> * &, ACLFilledChecklist *) override;
+    bool requiresRequest() const override { return true; }
 
 private:
     bool matchNotes(ACLData<MatchType> *, const NotePairs *) const;
index 51cc9732c4d7c67e3b989667aa2c710bd128a0a0..7a2af91b5b65a443f6a38c2b06c0dd7492500d52 100644 (file)
@@ -22,11 +22,11 @@ class ACLNoteData : public ACLData<NotePairs::Entry *>
 
 public:
     ACLNoteData();
-    virtual ~ACLNoteData();
-    virtual bool match(NotePairs::Entry *);
-    virtual SBufList dump() const;
-    virtual void parse();
-    virtual bool empty() const;
+    ~ACLNoteData() override;
+    bool match(NotePairs::Entry *) override;
+    SBufList dump() const override;
+    void parse() override;
+    bool empty() const override;
 
 private:
     SBuf name;                   ///< Note name to check. It is always set
index 5b2199cb02481c6c6d835e7d27b09d2c38afd7b0..86cdef633d0937bb8bb690b4b494d283bd1dcc88 100644 (file)
@@ -142,16 +142,16 @@ public:
 
     /* Option API */
 
-    virtual bool configured() const override { return recipient_ && recipient_->configured; }
-    virtual bool disabled() const override { return recipient_ && recipient_->disabled && /* paranoid: */ offName; }
-    virtual bool valued() const override { return recipient_ && recipient_->valued; }
+    bool configured() const override { return recipient_ && recipient_->configured; }
+    bool disabled() const override { return recipient_ && recipient_->disabled && /* paranoid: */ offName; }
+    bool valued() const override { return recipient_ && recipient_->valued; }
 
-    virtual void unconfigure() const override {
+    void unconfigure() const override {
         assert(recipient_);
         recipient_->reset();
     }
 
-    virtual void enable() const override
+    void enable() const override
     {
         assert(recipient_);
         recipient_->configured = true;
@@ -160,7 +160,7 @@ public:
         // leave recipient_->value unchanged
     }
 
-    virtual void configureWith(const SBuf &rawValue) const override
+    void configureWith(const SBuf &rawValue) const override
     {
         assert(recipient_);
         recipient_->configured = true;
@@ -169,7 +169,7 @@ public:
         import(rawValue);
     }
 
-    virtual void disable() const override
+    void disable() const override
     {
         assert(recipient_);
         recipient_->configured = true;
@@ -178,7 +178,7 @@ public:
         // leave recipient_->value unchanged
     }
 
-    virtual void print(std::ostream &os) const override
+    void print(std::ostream &os) const override
     {
         if (configured()) {
             os << ' ' << (disabled() ? offName : onName);
index 3cb3a1ab02190da2b6ab1d7df80dc2097bcd8dc9..6ba2ca58a9357dba41f3ee3bccc7de957ec01269 100644 (file)
@@ -15,7 +15,7 @@ class ACLPeerNameStrategy : public ACLStrategy<const char *>
 {
 
 public:
-    virtual int match (ACLData<MatchType> * &, ACLFilledChecklist *) override;
+    int match (ACLData<MatchType> * &, ACLFilledChecklist *) override;
 };
 
 #endif /* SQUID_ACLPEERNAME_H */
index 13e41ed0178e48a0cdd207f99ec0c8641bb562bd..bf62369d16f0de130d6a69165217427b88f288b6 100644 (file)
@@ -16,8 +16,8 @@ class ACLProtocolStrategy : public ACLStrategy<AnyP::ProtocolType>
 {
 
 public:
-    virtual int match (ACLData<MatchType> * &, ACLFilledChecklist *);
-    virtual bool requiresRequest() const {return true;}
+    int match (ACLData<MatchType> * &, ACLFilledChecklist *) override;
+    bool requiresRequest() const override {return true;}
 };
 
 #endif /* SQUID_ACLPROTOCOL_H */
index a1c01b93bee3de42ca2b256f91b96876f8e9be4d..859eb2dd4a4d0f532e5601c146f22488cc7814d4 100644 (file)
@@ -21,11 +21,11 @@ class ACLProtocolData : public ACLData<AnyP::ProtocolType>
 
 public:
     ACLProtocolData() {}
-    virtual ~ACLProtocolData();
-    bool match(AnyP::ProtocolType);
-    virtual SBufList dump() const;
-    void parse();
-    bool empty() const {return values.empty();}
+    ~ACLProtocolData() override;
+    bool match(AnyP::ProtocolType) override;
+    SBufList dump() const override;
+    void parse() override;
+    bool empty() const override {return values.empty();}
 
     std::list<AnyP::ProtocolType> values;
 };
index d1e12f205e49a3b52dbfc717fde292cfd4032e7d..368e4e7ddd5651db81b67a172b16e56f33d84a33 100644 (file)
@@ -17,14 +17,14 @@ class ACLRandom : public ACL
 
 public:
     ACLRandom(char const *);
-    ~ACLRandom();
-
-    virtual char const *typeString() const;
-    virtual void parse();
-    virtual int match(ACLChecklist *checklist);
-    virtual SBufList dump() const;
-    virtual bool empty () const;
-    virtual bool valid() const;
+    ~ACLRandom() override;
+
+    char const *typeString() const override;
+    void parse() override;
+    int match(ACLChecklist *checklist) override;
+    SBufList dump() const override;
+    bool empty () const override;
+    bool valid() const override;
 
 protected:
     double data;        // value to be exceeded before this ACL will match
index 66b05eecd05720c1ad1c68bafa78efcb7910cc0b..8b9f692929889c8ea90b487b8f12b96b59c80ebf 100644 (file)
@@ -20,18 +20,18 @@ class ACLRegexData : public ACLData<char const *>
     MEMPROXY_CLASS(ACLRegexData);
 
 public:
-    virtual ~ACLRegexData();
-    virtual bool match(char const *user);
-    virtual SBufList dump() const;
-    virtual void parse();
-    virtual bool empty() const;
+    ~ACLRegexData() override;
+    bool match(char const *user) override;
+    SBufList dump() const override;
+    void parse() override;
+    bool empty() const override;
 
 private:
     /// whether parse() is called in a case insensitive context
     static Acl::BooleanOptionValue CaseInsensitive_;
 
     /* ACLData API */
-    virtual const Acl::Options &lineOptions();
+    const Acl::Options &lineOptions() override;
 
     std::list<RegexPattern> data;
 };
index 834a4ea4e3e089ecb9808c3481c4caff43035536..386378c1fdfd179a2cbf37d3ac604eebfc56755d 100644 (file)
@@ -20,8 +20,8 @@ class ACLReplyHeaderStrategy : public ACLStrategy<char const *>
 {
 
 public:
-    virtual int match (ACLData<char const *> * &, ACLFilledChecklist *);
-    virtual bool requiresReply() const {return true;}
+    int match (ACLData<char const *> * &, ACLFilledChecklist *) override;
+    bool requiresReply() const override {return true;}
 };
 
 template <Http::HdrType header>
index 1647afecfc12232f7dec1aef1ad2d6fdb82e911c..55cf8bff488f032d899585eb84b1bad876d2301a 100644 (file)
@@ -19,8 +19,8 @@ class ACLRequestHeaderStrategy : public ACLStrategy<char const *>
 {
 
 public:
-    virtual int match (ACLData<char const *> * &, ACLFilledChecklist *);
-    virtual bool requiresRequest() const {return true;}
+    int match (ACLData<char const *> * &, ACLFilledChecklist *) override;
+    bool requiresRequest() const override {return true;}
 };
 
 template <Http::HdrType header>
index ba300cc17eb9480e49a8fac4e6f5ba6da9e14c28..8bd55b454d0bfe357b447599c80dcfcbcd24a83b 100644 (file)
@@ -19,7 +19,7 @@
 class ACLServerCertificateStrategy : public ACLStrategy<X509 *>
 {
 public:
-    virtual int match (ACLData<MatchType> * &, ACLFilledChecklist *) override;
+    int match (ACLData<MatchType> * &, ACLFilledChecklist *) override;
 };
 
 #endif /* SQUID_ACLSERVERCERTIFICATE_H */
index e3f54cd6c18d29d5d35f08fc70fc074c684156ea..c8951d50a4cbbfb0fb758e04646453c8639051fc 100644 (file)
@@ -17,7 +17,7 @@ class ACLServerNameData : public ACLDomainData {
     MEMPROXY_CLASS(ACLServerNameData);
 public:
     ACLServerNameData() : ACLDomainData() {}
-    virtual bool match(const char *);
+    bool match(const char *) override;
 };
 
 class ACLServerNameStrategy : public ACLStrategy<char const *>
@@ -25,10 +25,10 @@ class ACLServerNameStrategy : public ACLStrategy<char const *>
 
 public:
     /* ACLStrategy API */
-    virtual int match (ACLData<MatchType> * &, ACLFilledChecklist *);
-    virtual bool requiresRequest() const {return true;}
-    virtual const Acl::Options &options();
-    virtual bool valid() const;
+    int match (ACLData<MatchType> * &, ACLFilledChecklist *) override;
+    bool requiresRequest() const override {return true;}
+    const Acl::Options &options() override;
+    bool valid() const override;
 
 private:
     Acl::BooleanOptionValue useClientRequested; ///< Ignore server-supplied names
index 38be7e1ce4005d5d13669bd405c7f065c47d5eed..ab8b38ff8da3fd329d234a247d148b4730612723 100644 (file)
@@ -18,7 +18,7 @@ class ACLSourceASNStrategy : public ACLStrategy<Ip::Address>
 {
 
 public:
-    virtual int match (ACLData<MatchType> * &, ACLFilledChecklist *) override;
+    int match (ACLData<MatchType> * &, ACLFilledChecklist *) override;
 };
 
 #endif /* SQUID_ACL_SOURCEASN_H */
index d93aefa9e8e9c9c91a44e0e06e40d4a75db51905..b439314c09364539d193a869e8b7ba8b6566717d 100644 (file)
@@ -18,7 +18,7 @@ class ACLSourceDomainStrategy : public ACLStrategy<char const *>
 {
 
 public:
-    virtual int match (ACLData<MatchType> * &, ACLFilledChecklist *) override;
+    int match (ACLData<MatchType> * &, ACLFilledChecklist *) override;
 };
 
 class SourceDomainLookup : public ACLChecklist::AsyncState
@@ -26,7 +26,7 @@ class SourceDomainLookup : public ACLChecklist::AsyncState
 
 public:
     static SourceDomainLookup *Instance();
-    virtual void checkForAsync(ACLChecklist *)const;
+    void checkForAsync(ACLChecklist *)const override;
 
 private:
     static SourceDomainLookup instance_;
index d37b39763fbbb65c9709992f7cddac1508347015..3e462c025321c0645d134efa483de53e2db9f692 100644 (file)
@@ -16,8 +16,8 @@ class ACLSourceIP : public ACLIP
     MEMPROXY_CLASS(ACLSourceIP);
 
 public:
-    virtual char const *typeString() const;
-    virtual int match(ACLChecklist *checklist);
+    char const *typeString() const override;
+    int match(ACLChecklist *checklist) override;
 };
 
 #endif /* SQUID_ACLSOURCEIP_H */
index 47bce6395fc3e1135fcbb1bd1058748852edd5e5..3ef933499b5608d0f929c6aad6a52ae252e49e4b 100644 (file)
@@ -16,7 +16,7 @@ class ACLSquidErrorStrategy : public ACLStrategy<err_type>
 {
 
 public:
-    virtual int match (ACLData<MatchType> * &, ACLFilledChecklist *) override;
+    int match (ACLData<MatchType> * &, ACLFilledChecklist *) override;
 };
 
 #endif /* SQUID_ACLSQUIDERROR_H */
index 13acad7b614fb1a57903c2f91d4e7972fee2cefb..4b56b870c6ad327b3823a654a4fb41629039d476 100644 (file)
@@ -20,11 +20,11 @@ class ACLSquidErrorData : public ACLData<err_type>
 public:
     ACLSquidErrorData(): ACLData<err_type>() {};
 
-    virtual ~ACLSquidErrorData() {}
-    virtual bool match(err_type err);
-    virtual SBufList dump() const;
-    virtual void parse();
-    virtual bool empty() const;
+    ~ACLSquidErrorData() override {}
+    bool match(err_type err) override;
+    SBufList dump() const override;
+    void parse() override;
+    bool empty() const override;
 
 private:
     CbDataListContainer <err_type> errors;
index 6ca38ef79fb5ba974d1fa838fb6af3f714b4ea06..5c3631005e8bf61855a2d5acd2cf512b6a186ff0 100644 (file)
@@ -16,7 +16,7 @@ class ACLSslErrorStrategy : public ACLStrategy<const Security::CertErrors *>
 {
 
 public:
-    virtual int match (ACLData<MatchType> * &, ACLFilledChecklist *) override;
+    int match (ACLData<MatchType> * &, ACLFilledChecklist *) override;
 };
 
 #endif /* SQUID_ACLSSL_ERROR_H */
index 75c9981d22f9c206015260875b71595a98e2144e..b21fd7aa9e2bb33edf29870be442f596950d320d 100644 (file)
@@ -19,11 +19,11 @@ class ACLSslErrorData : public ACLData<const Security::CertErrors *>
 
 public:
     ACLSslErrorData() = default;
-    virtual ~ACLSslErrorData() {}
-    bool match(const Security::CertErrors *);
-    virtual SBufList dump() const;
-    void parse();
-    bool empty() const { return values.empty(); }
+    ~ACLSslErrorData() override {}
+    bool match(const Security::CertErrors *) override;
+    SBufList dump() const override;
+    void parse() override;
+    bool empty() const override { return values.empty(); }
 
     Security::Errors values;
 };
index 1c745d2b1f906be7577f4ddb7face6a235071a6a..1b30e346c1795fcca2c15ffce8df3cf226184439 100644 (file)
@@ -32,27 +32,27 @@ class ACLStrategised : public ACL
 public:
     typedef M MatchType;
 
-    ~ACLStrategised();
+    ~ACLStrategised() override;
     ACLStrategised(ACLData<MatchType> *, ACLStrategy<MatchType> *, char const *);
 
-    virtual char const *typeString() const;
+    char const *typeString() const override;
 
-    virtual bool requiresRequest() const {return matcher->requiresRequest();}
+    bool requiresRequest() const override {return matcher->requiresRequest();}
 
-    virtual bool requiresReply() const {return matcher->requiresReply();}
+    bool requiresReply() const override {return matcher->requiresReply();}
 
-    virtual void prepareForUse() { data->prepareForUse();}
-    virtual void parse();
-    virtual int match(ACLChecklist *checklist);
+    void prepareForUse() override { data->prepareForUse();}
+    void parse() override;
+    int match(ACLChecklist *checklist) override;
     virtual int match (M const &);
-    virtual SBufList dump() const;
-    virtual bool empty () const;
-    virtual bool valid () const;
+    SBufList dump() const override;
+    bool empty () const override;
+    bool valid () const override;
 
 private:
     /* ACL API */
-    virtual const Acl::Options &options() { return matcher->options(); }
-    virtual const Acl::Options &lineOptions() { return data->lineOptions(); }
+    const Acl::Options &options() override { return matcher->options(); }
+    const Acl::Options &lineOptions() override { return data->lineOptions(); }
 
     ACLData<MatchType> *data;
     char const *type_;
index c0e4be364fa0cb9432cb4d1906b6fe98018d3595..2b6df84517daed6026629f09843e616f523301d2 100644 (file)
@@ -21,13 +21,13 @@ class ACLStringData : public ACLData<char const *>
 
 public:
     ACLStringData() {}
-    virtual ~ACLStringData() {}
+    ~ACLStringData() override {}
     /// \deprecated use match(SBuf&) instead.
-    bool match(char const *);
+    bool match(char const *) override;
     bool match(const SBuf &);
-    virtual SBufList dump() const;
-    virtual void parse();
-    bool empty() const;
+    SBufList dump() const override;
+    void parse() override;
+    bool empty() const override;
 
     /// Insert a string data value
     void insert(const char *);
index d6f0624109a5d3237186039990d034d77d5077f6..85d9ed69cf8378dc66cd8dfb27d9ad065d339f41 100644 (file)
@@ -15,7 +15,7 @@ class ACLTagStrategy : public ACLStrategy<const char *>
 {
 
 public:
-    virtual int match (ACLData<MatchType> * &, ACLFilledChecklist *) override;
+    int match (ACLData<MatchType> * &, ACLFilledChecklist *) override;
 };
 
 #endif /* SQUID_ACLMYPORTNAME_H */
index cf18050bbc4400de58509409a09934d2afd2c87e..8fa0c6e419260de97138bc0d59b36ab7421570d5 100644 (file)
@@ -15,7 +15,7 @@ class ACLTimeStrategy : public ACLStrategy<time_t>
 {
 
 public:
-    virtual int match (ACLData<MatchType> * &, ACLFilledChecklist *) override;
+    int match (ACLData<MatchType> * &, ACLFilledChecklist *) override;
 };
 
 #endif /* SQUID_ACLTIME_H */
index 260850958cbfba08c63e16b884f0ec50e62ae3f7..07c841d2dc4513adc06ac8012b6d95aa9605b414 100644 (file)
@@ -18,11 +18,11 @@ class ACLTimeData : public ACLData<time_t>
 
 public:
     ACLTimeData();
-    virtual ~ACLTimeData();
-    bool match(time_t);
-    virtual SBufList dump() const;
-    void parse();
-    bool empty() const;
+    ~ACLTimeData() override;
+    bool match(time_t) override;
+    SBufList dump() const override;
+    void parse() override;
+    bool empty() const override;
 
 private:
     int weekbits;
index c87feb3c8f8220ef860808800c05ca1ec29f8b22..7cedf346449649451fdf397f07b4c3f6d9e112ff 100644 (file)
@@ -24,12 +24,12 @@ class TransactionInitiator : public ACL
 public:
     TransactionInitiator(char const *);
 
-    virtual char const *typeString() const;
-    virtual void parse();
-    virtual int match(ACLChecklist *checklist);
-    virtual bool requiresRequest() const { return true; }
-    virtual SBufList dump() const;
-    virtual bool empty () const;
+    char const *typeString() const override;
+    void parse() override;
+    int match(ACLChecklist *checklist) override;
+    bool requiresRequest() const override { return true; }
+    SBufList dump() const override;
+    bool empty () const override;
 
 protected:
     char const *class_;
index 8051080f9079ef57e4a5d30511981713d0251c9f..1474d283cbaf8e4fbea36bcf14397ee8cb5e7df5 100644 (file)
@@ -41,7 +41,7 @@ public:
 
 protected:
     /// Acl::OrNode API
-    virtual bool bannedAction(ACLChecklist *, Nodes::const_iterator) const override;
+    bool bannedAction(ACLChecklist *, Nodes::const_iterator) const override;
     Answer actionAt(const Nodes::size_type pos) const;
 
     /// if not empty, contains actions corresponding to InnerNode::nodes
index 8cd63fd2e97aa0d5b2581aa0420fb1d4a144e7ea..dad0713360e004fb6ddf78db9e22bbbc07a89d9d 100644 (file)
@@ -16,8 +16,8 @@ class ACLUrlStrategy : public ACLStrategy<char const *>
 {
 
 public:
-    virtual int match (ACLData<char const *> * &, ACLFilledChecklist *);
-    virtual bool requiresRequest() const {return true;}
+    int match (ACLData<char const *> * &, ACLFilledChecklist *) override;
+    bool requiresRequest() const override {return true;}
 };
 
 #endif /* SQUID_ACLURL_H */
index 10538f70b969cbf0eb74b229b574429391a87737..454a851fc3b330c1829c9e7905a1aad35e4010eb 100644 (file)
@@ -17,8 +17,8 @@ class ACLUrlLoginStrategy : public ACLStrategy<char const *>
 {
 
 public:
-    virtual int match (ACLData<char const *> * &, ACLFilledChecklist *);
-    virtual bool requiresRequest() const {return true;}
+    int match (ACLData<char const *> * &, ACLFilledChecklist *) override;
+    bool requiresRequest() const override {return true;}
 };
 
 #endif /* SQUID_ACLURLLOGIN_H */
index 419d44fc1754e197ff25b8d1d31f7e38d5f75987..6ea5bcbb2900782e465305f9e741814c6fbe36e8 100644 (file)
@@ -15,8 +15,8 @@ class ACLUrlPathStrategy : public ACLStrategy<char const *>
 {
 
 public:
-    virtual int match (ACLData<char const *> * &, ACLFilledChecklist *);
-    virtual bool requiresRequest() const {return true;}
+    int match (ACLData<char const *> * &, ACLFilledChecklist *) override;
+    bool requiresRequest() const override {return true;}
 };
 
 #endif /* SQUID_ACLURLPATH_H */
index e14b9320b179d18ba468b5c6ba2843fa39d590e1..b24c6fb3aa9e2374878b28767b461f0571b62644 100644 (file)
@@ -15,8 +15,8 @@ class ACLUrlPortStrategy : public ACLStrategy<int>
 {
 
 public:
-    virtual int match (ACLData<MatchType> * &, ACLFilledChecklist *);
-    virtual bool requiresRequest() const {return true;}
+    int match (ACLData<MatchType> * &, ACLFilledChecklist *) override;
+    bool requiresRequest() const override {return true;}
 };
 
 #endif /* SQUID_ACLURLPORT_H */
index 939699fc901b710d116bc2a0686dc9761878fa70..9c2d5440b747c9cc6dd83513b673d51dffedef40 100644 (file)
@@ -20,19 +20,19 @@ class ACLUserData : public ACLData<char const *>
     MEMPROXY_CLASS(ACLUserData);
 
 public:
-    virtual ~ACLUserData() {}
+    ~ACLUserData() override {}
     ACLUserData();
-    bool match(char const *user);
-    virtual SBufList dump() const;
-    virtual void parse();
-    bool empty() const;
+    bool match(char const *user) override;
+    SBufList dump() const override;
+    void parse() override;
+    bool empty() const override;
 
 private:
     /// whether parse() is called in a case insensitive context
     static Acl::BooleanOptionValue CaseInsensitive_;
 
     /* ACLData API */
-    virtual const Acl::Options &lineOptions();
+    const Acl::Options &lineOptions() override;
 
     typedef std::set<SBuf,bool(*)(const SBuf&, const SBuf&)> UserDataNames_t;
     UserDataNames_t userDataNames;
index be4f6417c0063d6ebaceeaa7fe86a8bf77a510b1..65735204894cfc902f275912484b95ee6b344a17 100644 (file)
@@ -29,7 +29,7 @@ class AccessRule;
 // checks adaptation_access rules to find a matching adaptation service
 class AccessCheck: public virtual AsyncJob
 {
-    CBDATA_CLASS(AccessCheck);
+    CBDATA_CHILD(AccessCheck);
 
 public:
     typedef void AccessCheckCallback(ServiceGroupPointer group, void *data);
@@ -41,7 +41,7 @@ public:
 protected:
     // use Start to start adaptation checks
     AccessCheck(const ServiceFilter &aFilter, Adaptation::Initiator *);
-    ~AccessCheck();
+    ~AccessCheck() override;
 
 private:
     const ServiceFilter filter;
@@ -64,8 +64,8 @@ public:
 
 protected:
     // AsyncJob API
-    virtual void start();
-    virtual bool doneAll() const { return false; } /// not done until mustStop
+    void start() override;
+    bool doneAll() const override { return false; } /// not done until mustStop
 
     bool usedDynamicRules();
     void check();
index 8b3efed44c42757f92564aa8e2c45221c2704112..4da33aa80f043550f4f8ae437c9732917eb458af 100644 (file)
@@ -25,11 +25,11 @@ class AnswerCall: public AsyncCallT<AnswerDialer>
 public:
     AnswerCall(const char *aName, const AnswerDialer &aDialer) :
         AsyncCallT<AnswerDialer>(93, 5, aName, aDialer), fired(false) {}
-    virtual void fire() {
+    void fire() override {
         fired = true;
         AsyncCallT<AnswerDialer>::fire();
     }
-    virtual ~AnswerCall() {
+    ~AnswerCall() override {
         if (!fired && dialer.arg1.message != nullptr && dialer.arg1.message->body_pipe != nullptr)
             dialer.arg1.message->body_pipe->expectNoConsumption();
     }
index 0e8b3ac5a0316001a5f1a2aca7a5802e7f630bd6..8ca6202fa5b49d7303c2203650c363a5bbe06d00 100644 (file)
@@ -32,7 +32,7 @@ class Initiate: virtual public AsyncJob
 
 public:
     Initiate(const char *aTypeName);
-    virtual ~Initiate();
+    ~Initiate() override;
 
     void initiator(const CbcPointer<Initiator> &i); ///< sets initiator
 
@@ -44,9 +44,9 @@ protected:
     void tellQueryAborted(bool final); // tell initiator
     void clearInitiator(); // used by noteInitiatorAborted; TODO: make private
 
-    virtual void swanSong(); // internal cleanup
+    void swanSong() override; // internal cleanup
 
-    virtual const char *status() const; // for debugging
+    const char *status() const override; // for debugging
 
     CbcPointer<Initiator> theInitiator;
 
index d1f92f08682d8946f6c63c75335baec55a7e5e0b..e9f2210d5346caf1285dc66fb74966dcc3d82f96 100644 (file)
@@ -29,7 +29,7 @@ class Initiator: virtual public AsyncJob
 {
 public:
     Initiator(): AsyncJob("Initiator") {}
-    virtual ~Initiator() {}
+    ~Initiator() override {}
 
     /// AccessCheck calls this back with a possibly nil service group
     /// to signal whether adaptation is needed and where it should start.
index c4ee54be846d1b1847f330fe8d28caa7922e27a7..19889d062376757ce04d7f1826c6c49069074b14 100644 (file)
@@ -30,25 +30,25 @@ namespace Adaptation
 /// iterates services in ServiceGroup, starting adaptation launchers
 class Iterator: public Initiate, public Initiator
 {
-    CBDATA_CLASS(Iterator);
+    CBDATA_CHILD(Iterator);
 
 public:
     Iterator(Http::Message *virginHeader, HttpRequest *virginCause,
              const AccessLogEntryPointer &,
              const Adaptation::ServiceGroupPointer &aGroup);
-    virtual ~Iterator();
+    ~Iterator() override;
 
     // Adaptation::Initiate: asynchronous communication with the initiator
-    void noteInitiatorAborted();
+    void noteInitiatorAborted() override;
 
     // Adaptation::Initiator: asynchronous communication with the current launcher
-    virtual void noteAdaptationAnswer(const Answer &answer);
+    void noteAdaptationAnswer(const Answer &answer) override;
 
 protected:
     // Adaptation::Initiate API implementation
-    virtual void start();
-    virtual bool doneAll() const;
-    virtual void swanSong();
+    void start() override;
+    bool doneAll() const override;
+    void swanSong() override;
 
     /// launches adaptation for the service selected by the plan
     void step();
index 10d98b4d638dedc97af6e8e5745b1da57babe887..138e531d847bfb4f8f50ff51b12ac51218d6afa5 100644 (file)
@@ -32,7 +32,7 @@ public:
 
 public:
     explicit Service(const ServiceConfigPointer &aConfig);
-    virtual ~Service();
+    ~Service() override;
 
     virtual bool probed() const = 0; // see comments above
     virtual bool broken() const;
index c2d7fb3e09c3f6cd666cb971f1b51271293f1ea5..2914723e14a10866035d8f6e6a236bd1eb115ce7 100644 (file)
@@ -33,7 +33,7 @@ public:
 
 public:
     ServiceGroup(const String &aKind, bool areAllServicesSame);
-    virtual ~ServiceGroup();
+    ~ServiceGroup() override;
 
     virtual void parse();
     virtual void finalize(); // called after all are parsed
index dfaa93527a3d1217cd5adb0120d3d01b745ddf58..0c15e1f4eebb96dbbc34e8affe3d0a151ba8ddc9 100644 (file)
@@ -26,7 +26,7 @@ class ServiceConfig: public Adaptation::ServiceConfig
 {
 public:
     // Adaptation::ServiceConfig API
-    virtual bool grokExtension(const char *name, const char *value);
+    bool grokExtension(const char *name, const char *value) override;
 
 public:
     typedef std::pair<std::string, std::string> Extension; // name=value in cfg
@@ -40,18 +40,18 @@ class Config: public Adaptation::Config
 
 public:
     Config();
-    ~Config();
+    ~Config() override;
 
-    virtual bool finalize();
+    bool finalize() override;
 
 protected:
-    virtual Adaptation::ServiceConfig *newServiceConfig() const;
+    Adaptation::ServiceConfig *newServiceConfig() const override;
 
 private:
     Config(const Config &); // not implemented
     Config &operator =(const Config &); // not implemented
 
-    virtual Adaptation::ServicePointer createService(const ServiceConfigPointer &cfg);
+    Adaptation::ServicePointer createService(const ServiceConfigPointer &cfg) override;
 };
 
 extern Config TheConfig;
index 82c71e9f1a8d1cbdafe20bcfd6e266b05ba14d60..0c3bc275d3c7bed2a4101f875da7fdce18b6cd52 100644 (file)
@@ -23,14 +23,14 @@ class Host : public libecap::host::Host
 {
 public:
     /* libecap::host::Host API */
-    virtual std::string uri() const; // unique across all vendors
-    virtual void describe(std::ostream &os) const; // free-format info
-    virtual void noteVersionedService(const char *libEcapVersion, const libecap::weak_ptr<libecap::adapter::Service> &s);
-    virtual std::ostream *openDebug(libecap::LogVerbosity lv);
-    virtual void closeDebug(std::ostream *debug);
+    std::string uri() const override; // unique across all vendors
+    void describe(std::ostream &os) const override; // free-format info
+    void noteVersionedService(const char *libEcapVersion, const libecap::weak_ptr<libecap::adapter::Service> &s) override;
+    std::ostream *openDebug(libecap::LogVerbosity lv) override;
+    void closeDebug(std::ostream *debug) override;
     typedef libecap::shared_ptr<libecap::Message> MessagePtr;
-    virtual MessagePtr newRequest() const;
-    virtual MessagePtr newResponse() const;
+    MessagePtr newRequest() const override;
+    MessagePtr newResponse() const override;
 
     static void Register(); ///< register adaptation host
 
index d91a9dd1a6393094d4fd9eb762542df8523757a5..c5e34cb3e12a62813ddce99b72663485610dbc8a 100644 (file)
@@ -40,13 +40,13 @@ public:
     HeaderRep(Http::Message &aMessage);
 
     /* libecap::Header API */
-    virtual bool hasAny(const Name &name) const;
-    virtual Value value(const Name &name) const;
-    virtual void add(const Name &name, const Value &value);
-    virtual void removeAny(const Name &name);
-    virtual void visitEach(libecap::NamedValueVisitor &visitor) const;
-    virtual Area image() const;
-    virtual void parse(const Area &buf); // throws on failures
+    bool hasAny(const Name &name) const override;
+    Value value(const Name &name) const override;
+    void add(const Name &name, const Value &value) override;
+    void removeAny(const Name &name) override;
+    void visitEach(libecap::NamedValueVisitor &visitor) const override;
+    Area image() const override;
+    void parse(const Area &buf) override; // throws on failures
 
 protected:
     static Http::HdrType TranslateHeaderId(const Name &name);
@@ -88,14 +88,14 @@ public:
     RequestLineRep(HttpRequest &aMessage);
 
     /* libecap::RequestLine API */
-    virtual void uri(const Area &aUri);
-    virtual Area uri() const;
-    virtual void method(const Name &aMethod);
-    virtual Name method() const;
-    virtual libecap::Version version() const;
-    virtual void version(const libecap::Version &aVersion);
-    virtual Name protocol() const;
-    virtual void protocol(const Name &aProtocol);
+    void uri(const Area &aUri) override;
+    Area uri() const override;
+    void method(const Name &aMethod) override;
+    Name method() const override;
+    libecap::Version version() const override;
+    void version(const libecap::Version &aVersion) override;
+    Name protocol() const override;
+    void protocol(const Name &aProtocol) override;
 
 private:
     HttpRequest &theMessage; // the request header being translated to libecap
@@ -112,14 +112,14 @@ public:
     StatusLineRep(HttpReply &aMessage);
 
     /* libecap::StatusLine API */
-    virtual void statusCode(int code);
-    virtual int statusCode() const;
-    virtual void reasonPhrase(const Area &phrase);
-    virtual Area reasonPhrase() const;
-    virtual libecap::Version version() const;
-    virtual void version(const libecap::Version &aVersion);
-    virtual Name protocol() const;
-    virtual void protocol(const Name &aProtocol);
+    void statusCode(int code) override;
+    int statusCode() const override;
+    void reasonPhrase(const Area &phrase) override;
+    Area reasonPhrase() const override;
+    libecap::Version version() const override;
+    void version(const libecap::Version &aVersion) override;
+    Name protocol() const override;
+    void protocol(const Name &aProtocol) override;
 
 private:
     HttpReply &theMessage; // the request header being translated to libecap
@@ -137,7 +137,7 @@ public:
     void tie(const BodyPipe::Pointer &aBody); // late binding if !theBody;
 
     // libecap::Body API
-    virtual BodySize bodySize() const;
+    BodySize bodySize() const override;
 
 private:
     BodyPipe::Pointer theBody; // the body being translated to libecap
@@ -148,17 +148,17 @@ class MessageRep: public libecap::Message
 {
 public:
     explicit MessageRep(Http::Message *rawHeader);
-    virtual ~MessageRep();
+    ~MessageRep() override;
 
     /* libecap::Message API */
-    virtual libecap::shared_ptr<libecap::Message> clone() const;
-    virtual libecap::FirstLine &firstLine();
-    virtual const libecap::FirstLine &firstLine() const;
-    virtual libecap::Header &header();
-    virtual const libecap::Header &header() const;
-    virtual void addBody();
-    virtual libecap::Body *body();
-    virtual const libecap::Body *body() const;
+    libecap::shared_ptr<libecap::Message> clone() const override;
+    libecap::FirstLine &firstLine() override;
+    const libecap::FirstLine &firstLine() const override;
+    libecap::Header &header() override;
+    const libecap::Header &header() const override;
+    void addBody() override;
+    libecap::Body *body() override;
+    const libecap::Body *body() const override;
 
     void tieBody(Ecap::XactionRep *x); // to a specific transaction
 
index bc802f1ef2f56e95ac734f1e84731bc5734f2b7f..eae7333e3f974a9d3fe5c2a11b043755305c783f 100644 (file)
@@ -48,8 +48,8 @@ public:
     ConfigRep(const Master &aMaster);
 
     // libecap::Options API
-    virtual const libecap::Area option(const libecap::Name &name) const;
-    virtual void visitEachOption(libecap::NamedValueVisitor &visitor) const;
+    const libecap::Area option(const libecap::Name &name) const override;
+    void visitEachOption(libecap::NamedValueVisitor &visitor) const override;
 
     const Master &master; ///< the configuration being wrapped
 };
@@ -59,7 +59,7 @@ class Engine: public AsyncEngine
 {
 public:
     /* AsyncEngine API */
-    virtual int checkEvents(int timeout);
+    int checkEvents(int timeout) override;
 
 private:
     void kickAsyncServices(timeval &timeout);
index 30b0d3c7944685e5ba0160cba24f634536890312..9a90b8de9d533b11ad1514bb2350780cffc61ded 100644 (file)
@@ -29,20 +29,20 @@ class ServiceRep : public Adaptation::Service
 {
 public:
     explicit ServiceRep(const ServiceConfigPointer &aConfig);
-    virtual ~ServiceRep();
+    ~ServiceRep() override;
 
     typedef libecap::shared_ptr<libecap::adapter::Service> AdapterService;
 
     /* Adaptation::Service API */
-    virtual void finalize();
-    virtual bool probed() const;
-    virtual bool up() const;
-    virtual Adaptation::Initiate *makeXactLauncher(Http::Message *virginHeader, HttpRequest *virginCause, AccessLogEntry::Pointer &alp);
-    virtual bool wantsUrl(const SBuf &urlPath) const;
-    virtual void noteFailure();
+    void finalize() override;
+    bool probed() const override;
+    bool up() const override;
+    Adaptation::Initiate *makeXactLauncher(Http::Message *virginHeader, HttpRequest *virginCause, AccessLogEntry::Pointer &alp) override;
+    bool wantsUrl(const SBuf &urlPath) const override;
+    void noteFailure() override;
     virtual const char *status() const;
-    virtual void detach();
-    virtual bool detached() const;
+    void detach() override;
+    bool detached() const override;
 
 protected:
     void tryConfigureAndStart();
index ef361e01dd1df27c0a581bac0ae6bb9ae39b859e..a7ba3bb538fc301215bac017abddd9286064ae17 100644 (file)
@@ -37,7 +37,7 @@ public:
     OptionsExtractor(HttpHeader &aMeta): meta(aMeta) {}
 
     // libecap::NamedValueVisitor API
-    virtual void visit(const Name &name, const Area &value) {
+    void visit(const Name &name, const Area &value) override {
         meta.putExt(name.image().c_str(), value.toString().c_str());
     }
 
index 84ec2f79d89baba3e982bb3e5545599e6f679dc8..46996e2995f7c66d21c887735f3eb78987193ea0 100644 (file)
@@ -32,53 +32,53 @@ namespace Ecap
 class XactionRep : public Adaptation::Initiate, public libecap::host::Xaction,
     public BodyConsumer, public BodyProducer
 {
-    CBDATA_CLASS(XactionRep);
+    CBDATA_CHILD(XactionRep);
 
 public:
     XactionRep(Http::Message *virginHeader, HttpRequest *virginCause, AccessLogEntry::Pointer &alp, const Adaptation::ServicePointer &service);
-    virtual ~XactionRep();
+    ~XactionRep() override;
 
     typedef libecap::shared_ptr<libecap::adapter::Xaction> AdapterXaction;
     void master(const AdapterXaction &aMaster); // establish a link
 
     // libecap::host::Xaction API
-    virtual const libecap::Area option(const libecap::Name &name) const;
-    virtual void visitEachOption(libecap::NamedValueVisitor &visitor) const;
-    virtual libecap::Message &virgin();
-    virtual const libecap::Message &cause();
-    virtual libecap::Message &adapted();
-    virtual void useVirgin();
-    virtual void useAdapted(const libecap::shared_ptr<libecap::Message> &msg);
-    virtual void blockVirgin();
-    virtual void adaptationDelayed(const libecap::Delay &);
-    virtual void adaptationAborted();
-    virtual void resume();
-    virtual void vbDiscard();
-    virtual void vbMake();
-    virtual void vbStopMaking();
-    virtual void vbMakeMore();
-    virtual libecap::Area vbContent(libecap::size_type offset, libecap::size_type size);
-    virtual void vbContentShift(libecap::size_type size);
-    virtual void noteAbContentDone(bool atEnd);
-    virtual void noteAbContentAvailable();
+    const libecap::Area option(const libecap::Name &name) const override;
+    void visitEachOption(libecap::NamedValueVisitor &visitor) const override;
+    libecap::Message &virgin() override;
+    const libecap::Message &cause() override;
+    libecap::Message &adapted() override;
+    void useVirgin() override;
+    void useAdapted(const libecap::shared_ptr<libecap::Message> &msg) override;
+    void blockVirgin() override;
+    void adaptationDelayed(const libecap::Delay &) override;
+    void adaptationAborted() override;
+    void resume() override;
+    void vbDiscard() override;
+    void vbMake() override;
+    void vbStopMaking() override;
+    void vbMakeMore() override;
+    libecap::Area vbContent(libecap::size_type offset, libecap::size_type size) override;
+    void vbContentShift(libecap::size_type size) override;
+    void noteAbContentDone(bool atEnd) override;
+    void noteAbContentAvailable() override;
 
     // BodyProducer API
-    virtual void noteMoreBodySpaceAvailable(RefCount<BodyPipe> bp);
-    virtual void noteBodyConsumerAborted(RefCount<BodyPipe> bp);
+    void noteMoreBodySpaceAvailable(RefCount<BodyPipe> bp) override;
+    void noteBodyConsumerAborted(RefCount<BodyPipe> bp) override;
 
     // BodyConsumer API
-    virtual void noteMoreBodyDataAvailable(RefCount<BodyPipe> bp);
-    virtual void noteBodyProductionEnded(RefCount<BodyPipe> bp);
-    virtual void noteBodyProducerAborted(RefCount<BodyPipe> bp);
+    void noteMoreBodyDataAvailable(RefCount<BodyPipe> bp) override;
+    void noteBodyProductionEnded(RefCount<BodyPipe> bp) override;
+    void noteBodyProducerAborted(RefCount<BodyPipe> bp) override;
 
     // Initiate API
-    virtual void noteInitiatorAborted();
+    void noteInitiatorAborted() override;
 
     // AsyncJob API (via Initiate)
-    virtual void start();
-    virtual bool doneAll() const;
-    virtual void swanSong();
-    virtual const char *status() const;
+    void start() override;
+    bool doneAll() const override;
+    void swanSong() override;
+    const char *status() const override;
 
 protected:
     Service &service();
index 5935f8f75934ee94aa910a4f792df00d5b99e0d3..6e3c1bfc76426ce82709302cbfae70061a6f68e5 100644 (file)
@@ -39,7 +39,7 @@ public:
     int repeat_limit; ///< icap_retry_limit in squid.conf
 
     Config();
-    ~Config();
+    ~Config() override;
 
     time_t connect_timeout(bool bypassable) const;
     time_t io_timeout(bool bypassable) const;
@@ -48,7 +48,7 @@ private:
     Config(const Config &); // not implemented
     Config &operator =(const Config &); // not implemented
 
-    virtual Adaptation::ServicePointer createService(const ServiceConfigPointer &cfg);
+    Adaptation::ServicePointer createService(const ServiceConfigPointer &cfg) override;
 };
 
 extern Config TheConfig;
index 20f632debe809980c9269388ce444f83d9bb083a..f23fabe3d9a7e74b100c127c2ae98592dd201835 100644 (file)
@@ -48,13 +48,13 @@ class Launcher: public Adaptation::Initiate, public Adaptation::Initiator
 {
 public:
     Launcher(const char *aTypeName, Adaptation::ServicePointer &aService);
-    virtual ~Launcher();
+    ~Launcher() override;
 
     // Adaptation::Initiate: asynchronous communication with the initiator
-    void noteInitiatorAborted();
+    void noteInitiatorAborted() override;
 
     // Adaptation::Initiator: asynchronous communication with the current transaction
-    virtual void noteAdaptationAnswer(const Answer &answer);
+    void noteAdaptationAnswer(const Answer &answer) override;
     virtual void noteXactAbort(XactAbortInfo info);
 
 private:
@@ -63,9 +63,9 @@ private:
 
 protected:
     // Adaptation::Initiate API implementation
-    virtual void start();
-    virtual bool doneAll() const;
-    virtual void swanSong();
+    void start() override;
+    bool doneAll() const override;
+    void swanSong() override;
 
     // creates the right ICAP transaction using stored configuration params
     virtual Xaction *createXaction() = 0;
index 2fda1318b8d6cc4fec46ae41da71035c27263c12..780663e11ae72409e126e9893bddddbe26e17228 100644 (file)
@@ -126,7 +126,7 @@ class ChunkExtensionValueParser: public Http1::ChunkExtensionValueParser
 {
 public:
     /* Http1::ChunkExtensionValueParser API */
-    virtual void parse(Tokenizer &tok, const SBuf &extName) override;
+    void parse(Tokenizer &tok, const SBuf &extName) override;
 
     bool sawUseOriginalBody() const { return useOriginalBody_ >= 0; }
     uint64_t useOriginalBody() const { assert(sawUseOriginalBody()); return static_cast<uint64_t>(useOriginalBody_); }
@@ -140,25 +140,25 @@ private:
 
 class ModXact: public Xaction, public BodyProducer, public BodyConsumer
 {
-    CBDATA_CLASS(ModXact);
+    CBDATA_CHILD(ModXact);
 
 public:
     ModXact(Http::Message *virginHeader, HttpRequest *virginCause, AccessLogEntry::Pointer &alp, ServiceRep::Pointer &s);
-    virtual ~ModXact();
+    ~ModXact() override;
 
     // BodyProducer methods
-    virtual void noteMoreBodySpaceAvailable(BodyPipe::Pointer);
-    virtual void noteBodyConsumerAborted(BodyPipe::Pointer);
+    void noteMoreBodySpaceAvailable(BodyPipe::Pointer) override;
+    void noteBodyConsumerAborted(BodyPipe::Pointer) override;
 
     // BodyConsumer methods
-    virtual void noteMoreBodyDataAvailable(BodyPipe::Pointer);
-    virtual void noteBodyProductionEnded(BodyPipe::Pointer);
-    virtual void noteBodyProducerAborted(BodyPipe::Pointer);
+    void noteMoreBodyDataAvailable(BodyPipe::Pointer) override;
+    void noteBodyProductionEnded(BodyPipe::Pointer) override;
+    void noteBodyProducerAborted(BodyPipe::Pointer) override;
 
     /* Xaction API */
-    virtual void startShoveling();
-    virtual void handleCommWrote(size_t size);
-    virtual void handleCommRead(size_t size);
+    void startShoveling() override;
+    void handleCommWrote(size_t size) override;
+    void handleCommRead(size_t size) override;
 
     void handleCommWroteHeaders();
     void handleCommWroteBody();
@@ -172,17 +172,17 @@ public:
     InOut adapted;
 
     // bypasses exceptions if needed and possible
-    virtual void callException(const std::exception &e);
+    void callException(const std::exception &e) override;
 
     /// record error detail in the virgin request if possible
-    virtual void detailError(const ErrorDetail::Pointer &errDetail);
+    void detailError(const ErrorDetail::Pointer &errDetail) override;
     // Icap::Xaction API
-    virtual void clearError();
+    void clearError() override;
     /// The master transaction log entry
-    virtual AccessLogEntry::Pointer masterLogEntry() { return alMaster; }
+    AccessLogEntry::Pointer masterLogEntry() override { return alMaster; }
 
 private:
-    virtual void start();
+    void start() override;
 
     /// locates the request, either as a cause or as a virgin message itself
     const HttpRequest &virginRequest() const; // Must always be available
@@ -204,8 +204,8 @@ private:
 
     void startReading();
     void readMore();
-    virtual bool doneReading() const { return commEof || state.doneParsing(); }
-    virtual bool doneWriting() const { return state.doneWriting(); }
+    bool doneReading() const override { return commEof || state.doneParsing(); }
+    bool doneWriting() const override { return state.doneWriting(); }
 
     size_t virginContentSize(const VirginBodyAct &act) const;
     const char *virginContentData(const VirginBodyAct &act) const;
@@ -260,8 +260,8 @@ private:
     void echoMore();
     void updateSources(); ///< Update the Http::Message sources
 
-    virtual bool doneAll() const;
-    virtual void swanSong();
+    bool doneAll() const override;
+    void swanSong() override;
 
     void stopReceiving();
     void stopSending(bool nicely);
@@ -269,9 +269,9 @@ private:
     void stopParsing(const bool checkUnparsedData = true);
     void stopBackup();
 
-    virtual void fillPendingStatus(MemBuf &buf) const;
-    virtual void fillDoneStatus(MemBuf &buf) const;
-    virtual bool fillVirginHttpHeader(MemBuf&) const;
+    void fillPendingStatus(MemBuf &buf) const override;
+    void fillDoneStatus(MemBuf &buf) const override;
+    bool fillVirginHttpHeader(MemBuf&) const override;
 
 private:
     /// parses a message header or trailer
@@ -292,7 +292,7 @@ private:
     bool expectIcapTrailers() const;
     void checkConsuming();
 
-    virtual void finalizeLogInfo();
+    void finalizeLogInfo() override;
 
     SizedEstimate virginBody;
     VirginBodyAct virginBodyWriting; // virgin body writing state
@@ -377,15 +377,15 @@ private:
 // creates ModXact when needed
 class ModXactLauncher: public Launcher
 {
-    CBDATA_CLASS(ModXactLauncher);
+    CBDATA_CHILD(ModXactLauncher);
 
 public:
     ModXactLauncher(Http::Message *virginHeader, HttpRequest *virginCause, AccessLogEntry::Pointer &alp, Adaptation::ServicePointer s);
 
 protected:
-    virtual Xaction *createXaction();
+    Xaction *createXaction() override;
 
-    virtual void swanSong();
+    void swanSong() override;
 
     /// starts or stops transaction accounting in ICAP history
     void updateHistory(bool start);
index 725cd6225e55c8f64277c0211b4f71ef7c9c03fb..293620581a3515a645008a7b93bfe2f314b762a1 100644 (file)
@@ -24,28 +24,28 @@ namespace Icap
 
 class OptXact: public Xaction
 {
-    CBDATA_CLASS(OptXact);
+    CBDATA_CHILD(OptXact);
 
 public:
     OptXact(ServiceRep::Pointer &aService);
 
 protected:
     /* Xaction API */
-    virtual void start();
-    virtual void startShoveling();
-    virtual void handleCommWrote(size_t size);
-    virtual void handleCommRead(size_t size);
+    void start() override;
+    void startShoveling() override;
+    void handleCommWrote(size_t size) override;
+    void handleCommRead(size_t size) override;
 
     void makeRequest(MemBuf &buf);
     bool parseResponse();
 
     void startReading();
-    virtual bool doneReading() const { return commEof || readAll; }
+    bool doneReading() const override { return commEof || readAll; }
 
-    virtual void swanSong();
+    void swanSong() override;
 
 private:
-    virtual void finalizeLogInfo();
+    void finalizeLogInfo() override;
 
     bool readAll; ///< read the entire OPTIONS response
 };
@@ -54,13 +54,13 @@ private:
 // creates OptXact when needed
 class OptXactLauncher: public Launcher
 {
-    CBDATA_CLASS(OptXactLauncher);
+    CBDATA_CHILD(OptXactLauncher);
 
 public:
     OptXactLauncher(Adaptation::ServicePointer aService);
 
 protected:
-    virtual Xaction *createXaction();
+    Xaction *createXaction() override;
 };
 
 } // namespace Icap
index cca2df4ab089c1948be029c9998ee4ae52c0fb1a..48b3779352a404f688d36f721d603e61f4a4d152 100644 (file)
@@ -59,29 +59,29 @@ class OptXact;
 class ServiceRep : public RefCountable, public Adaptation::Service,
     public Adaptation::Initiator
 {
-    CBDATA_CLASS(ServiceRep);
+    CBDATA_CHILD(ServiceRep);
 
 public:
     typedef RefCount<ServiceRep> Pointer;
 
 public:
     explicit ServiceRep(const ServiceConfigPointer &aConfig);
-    virtual ~ServiceRep();
+    ~ServiceRep() override;
 
-    virtual void finalize();
+    void finalize() override;
 
-    virtual bool probed() const; // see comments above
-    virtual bool up() const; // see comments above
+    bool probed() const override; // see comments above
+    bool up() const override; // see comments above
     bool availableForNew() const; ///< a new transaction may start communicating with the service
     bool availableForOld() const; ///< a transaction notified about connection slot availability may start communicating with the service
 
-    virtual Initiate *makeXactLauncher(Http::Message *virginHeader, HttpRequest *virginCause, AccessLogEntry::Pointer &alp);
+    Initiate *makeXactLauncher(Http::Message *virginHeader, HttpRequest *virginCause, AccessLogEntry::Pointer &alp) override;
 
     void callWhenAvailable(AsyncCall::Pointer &cb, bool priority = false);
     void callWhenReady(AsyncCall::Pointer &cb);
 
     // the methods below can only be called on an up() service
-    bool wantsUrl(const SBuf &urlPath) const;
+    bool wantsUrl(const SBuf &urlPath) const override;
     bool wantsPreview(const SBuf &urlPath, size_t &wantedSize) const;
     bool allows204() const;
     bool allows206() const;
@@ -91,25 +91,25 @@ public:
     void noteConnectionUse(const Comm::ConnectionPointer &conn);
     void noteConnectionFailed(const char *comment);
 
-    void noteFailure(); // called by transactions to report service failure
+    void noteFailure() override; // called by transactions to report service failure
 
     void noteNewWaiter() {theAllWaiters++;} ///< New xaction waiting for service to be up or available
     void noteGoneWaiter(); ///< An xaction is not waiting any more for service to be available
     bool existWaiters() const {return (theAllWaiters > 0);} ///< if there are xactions waiting for the service to be available
 
     //AsyncJob virtual methods
-    virtual bool doneAll() const { return Adaptation::Initiator::doneAll() && false;}
-    virtual void callException(const std::exception &e);
+    bool doneAll() const override { return Adaptation::Initiator::doneAll() && false;}
+    void callException(const std::exception &e) override;
 
-    virtual void detach();
-    virtual bool detached() const;
+    void detach() override;
+    bool detached() const override;
 
 public: // treat these as private, they are for callbacks only
     void noteTimeToUpdate();
     void noteTimeToNotify();
 
     // receive either an ICAP OPTIONS response header or an abort message
-    virtual void noteAdaptationAnswer(const Answer &answer);
+    void noteAdaptationAnswer(const Answer &answer) override;
 
     Security::ContextPointer sslContext;
     Security::SessionStatePointer sslSession;
@@ -183,7 +183,7 @@ private:
      */
     void busyCheckpoint();
 
-    const char *status() const;
+    const char *status() const override;
 
     mutable bool wasAnnouncedUp; // prevent sequential same-state announcements
     bool isDetached;
@@ -199,7 +199,7 @@ public:
     ServiceRep::Pointer theService;
     ConnWaiterDialer(const CbcPointer<Adaptation::Icap::ModXact> &xact, Adaptation::Icap::ConnWaiterDialer::Parent::Method aHandler);
     ConnWaiterDialer(const Adaptation::Icap::ConnWaiterDialer &aConnWaiter);
-    ~ConnWaiterDialer();
+    ~ConnWaiterDialer() override;
 };
 
 } // namespace Icap
index 2b7103added9b83e20f98a09e9cd2d6b38f49c63..5b434dc4702d082038e179c15119a698f1fe8710 100644 (file)
@@ -40,7 +40,7 @@ namespace Ssl
 {
 /// A simple PeerConnector for Secure ICAP services. No SslBump capabilities.
 class IcapPeerConnector: public Security::PeerConnector {
-    CBDATA_CLASS(IcapPeerConnector);
+    CBDATA_CHILD(IcapPeerConnector);
 public:
     IcapPeerConnector(
         Adaptation::Icap::ServiceRep::Pointer &service,
@@ -52,15 +52,15 @@ public:
         Security::PeerConnector(aServerConn, aCallback, alp, timeout), icapService(service) {}
 
     /* Security::PeerConnector API */
-    virtual bool initialize(Security::SessionPointer &);
-    virtual void noteNegotiationDone(ErrorState *error);
-    virtual Security::ContextPointer getTlsContext() {
+    bool initialize(Security::SessionPointer &) override;
+    void noteNegotiationDone(ErrorState *error) override;
+    Security::ContextPointer getTlsContext() override {
         return icapService->sslContext;
     }
 
 private:
     /* Acl::ChecklistFiller API */
-    virtual void fillChecklist(ACLFilledChecklist &) const;
+    void fillChecklist(ACLFilledChecklist &) const override;
 
     Adaptation::Icap::ServiceRep::Pointer icapService;
 };
index c9444b19d8ff69d83142533e870280efe9b9490b..3c07cc80601d526e6088f3bde40a0bcd8f08aebe 100644 (file)
@@ -45,7 +45,7 @@ class Xaction: public Adaptation::Initiate
 
 public:
     Xaction(const char *aTypeName, ServiceRep::Pointer &aService);
-    virtual ~Xaction();
+    ~Xaction() override;
 
     void disableRetries();
     void disableRepeats(const char *reason);
@@ -67,8 +67,8 @@ public:
     int attempts;
 
 protected:
-    virtual void start();
-    virtual void noteInitiatorAborted(); // TODO: move to Adaptation::Initiate
+    void start() override;
+    void noteInitiatorAborted() override; // TODO: move to Adaptation::Initiate
 
     /// starts sending/receiving ICAP messages
     virtual void startShoveling() = 0;
@@ -97,13 +97,13 @@ protected:
     virtual bool doneReading() const;
     virtual bool doneWriting() const;
     bool doneWithIo() const;
-    virtual bool doneAll() const;
+    bool doneAll() const override;
 
     // called just before the 'done' transaction is deleted
-    virtual void swanSong();
+    void swanSong() override;
 
     // returns a temporary string depicting transaction status, for debugging
-    virtual const char *status() const;
+    const char *status() const override;
     virtual void fillPendingStatus(MemBuf &buf) const;
     virtual void fillDoneStatus(MemBuf &buf) const;
 
@@ -112,8 +112,8 @@ protected:
 
 public:
     // custom exception handling and end-of-call checks
-    virtual void callException(const std::exception  &e);
-    virtual void callEnd();
+    void callException(const std::exception  &e) override;
+    void callEnd() override;
     /// clear stored error details, if any; used for retries/repeats
     virtual void clearError() {}
     virtual AccessLogEntry::Pointer masterLogEntry();
index a89b5ae84959d09271154fa22570828c2a044631..ab14f854de8d2d1cca076a176e466a6f18c51f62 100644 (file)
@@ -27,14 +27,14 @@ public:
     PortCfg();
     // no public copying/moving but see ipV4clone()
     PortCfg(PortCfg &&) = delete;
-    ~PortCfg();
+    ~PortCfg() override;
 
     /// creates the same port configuration but listening on any IPv4 address
     PortCfg *ipV4clone() const;
 
     /* CodeContext API */
-    virtual ScopedId codeContextGist() const override;
-    virtual std::ostream &detailCodeContext(std::ostream &os) const override;
+    ScopedId codeContextGist() const override;
+    std::ostream &detailCodeContext(std::ostream &os) const override;
 
     PortCfgPointer next;
 
index 9669fa5a1f5eaa465ddcc4ddb22a89ff5ed208eb..81fc2da15b5d1dc1a98c29c1681cd7a893d10f0b 100644 (file)
@@ -21,14 +21,14 @@ class ACLMaxUserIP : public ACL
 public:
     explicit ACLMaxUserIP(char const *theClass);
 
-    virtual char const *typeString() const;
-    virtual const Acl::Options &options();
-    virtual void parse();
-    virtual int match(ACLChecklist *cl);
-    virtual SBufList dump() const;
-    virtual bool empty() const;
-    virtual bool valid() const;
-    virtual bool requiresRequest() const {return true;}
+    char const *typeString() const override;
+    const Acl::Options &options() override;
+    void parse() override;
+    int match(ACLChecklist *cl) override;
+    SBufList dump() const override;
+    bool empty() const override;
+    bool valid() const override;
+    bool requiresRequest() const override {return true;}
 
     int getMaximum() const {return maximum;}
 
index 1247230e1e44e83555375c9bf353b2f566847197..3119e3f4e4797d4eede6f60048a0f2d6772ef1e5 100644 (file)
@@ -20,7 +20,7 @@ class ProxyAuthLookup : public ACLChecklist::AsyncState
 
 public:
     static ProxyAuthLookup *Instance();
-    virtual void checkForAsync(ACLChecklist *) const;
+    void checkForAsync(ACLChecklist *) const override;
 
 private:
     static ProxyAuthLookup instance_;
@@ -32,23 +32,23 @@ class ACLProxyAuth : public ACL
     MEMPROXY_CLASS(ACLProxyAuth);
 
 public:
-    ~ACLProxyAuth();
+    ~ACLProxyAuth() override;
     ACLProxyAuth(ACLData<char const *> *, char const *);
 
     /* ACL API */
-    virtual char const *typeString() const;
-    virtual void parse();
-    virtual bool isProxyAuth() const {return true;}
-    virtual int match(ACLChecklist *checklist);
-    virtual SBufList dump() const;
-    virtual bool valid() const;
-    virtual bool empty() const;
-    virtual bool requiresRequest() const {return true;}
-    virtual int matchForCache(ACLChecklist *checklist);
+    char const *typeString() const override;
+    void parse() override;
+    bool isProxyAuth() const override {return true;}
+    int match(ACLChecklist *checklist) override;
+    SBufList dump() const override;
+    bool valid() const override;
+    bool empty() const override;
+    bool requiresRequest() const override {return true;}
+    int matchForCache(ACLChecklist *checklist) override;
 
 private:
     /* ACL API */
-    virtual const Acl::Options &lineOptions();
+    const Acl::Options &lineOptions() override;
 
     int matchProxyAuth(ACLChecklist *);
     ACLData<char const *> *data;
index f16f7c84cd66d59e4168dfdbde188a2709fea1c7..c08c564f1469bc5121846a1d9befdcc353095b83 100644 (file)
@@ -26,19 +26,19 @@ public:
         whichCache(c)
     {}
 
-    virtual ~CredentialCacheRr() {
+    ~CredentialCacheRr() override {
         debugs(29, 5, "Terminating Auth credentials cache: " << name);
         // invalidate the CBDATA reference.
         // causes Auth::*::User::Cache() to produce nil / invalid pointer
         delete whichCache.get();
     }
 
-    virtual void endingShutdown() override {
+    void endingShutdown() override {
         debugs(29, 5, "Clearing Auth credentials cache: " << name);
         whichCache->reset();
     }
 
-    virtual void syncConfig() override {
+    void syncConfig() override {
         debugs(29, 5, "Reconfiguring Auth credentials cache: " << name);
         whichCache->doConfigChangeCleanup();
     }
index 7642ca58eab38ea12c2916b357be543b0ea65bd1..a096b27429f3288433cb7141a84d7e2ca3fda65f 100644 (file)
@@ -33,7 +33,7 @@ public:
 
 public:
     Scheme() : initialised (false) {};
-    virtual ~Scheme() {};
+    ~Scheme() override {};
 
     static void AddScheme(Scheme::Pointer);
 
index 1b6fa66c5c704783982df98a9f0131d1088207b3..5c0649a5f5e31b868dd51954a2f949260f4ce820 100644 (file)
@@ -41,7 +41,7 @@ public:
 protected:
     User(Auth::SchemeConfig *, const char *requestRealm);
 public:
-    virtual ~User();
+    ~User() override;
 
     /* extra fields for proxy_auth */
     /** \deprecated this determines what scheme owns the user data. */
index c4784a75ed6326e3f9ad38029ac316deadfe200b..04ecaff067814cb653e5a173e54e524ca9222475 100644 (file)
@@ -80,7 +80,7 @@ public:
     typedef RefCount<Auth::UserRequest> Pointer;
 
     UserRequest();
-    virtual ~UserRequest();
+    ~UserRequest() override;
     void *operator new(size_t byteCount);
     void operator delete(void *address);
 
index 878cdabdb5885211e2bf0382f44fb77c1268d5ea..1738a97414f882dcf99531eabe35c35bb593e476 100644 (file)
@@ -26,18 +26,18 @@ class Config : public Auth::SchemeConfig
 {
 public:
     Config();
-    virtual bool active() const;
-    virtual bool configured() const;
-    virtual Auth::UserRequest::Pointer decode(char const *proxy_auth, const HttpRequest *request, const char *requestRealm);
-    virtual void done();
-    virtual void rotateHelpers();
-    virtual bool dump(StoreEntry *, const char *, Auth::SchemeConfig *) const;
-    virtual void fixHeader(Auth::UserRequest::Pointer, HttpReply *, Http::HdrType, HttpRequest *);
-    virtual void init(Auth::SchemeConfig *);
-    virtual void parse(Auth::SchemeConfig *, int, char *);
+    bool active() const override;
+    bool configured() const override;
+    Auth::UserRequest::Pointer decode(char const *proxy_auth, const HttpRequest *request, const char *requestRealm) override;
+    void done() override;
+    void rotateHelpers() override;
+    bool dump(StoreEntry *, const char *, Auth::SchemeConfig *) const override;
+    void fixHeader(Auth::UserRequest::Pointer, HttpReply *, Http::HdrType, HttpRequest *) override;
+    void init(Auth::SchemeConfig *) override;
+    void parse(Auth::SchemeConfig *, int, char *) override;
     void decode(char const *httpAuthHeader, Auth::UserRequest::Pointer);
-    virtual void registerWithCacheManager(void);
-    virtual const char * type() const;
+    void registerWithCacheManager(void) override;
+    const char * type() const override;
 
 public:
     time_t credentialsTTL;
index 58c712a58d5f67c41b68044bbd87f5d357edda04..039ba9261f96615dd09343ca20ce89751c50b5ba 100644 (file)
@@ -25,12 +25,12 @@ class Scheme : public Auth::Scheme
 public:
     static Auth::Scheme::Pointer GetInstance();
     Scheme() {};
-    virtual ~Scheme() {}
+    ~Scheme() override {}
 
     /* per scheme */
-    virtual char const *type() const;
-    virtual void shutdownCleanup();
-    virtual Auth::SchemeConfig *createConfig();
+    char const *type() const override;
+    void shutdownCleanup() override;
+    Auth::SchemeConfig *createConfig() override;
     /* Not implemented */
     Scheme(Scheme const &);
     Scheme &operator=(Scheme const &);
index e87a9ab7e21eab54e734067d85f418ef51e48ef6..6a0ce98df82eab289150fc5e3e4f0b7ed0db2cde 100644 (file)
@@ -30,17 +30,17 @@ class User : public Auth::User
 
 public:
     User(Auth::SchemeConfig *, const char *requestRealm);
-    virtual ~User();
+    ~User() override;
     bool authenticated() const;
     bool valid() const;
 
     /** Update the cached password for a username. */
     void updateCached(User *from);
-    virtual int32_t ttl() const override;
+    int32_t ttl() const override;
 
     /* Auth::User API */
     static CbcPointer<Auth::CredentialsCache> Cache();
-    virtual void addToNameCache() override;
+    void addToNameCache() override;
 
     char *passwd;
 
index 800755cfdde3958933ee326a912be7fed412b2c3..397a9b15f5a05d4427589a6e4622700bcab2f8b6 100644 (file)
@@ -30,13 +30,13 @@ class UserRequest : public Auth::UserRequest
 
 public:
     UserRequest() {}
-    virtual ~UserRequest() { assert(LockCount()==0); }
+    ~UserRequest() override { assert(LockCount()==0); }
 
-    virtual int authenticated() const;
-    virtual void authenticate(HttpRequest * request, ConnStateData *conn, Http::HdrType type);
-    virtual Auth::Direction module_direction();
-    virtual void startHelperLookup(HttpRequest * request, AccessLogEntry::Pointer &al, AUTHCB *, void *);
-    virtual const char *credentialsStr();
+    int authenticated() const override;
+    void authenticate(HttpRequest * request, ConnStateData *conn, Http::HdrType type) override;
+    Auth::Direction module_direction() override;
+    void startHelperLookup(HttpRequest * request, AccessLogEntry::Pointer &al, AUTHCB *, void *) override;
+    const char *credentialsStr() override;
 
 private:
     static HLPCB HandleReply;
index 9d3f4f377cee66ca83f90965454b8f280262b09a..274e3dfbf2ba456784c4c2cc02c210636bab5d21 100644 (file)
@@ -73,17 +73,17 @@ class Config : public Auth::SchemeConfig
 {
 public:
     Config();
-    virtual bool active() const;
-    virtual bool configured() const;
-    virtual Auth::UserRequest::Pointer decode(char const *proxy_auth, const HttpRequest *request, const char *requestRealm);
-    virtual void done();
-    virtual void rotateHelpers();
-    virtual bool dump(StoreEntry *, const char *, Auth::SchemeConfig *) const;
-    virtual void fixHeader(Auth::UserRequest::Pointer, HttpReply *, Http::HdrType, HttpRequest *);
-    virtual void init(Auth::SchemeConfig *);
-    virtual void parse(Auth::SchemeConfig *, int, char *);
-    virtual void registerWithCacheManager(void);
-    virtual const char * type() const;
+    bool active() const override;
+    bool configured() const override;
+    Auth::UserRequest::Pointer decode(char const *proxy_auth, const HttpRequest *request, const char *requestRealm) override;
+    void done() override;
+    void rotateHelpers() override;
+    bool dump(StoreEntry *, const char *, Auth::SchemeConfig *) const override;
+    void fixHeader(Auth::UserRequest::Pointer, HttpReply *, Http::HdrType, HttpRequest *) override;
+    void init(Auth::SchemeConfig *) override;
+    void parse(Auth::SchemeConfig *, int, char *) override;
+    void registerWithCacheManager(void) override;
+    const char * type() const override;
 
 public:
     time_t nonceGCInterval;
index 1f62adbe582398b80f11c87a6de101d282210dc7..bb35079d96b7023866e15d5483d4e803e13d65dd 100644 (file)
@@ -25,12 +25,12 @@ class Scheme : public Auth::Scheme
 public:
     static Auth::Scheme::Pointer GetInstance();
     Scheme() {};
-    virtual ~Scheme() {}
+    ~Scheme() override {}
 
     /* per scheme */
-    virtual char const *type () const;
-    virtual void shutdownCleanup();
-    virtual Auth::SchemeConfig *createConfig();
+    char const *type () const override;
+    void shutdownCleanup() override;
+    Auth::SchemeConfig *createConfig() override;
 
     /* Not implemented */
     Scheme(Scheme const &);
index c9135eb9a0632f718beff6bce9e983531d16a8f2..7d2be62c3045dd6f3f47407718d55f08a40cdcab 100644 (file)
@@ -27,13 +27,13 @@ class User : public Auth::User
 
 public:
     User(Auth::SchemeConfig *, const char *requestRealm);
-    virtual ~User();
+    ~User() override;
     int authenticated() const;
-    virtual int32_t ttl() const override;
+    int32_t ttl() const override;
 
     /* Auth::User API */
     static CbcPointer<Auth::CredentialsCache> Cache();
-    virtual void addToNameCache() override;
+    void addToNameCache() override;
 
     HASH HA1;
     int HA1created;
index afc709d5827c17097d9b544760ad3136f5934521..44d602738e5a3854f21e7a029df5d2a4c837e018 100644 (file)
@@ -31,18 +31,18 @@ class UserRequest : public Auth::UserRequest
 
 public:
     UserRequest();
-    virtual ~UserRequest();
+    ~UserRequest() override;
 
-    virtual int authenticated() const;
-    virtual void authenticate(HttpRequest * request, ConnStateData * conn, Http::HdrType type);
-    virtual Direction module_direction();
-    virtual void addAuthenticationInfoHeader(HttpReply * rep, int accel);
+    int authenticated() const override;
+    void authenticate(HttpRequest * request, ConnStateData * conn, Http::HdrType type) override;
+    Direction module_direction() override;
+    void addAuthenticationInfoHeader(HttpReply * rep, int accel) override;
 #if WAITING_FOR_TE
     virtual void addAuthenticationInfoTrailer(HttpReply * rep, int accel);
 #endif
 
-    virtual void startHelperLookup(HttpRequest *request, AccessLogEntry::Pointer &al, AUTHCB *, void *);
-    virtual const char *credentialsStr();
+    void startHelperLookup(HttpRequest *request, AccessLogEntry::Pointer &al, AUTHCB *, void *) override;
+    const char *credentialsStr() override;
 
     char *noncehex;             /* "dcd98b7102dd2f0e8b11d0f600bfb0c093" */
     char *cnonce;               /* "0a4f113b" */
index ebdac77811a852615c9e9f7e98f64b57101ed361..0d84e67aa01182989cd7ca4d21308dff82749415 100644 (file)
@@ -25,15 +25,15 @@ namespace Negotiate
 class Config : public Auth::SchemeConfig
 {
 public:
-    virtual bool active() const;
-    virtual bool configured() const;
-    virtual Auth::UserRequest::Pointer decode(char const *proxy_auth, const HttpRequest *request, const char *requestRealm);
-    virtual void done();
-    virtual void rotateHelpers();
-    virtual void fixHeader(Auth::UserRequest::Pointer, HttpReply *, Http::HdrType, HttpRequest *);
-    virtual void init(Auth::SchemeConfig *);
-    virtual void registerWithCacheManager(void);
-    virtual const char * type() const;
+    bool active() const override;
+    bool configured() const override;
+    Auth::UserRequest::Pointer decode(char const *proxy_auth, const HttpRequest *request, const char *requestRealm) override;
+    void done() override;
+    void rotateHelpers() override;
+    void fixHeader(Auth::UserRequest::Pointer, HttpReply *, Http::HdrType, HttpRequest *) override;
+    void init(Auth::SchemeConfig *) override;
+    void registerWithCacheManager(void) override;
+    const char * type() const override;
 };
 
 } // namespace Negotiate
index 0610fb42a996e1167b933bba29df33d7759a3497..8236036478315ce86acdce0547ba121631f9f6c4 100644 (file)
@@ -25,12 +25,12 @@ class Scheme : public Auth::Scheme
 public:
     static Auth::Scheme::Pointer GetInstance();
     Scheme() {};
-    virtual ~Scheme() {};
+    ~Scheme() override {};
 
     /* per scheme */
-    virtual char const *type() const;
-    virtual void shutdownCleanup();
-    virtual Auth::SchemeConfig *createConfig();
+    char const *type() const override;
+    void shutdownCleanup() override;
+    Auth::SchemeConfig *createConfig() override;
 
     /* Not implemented */
     Scheme (Scheme const &);
index bd56a5576737c838ff3263db1f293f52333b3f37..bb94840f73a3944b7df9be57817fe25512bba4dc 100644 (file)
@@ -28,12 +28,12 @@ class User : public Auth::User
 
 public:
     User(Auth::SchemeConfig *, const char *requestRealm);
-    virtual ~User();
-    virtual int32_t ttl() const override;
+    ~User() override;
+    int32_t ttl() const override;
 
     /* Auth::User API */
     static CbcPointer<Auth::CredentialsCache> Cache();
-    virtual void addToNameCache() override;
+    void addToNameCache() override;
 
     dlink_list proxy_auth_list;
 };
index ade8a98e12ab8013978b08cdac1efafe830085d5..2837a6c09a28b390ba3ad7ac1b9d1847b927e962 100644 (file)
@@ -30,16 +30,16 @@ class UserRequest : public Auth::UserRequest
 
 public:
     UserRequest();
-    virtual ~UserRequest();
-    virtual int authenticated() const;
-    virtual void authenticate(HttpRequest * request, ConnStateData * conn, Http::HdrType type);
-    virtual Direction module_direction();
-    virtual void startHelperLookup(HttpRequest *request, AccessLogEntry::Pointer &al, AUTHCB *, void *);
-    virtual const char *credentialsStr();
+    ~UserRequest() override;
+    int authenticated() const override;
+    void authenticate(HttpRequest * request, ConnStateData * conn, Http::HdrType type) override;
+    Direction module_direction() override;
+    void startHelperLookup(HttpRequest *request, AccessLogEntry::Pointer &al, AUTHCB *, void *) override;
+    const char *credentialsStr() override;
 
-    virtual const char * connLastHeader();
+    const char * connLastHeader() override;
 
-    void releaseAuthServer(void); ///< Release the authserver helper server properly.
+    void releaseAuthServer(void) override; ///< Release the authserver helper server properly.
 
     /* what connection is this associated with */
     /* ConnStateData * conn;*/
index b98cf1d62f90b58f0569a724d9d77f767456e173..d59b137001c5a3cc9f75efdf4306f2f34e5c1d7b 100644 (file)
@@ -28,15 +28,15 @@ namespace Ntlm
 class Config : public Auth::SchemeConfig
 {
 public:
-    virtual bool active() const;
-    virtual bool configured() const;
-    virtual Auth::UserRequest::Pointer decode(char const *proxy_auth, const HttpRequest *request, const char *requestRealm);
-    virtual void done();
-    virtual void rotateHelpers();
-    virtual void fixHeader(Auth::UserRequest::Pointer, HttpReply *, Http::HdrType, HttpRequest *);
-    virtual void init(Auth::SchemeConfig *);
-    virtual void registerWithCacheManager(void);
-    virtual const char * type() const;
+    bool active() const override;
+    bool configured() const override;
+    Auth::UserRequest::Pointer decode(char const *proxy_auth, const HttpRequest *request, const char *requestRealm) override;
+    void done() override;
+    void rotateHelpers() override;
+    void fixHeader(Auth::UserRequest::Pointer, HttpReply *, Http::HdrType, HttpRequest *) override;
+    void init(Auth::SchemeConfig *) override;
+    void registerWithCacheManager(void) override;
+    const char * type() const override;
 };
 
 } // namespace Ntlm
index 3edc1a9a82f8b11a2353c73848bf47b30e8b4bdf..9f1153ba518cc1c088f31cd518d4fc1ea5f65d9c 100644 (file)
@@ -18,7 +18,7 @@ class NtlmAuthRr : public RegisteredRunner
 {
 public:
     /* RegisteredRunner API */
-    virtual void bootstrapConfig() override {
+    void bootstrapConfig() override {
         const char *type = Auth::Ntlm::Scheme::GetInstance()->type();
         debugs(29, 2, "Initialized Authentication Scheme '" << type << "'");
     }
index 6440b8b727b46c9fa744bdedc3fb1aea98bb53c3..ec55ae62169b4755b9e05dbb094a7500dda590bd 100644 (file)
@@ -25,12 +25,12 @@ class Scheme : public Auth::Scheme
 public:
     static Auth::Scheme::Pointer GetInstance();
     Scheme() {};
-    virtual ~Scheme() {};
+    ~Scheme() override {};
 
     /* per scheme */
-    virtual char const *type() const;
-    virtual void shutdownCleanup();
-    virtual Auth::SchemeConfig *createConfig();
+    char const *type() const override;
+    void shutdownCleanup() override;
+    Auth::SchemeConfig *createConfig() override;
 
     /* Not implemented */
     Scheme (Scheme const &);
index ce8cbf1714aedf22e0693a5fb0e765275ede867d..99a08d55e0b0299880085ad3fe77b053acafdca0 100644 (file)
@@ -26,12 +26,12 @@ class User : public Auth::User
 
 public:
     User(Auth::SchemeConfig *, const char *requestRealm);
-    virtual ~User();
-    virtual int32_t ttl() const override;
+    ~User() override;
+    int32_t ttl() const override;
 
     /* Auth::User API */
     static CbcPointer<Auth::CredentialsCache> Cache();
-    virtual void addToNameCache() override;
+    void addToNameCache() override;
 
     dlink_list proxy_auth_list;
 };
index 3ad2a3fcad68a9994fe753033103368e8afb9ae0..8a6351efdef97110b46f5c913854d9cc0bdade92 100644 (file)
@@ -30,16 +30,16 @@ class UserRequest : public Auth::UserRequest
 
 public:
     UserRequest();
-    virtual ~UserRequest();
-    virtual int authenticated() const;
-    virtual void authenticate(HttpRequest * request, ConnStateData * conn, Http::HdrType type);
-    virtual Auth::Direction module_direction();
-    virtual void startHelperLookup(HttpRequest *req, AccessLogEntry::Pointer &al, AUTHCB *, void *);
-    virtual const char *credentialsStr();
+    ~UserRequest() override;
+    int authenticated() const override;
+    void authenticate(HttpRequest * request, ConnStateData * conn, Http::HdrType type) override;
+    Auth::Direction module_direction() override;
+    void startHelperLookup(HttpRequest *req, AccessLogEntry::Pointer &al, AUTHCB *, void *) override;
+    const char *credentialsStr() override;
 
-    virtual const char * connLastHeader();
+    const char * connLastHeader() override;
 
-    virtual void releaseAuthServer(); ///< Release authserver NTLM helpers properly when finished or abandoning.
+    void releaseAuthServer() override; ///< Release authserver NTLM helpers properly when finished or abandoning.
 
     /* our current blob to pass to the client */
     char *server_blob;
index 42e86e43482918b767019b1903e023451f7b9ab7..973ca1983efdecb0e65c552ec6c2b2099f595f1b 100644 (file)
@@ -42,7 +42,7 @@ public:
     typedef RefCount <AsyncCall> Pointer;
 
     AsyncCall(int aDebugSection, int aDebugLevel, const char *aName);
-    virtual ~AsyncCall();
+    ~AsyncCall() override;
 
     void make(); // fire if we can; handles general call debugging
 
@@ -133,18 +133,18 @@ public:
         AsyncCall(o.debugSection, o.debugLevel, o.name),
         dialer(o.dialer) {}
 
-    ~AsyncCallT() {}
+    ~AsyncCallT() override {}
 
-    CallDialer *getDialer() { return &dialer; }
+    CallDialer *getDialer() override { return &dialer; }
 
     Dialer dialer;
 
 protected:
-    virtual bool canFire() {
+    bool canFire() override {
         return AsyncCall::canFire() &&
                dialer.canDial(*this);
     }
-    virtual void fire() { dialer.dial(*this); }
+    void fire() override { dialer.dial(*this); }
 
 private:
     AsyncCallT & operator=(const AsyncCallT &); // not defined. call assignments not permitted.
index e978d8519c37fa0579c9382c2fa61fbe02a07073..18f74b67656bc8f5212d636c7159fbd4091869bc 100644 (file)
@@ -85,15 +85,15 @@ public:
     using Handler = void (Argument1 &);
 
     explicit UnaryFunCallbackDialer(Handler * const aHandler): handler(aHandler) {}
-    virtual ~UnaryFunCallbackDialer() = default;
+    ~UnaryFunCallbackDialer() override = default;
 
     /* CallDialer API */
     bool canDial(AsyncCall &) { return bool(handler); }
     void dial(AsyncCall &) { handler(arg1); }
-    virtual void print(std::ostream &os) const final { os << '(' << arg1 << ')'; }
+    void print(std::ostream &os) const final { os << '(' << arg1 << ')'; }
 
     /* WithAnswer API */
-    virtual Argument1 &answer() final { return arg1; }
+    Argument1 &answer() final { return arg1; }
 
 private:
     Handler *handler; ///< the function to call
@@ -112,15 +112,15 @@ public:
     typedef void (Destination::*Method)(Argument1 &);
 
     UnaryCbcCallbackDialer(Method method, Destination *destination): destination_(destination), method_(method) {}
-    virtual ~UnaryCbcCallbackDialer() = default;
+    ~UnaryCbcCallbackDialer() override = default;
 
     /* CallDialer API */
     bool canDial(AsyncCall &) { return destination_.valid(); }
     void dial(AsyncCall &) {((*destination_).*method_)(arg1_); }
-    virtual void print(std::ostream &os) const final { os << '(' << arg1_ << ')'; }
+    void print(std::ostream &os) const final { os << '(' << arg1_ << ')'; }
 
     /* WithAnswer API */
-    virtual Argument1 &answer() final { return arg1_; }
+    Argument1 &answer() final { return arg1_; }
 
 private:
     CbcPointer<Destination> destination_; ///< object to deliver the answer to
@@ -142,7 +142,7 @@ public:
         Base(aJob, aMethod, {}) {}
 
     /* WithAnswer API */
-    virtual Argument1 &answer() final { return this->arg1; }
+    Argument1 &answer() final { return this->arg1; }
 };
 
 /// whether the given type is an AsyncJob
index 7ed3cad8076456e236fdfc66e589a618e41543ff..e8a5028270b91cb1697443f0f4722fad0d0b76ad 100644 (file)
@@ -27,7 +27,7 @@ public:
 
     virtual bool canDial(AsyncCall &) { return arg1.valid(); }
     void dial(AsyncCall &) { handler(arg1.get()); }
-    virtual void print(std::ostream &os) const {  os << '(' << arg1 << ')'; }
+    void print(std::ostream &os) const override {  os << '(' << arg1 << ')'; }
 
 public:
     CbcPointer<Argument1> arg1;
index 012a524c1cb5cbc01449e65d5f16c2ce20d00f75..4349373f34232286fa0754acf9f5ae9f2e43ff2e 100644 (file)
@@ -24,7 +24,7 @@ public:
     /* CallDialer API */
     bool canDial(AsyncCall &) { return bool(handler); }
     void dial(AsyncCall &) { handler(); }
-    virtual void print(std::ostream &os) const override { os << "()"; }
+    void print(std::ostream &os) const override { os << "()"; }
 
 private:
     Handler *handler; ///< the function to call (or nil)
@@ -42,12 +42,12 @@ public:
         handler(aHandler),
         arg1(anArg1)
     {}
-    virtual ~UnaryFunDialer() = default;
+    ~UnaryFunDialer() override = default;
 
     /* CallDialer API */
     bool canDial(AsyncCall &) { return bool(handler); }
     void dial(AsyncCall &) { handler(std::move(arg1)); }
-    virtual void print(std::ostream &os) const final { os << '(' << arg1 << ')'; }
+    void print(std::ostream &os) const final { os << '(' << arg1 << ')'; }
 
 private:
     Handler *handler; ///< the function to call
index a46e300713c489c29884f5b2b43528ce67ccdddb..ffb583ac18fb4bfffd65d0d812991b9bae0dee35 100644 (file)
@@ -74,7 +74,7 @@ public:
 
 protected:
     // external destruction prohibited to ensure swanSong() is called
-    virtual ~AsyncJob();
+    ~AsyncJob() override;
 
     const char *stopReason; ///< reason for forcing done() to be true
     const char *typeName; ///< kid (leaf) class name, for debugging
index 9af31272bf19302d562bb46cea8f046cb52c03b0..c469b1f27b69f75234e8a6a9811adbfde530d89a 100644 (file)
@@ -94,13 +94,13 @@ public:
     explicit NullaryMemFunT(const CbcPointer<Job> &aJob, Method aMethod):
         JobDialer<Job>(aJob), method(aMethod) {}
 
-    virtual void print(std::ostream &os) const {  os << "()"; }
+    void print(std::ostream &os) const override {  os << "()"; }
 
 public:
     Method method;
 
 protected:
-    virtual void doDial() { ((&(*this->job))->*method)(); }
+    void doDial() override { ((&(*this->job))->*method)(); }
 };
 
 template <class Job, class Data, class Argument1 = Data>
@@ -112,14 +112,14 @@ public:
                           const Data &anArg1): JobDialer<Job>(aJob),
         method(aMethod), arg1(anArg1) {}
 
-    virtual void print(std::ostream &os) const {  os << '(' << arg1 << ')'; }
+    void print(std::ostream &os) const override {  os << '(' << arg1 << ')'; }
 
 public:
     Method method;
     Data arg1;
 
 protected:
-    virtual void doDial() { ((&(*this->job))->*method)(arg1); }
+    void doDial() override { ((&(*this->job))->*method)(arg1); }
 };
 
 // ... add more as needed
index 7ead548b567774a6cade18c3758bdd2b1f61f27e..697fd2aef668f07785a9d81e9d2368fd1f76e149 100644 (file)
@@ -15,8 +15,8 @@ class FadingCodeContext: public CodeContext
 {
 public:
     /* CodeContext API */
-    virtual ScopedId codeContextGist() const override { return gist; }
-    virtual std::ostream &detailCodeContext(std::ostream &os) const override { return os << gist; }
+    ScopedId codeContextGist() const override { return gist; }
+    std::ostream &detailCodeContext(std::ostream &os) const override { return os << gist; }
 
     ScopedId gist; ///< identifies the being-forgotten CodeContext
 };
index 25e7627b752575562376491e52d77f12d0e5910a..127b2eb25a8b574cfe93e81aaf05548c13752504 100644 (file)
@@ -63,7 +63,7 @@ public:
     /// changes the current context; nil argument sets it to nil/unknown
     static void Reset(const Pointer);
 
-    virtual ~CodeContext() {}
+    ~CodeContext() override {}
 
     /// \returns a small, permanent ID of the current context
     /// gists persist forever and are suitable for passing to other SMP workers
index 1477f73bf714902b4d9f558c931d26bff089466e..d9608f5ac1982c0102aa6c168c5afc50246ebd26 100644 (file)
@@ -20,12 +20,12 @@ class AppendingStreamBuf : public std::streambuf
 {
 public:
     explicit AppendingStreamBuf(Buffer &p): buf_(p) { postInit(); }
-    virtual ~AppendingStreamBuf() = default;
+    ~AppendingStreamBuf() override = default;
 
 protected:
     /* std::streambuf API */
 
-    virtual int_type overflow(int_type aChar = traits_type::eof()) override {
+    int_type overflow(int_type aChar = traits_type::eof()) override {
         std::streamsize pending(pptr() - pbase());
 
         if (pending && sync())
@@ -40,14 +40,14 @@ protected:
         return aChar;
     }
 
-    virtual int sync() override {
+    int sync() override {
         std::streamsize pending(pptr() - pbase());
         lowAppend(pbase(), pending);
         postSync();
         return 0;
     }
 
-    virtual std::streamsize xsputn(const char * chars, std::streamsize number) override {
+    std::streamsize xsputn(const char * chars, std::streamsize number) override {
         lowAppend(chars, number);
         return number;
     }
index 7630a3dd1bd038b760ca245d98509309a62beb24..59697541d8d7eb9622728e6ec58e7d0717209309 100644 (file)
@@ -106,7 +106,7 @@ void RunRegistered(const RegisteredRunner::Method &m);
 class IndependentRunner: public RegisteredRunner
 {
 public:
-    virtual ~IndependentRunner() { unregisterRunner(); }
+    ~IndependentRunner() override { unregisterRunner(); }
 
 protected:
     void registerRunner();
index 6ee1061e9ef7ace8f78394f8f3cadce3e78be9a7..a316372727cbd9e3fd07ed46bc379ac16bd2f54c 100644 (file)
@@ -50,7 +50,7 @@ class CallSubscription: public Subscription
 public:
     /// Must be passed an object. nil pointers are not permitted.
     explicit CallSubscription(const RefCount<Call_> &aCall) : call(aCall) { assert(aCall != nullptr); }
-    virtual AsyncCall::Pointer callback() const
+    AsyncCall::Pointer callback() const override
     {
         const AsyncCall::Pointer cb = new Call_(*call);
         if (!cb->codeContext || CodeContext::Current())
index c413a22ac606fe90f5164abebfbea6d6b2232e8f..307ab03952eba5daaa5176476dc7c7b3e85d9477 100644 (file)
@@ -33,8 +33,8 @@ public:
     TextException& operator=(const TextException &) = default;
 
     /* std::runtime_error API */
-    virtual ~TextException() throw() override;
-    virtual const char *what() const throw() override;
+    ~TextException() throw() override;
+    const char *what() const throw() override;
 
     /// same-location exceptions have the same ID
     SourceLocationId id() const { return where.id(); }
index dbfb5c476ffdd1bef49395093e6e8e4c029c9090..665a525a4c9676b7d16d846441964a48062d3b20 100644 (file)
@@ -4369,7 +4369,7 @@ class sslBumpCfgRr: public ::RegisteredRunner
 public:
     static Ssl::BumpMode lastDeprecatedRule;
     /* RegisteredRunner API */
-    virtual void finalizeConfig();
+    void finalizeConfig() override;
 };
 
 Ssl::BumpMode sslBumpCfgRr::lastDeprecatedRule = Ssl::bumpEnd;
index 900c9dd8932ac841a5aa5509b83dd95b6cbeb472..215c82121b19cd8832082dc128f8c592293e549a 100644 (file)
@@ -51,7 +51,7 @@ public:
 public:
     ClassActionCreator(Handler *aHandler): handler(aHandler) {}
 
-    virtual Mgr::Action::Pointer create(const Mgr::Command::Pointer &cmd) const {
+    Mgr::Action::Pointer create(const Mgr::Command::Pointer &cmd) const override {
         return handler(cmd);
     }
 
index b76f4199f74c57b0c115fdf95a9d083fe6a0c790..9cb6efe22bbcc4437c2f6bd907b5bba7a97c5692 100644 (file)
@@ -269,12 +269,18 @@ cbdata_type cbdataInternalAddType(cbdata_type type, const char *label, int size)
        static cbdata_type CBDATA_##type;
 
 /// Starts cbdata-protection in a class hierarchy.
-/// Child classes in the same hierarchy should use CBDATA_CHILD().
+/// Intermediate classes in the same hierarchy must use CBDATA_INTERMEDIATE() if
+/// they risk creating cbdata pointers in their constructors.
+/// Final classes in the same hierarchy must use CBDATA_CHILD().
 class CbdataParent
 {
 public:
     virtual ~CbdataParent() {}
     virtual void *toCbdata() = 0;
+
+private:
+    /// hack: ensure CBDATA_CHILD() after a toCbdata()-defining CBDATA_INTERMEDIATE()
+    virtual void finalizedInCbdataChild() = 0;
 };
 
 /// cbdata-enables a stand-alone class that is not a CbdataParent child
@@ -282,10 +288,25 @@ public:
 /// use this at the start of your class declaration for consistency sake
 #define CBDATA_CLASS(type) CBDATA_DECL_(type, noexcept)
 
-/// cbdata-enables a CbdataParent child class (including grandchildren)
+/// cbdata-enables a final CbdataParent-derived class in a hierarchy
 /// sets the class declaration section to "private"
 /// use this at the start of your class declaration for consistency sake
-#define CBDATA_CHILD(type) CBDATA_DECL_(type, override final)
+#define CBDATA_CHILD(type) CBDATA_DECL_(type, final) \
+      void finalizedInCbdataChild() final {}
+
+/// cbdata-enables a non-final CbdataParent-derived class T in a hierarchy.
+/// Using this macro is required to be able to create cbdata pointers in T
+/// constructors, when the current vtable is still pointing to T::toCbdata()
+/// that would have been pure without this macro, leading to FATAL runtime
+/// OnTerminate() calls. However, assuming that the final cbdata pointer will
+/// still point to T::this is risky -- multiple inheritance changes "this"!
+///
+/// sets the class declaration section to "private"
+/// use this at the start of your class declaration for consistency sake
+#define CBDATA_INTERMEDIATE() \
+    public: \
+        void *toCbdata() override { return this; } \
+    private:
 
 /**
  * Creates a global instance pointer for the CBDATA memory allocator
index 91bba5c5945b02cb071699017b50ff833e21672c..daf2d39cf52c758557b548245356382608f62be0 100644 (file)
@@ -100,7 +100,7 @@ class ClientDbRr: public RegisteredRunner
 {
 public:
     /* RegisteredRunner API */
-    virtual void useConfig();
+    void useConfig() override;
 };
 RunnerRegistrationEntry(ClientDbRr);
 
index 00302fb352a407feb1a848fed73a1b21445eb0e1..74f2d85d78f90d1993383c71d016fd0c14311eba 100644 (file)
@@ -160,7 +160,7 @@ public:
         handler(aHandler), portCfg(aPortCfg), portTypeNote(note), sub(aSub) {}
 
     /* CallDialer API */
-    virtual void print(std::ostream &os) const {
+    void print(std::ostream &os) const override {
         os << '(' << answer_ << ", " << FdNote(portTypeNote) << " port=" << (void*)&portCfg << ')';
     }
 
@@ -168,7 +168,7 @@ public:
     virtual void dial(AsyncCall &) { (handler)(portCfg, portTypeNote, sub); }
 
     /* WithAnswer API */
-    virtual Ipc::StartListeningAnswer &answer() { return answer_; }
+    Ipc::StartListeningAnswer &answer() override { return answer_; }
 
 public:
     Handler handler;
index d72b7cee45bdeec5290f101eb49f622ebed84385..e4ac33a15ea6edec19380c9c1169ecab3c1362be 100644 (file)
@@ -85,17 +85,17 @@ class ConnStateData:
 
 public:
     explicit ConnStateData(const MasterXactionPointer &xact);
-    virtual ~ConnStateData();
+    ~ConnStateData() override;
 
     /* ::Server API */
-    virtual void receivedFirstByte();
-    virtual bool handleReadData();
-    virtual void afterClientRead();
-    virtual void afterClientWrite(size_t);
+    void receivedFirstByte() override;
+    bool handleReadData() override;
+    void afterClientRead() override;
+    void afterClientWrite(size_t) override;
 
     /* HttpControlMsgSink API */
-    virtual void sendControlMsg(HttpControlMsg);
-    virtual void doneWithControlMsg();
+    void sendControlMsg(HttpControlMsg) override;
+    void doneWithControlMsg() override;
 
     /// Traffic parsing
     bool clientParseRequests();
@@ -174,8 +174,8 @@ public:
 
     /* BodyPipe API */
     BodyPipe::Pointer expectRequestBody(int64_t size);
-    virtual void noteMoreBodySpaceAvailable(BodyPipe::Pointer) = 0;
-    virtual void noteBodyConsumerAborted(BodyPipe::Pointer) = 0;
+    void noteMoreBodySpaceAvailable(BodyPipe::Pointer) override = 0;
+    void noteBodyConsumerAborted(BodyPipe::Pointer) override = 0;
 
     bool handleRequestBodyData();
 
@@ -236,10 +236,10 @@ public:
     void lifetimeTimeout(const CommTimeoutCbParams &params);
 
     // AsyncJob API
-    virtual void start();
-    virtual bool doneAll() const { return BodyProducer::doneAll() && false;}
-    virtual void swanSong();
-    virtual void callException(const std::exception &);
+    void start() override;
+    bool doneAll() const override { return BodyProducer::doneAll() && false;}
+    void swanSong() override;
+    void callException(const std::exception &) override;
 
     /// Changes state so that we close the connection and quit after serving
     /// the client-side-detected error response instead of getting stuck.
@@ -350,8 +350,8 @@ public:
     SBuf preservedClientData;
 
     /* Registered Runner API */
-    virtual void startShutdown();
-    virtual void endingShutdown();
+    void startShutdown() override;
+    void endingShutdown() override;
 
     /// \returns existing non-empty connection annotations,
     /// creates and returns empty annotations otherwise
@@ -367,7 +367,7 @@ public:
     void updateError(const err_type c, const ErrorDetailPointer &d) { updateError(Error(c, d)); }
 
     /* Acl::ChecklistFiller API */
-    virtual void fillChecklist(ACLFilledChecklist &) const;
+    void fillChecklist(ACLFilledChecklist &) const override;
 
     /// fillChecklist() obligations not fulfilled by the front request
     /// TODO: This is a temporary ACLFilledChecklist::setConn() callback to
@@ -438,8 +438,8 @@ protected:
 
 private:
     /* ::Server API */
-    virtual void terminateAll(const Error &, const LogTagsErrors &);
-    virtual bool shouldCloseOnEof() const;
+    void terminateAll(const Error &, const LogTagsErrors &) override;
+    bool shouldCloseOnEof() const override;
 
     void checkLogging();
 
index 9963d5c573beb0ada0d56fe653a423e1041285f6..57f87a234e1d1f0ce229142ad51ca04df0a75073 100644 (file)
@@ -29,7 +29,7 @@ public:
     static STCB SendMoreData;
 
     clientReplyContext(ClientHttpRequest *);
-    ~clientReplyContext();
+    ~clientReplyContext() override;
 
     void saveState();
     void restoreState();
@@ -66,7 +66,7 @@ public:
     Http::StatusCode purgeStatus;
 
     /* StoreClient API */
-    virtual LogTags *loggingTags() const;
+    LogTags *loggingTags() const override;
 
     ClientHttpRequest *http;
     /// Base reply header bytes received from Store.
@@ -91,7 +91,7 @@ public:
 
 private:
     /* StoreClient API */
-    virtual void fillChecklist(ACLFilledChecklist &) const;
+    void fillChecklist(ACLFilledChecklist &) const override;
 
     clientStreamNode *getNextNode() const;
     void makeThisHead();
index f5eee5f6d0fce3e11f6d74bd34abe1916c353c95..a4974e1bfe90c9f18b2bb8db781222a3d48909db 100644 (file)
@@ -36,12 +36,20 @@ class ClientHttpRequest
       public BodyConsumer     // to receive reply bodies in request satisf. mode
 #endif
 {
+#if USE_ADAPTATION
+    CBDATA_CHILD(ClientHttpRequest);
+#else
     CBDATA_CLASS(ClientHttpRequest);
+#endif
 
 public:
     ClientHttpRequest(ConnStateData *);
     ClientHttpRequest(ClientHttpRequest &&) = delete;
+#if USE_ADAPTATION
+    ~ClientHttpRequest() override;
+#else
     ~ClientHttpRequest();
+#endif
 
     String rangeBoundaryStr() const;
     void freeResources();
@@ -200,12 +208,12 @@ public:
     bool requestSatisfactionMode() const { return request_satisfaction_mode; }
 
     /* AsyncJob API */
-    virtual bool doneAll() const {
+    bool doneAll() const override {
         return Initiator::doneAll() &&
                BodyConsumer::doneAll() &&
                false; // TODO: Refactor into a proper AsyncJob
     }
-    virtual void callException(const std::exception &);
+    void callException(const std::exception &) override;
 
 private:
     /// Handles an adaptation client request failure.
@@ -216,13 +224,13 @@ private:
     void handleAdaptationBlock(const Adaptation::Answer &);
 
     /* Adaptation::Initiator API */
-    virtual void noteAdaptationAclCheckDone(Adaptation::ServiceGroupPointer);
-    virtual void noteAdaptationAnswer(const Adaptation::Answer &);
+    void noteAdaptationAclCheckDone(Adaptation::ServiceGroupPointer) override;
+    void noteAdaptationAnswer(const Adaptation::Answer &) override;
 
     /* BodyConsumer API */
-    virtual void noteMoreBodyDataAvailable(BodyPipe::Pointer);
-    virtual void noteBodyProductionEnded(BodyPipe::Pointer);
-    virtual void noteBodyProducerAborted(BodyPipe::Pointer);
+    void noteMoreBodyDataAvailable(BodyPipe::Pointer) override;
+    void noteBodyProductionEnded(BodyPipe::Pointer) override;
+    void noteBodyProducerAborted(BodyPipe::Pointer) override;
 
     void endRequestSatisfaction();
     /// called by StoreEntry when it has more buffer space available
index 8b2598324a0f4f1de46e8996faffff4777c6533a..07eafc75b98ca409789b1cce0eb549e7590616ee 100644 (file)
@@ -36,7 +36,7 @@ class Client:
 
 public:
     Client(FwdState *);
-    virtual ~Client();
+    ~Client() override;
 
     /// \return primary or "request data connection"
     virtual const Comm::ConnectionPointer & dataConnection() const = 0;
@@ -44,9 +44,9 @@ public:
     // BodyConsumer: consume request body or adapted response body.
     // The implementation just calls the corresponding HTTP or ICAP handle*()
     // method, depending on the pipe.
-    virtual void noteMoreBodyDataAvailable(BodyPipe::Pointer);
-    virtual void noteBodyProductionEnded(BodyPipe::Pointer);
-    virtual void noteBodyProducerAborted(BodyPipe::Pointer);
+    void noteMoreBodyDataAvailable(BodyPipe::Pointer) override;
+    void noteBodyProductionEnded(BodyPipe::Pointer) override;
+    void noteBodyProducerAborted(BodyPipe::Pointer) override;
 
     /// read response data from the network
     virtual void maybeReadVirginBody() = 0;
@@ -64,19 +64,19 @@ public:
 
 #if USE_ADAPTATION
     // Adaptation::Initiator API: start an ICAP transaction and receive adapted headers.
-    virtual void noteAdaptationAnswer(const Adaptation::Answer &answer);
-    virtual void noteAdaptationAclCheckDone(Adaptation::ServiceGroupPointer group);
+    void noteAdaptationAnswer(const Adaptation::Answer &answer) override;
+    void noteAdaptationAclCheckDone(Adaptation::ServiceGroupPointer group) override;
 
     // BodyProducer: provide virgin response body to ICAP.
-    virtual void noteMoreBodySpaceAvailable(BodyPipe::Pointer );
-    virtual void noteBodyConsumerAborted(BodyPipe::Pointer );
+    void noteMoreBodySpaceAvailable(BodyPipe::Pointer ) override;
+    void noteBodyConsumerAborted(BodyPipe::Pointer ) override;
 #endif
     virtual bool getMoreRequestBody(MemBuf &buf);
     virtual void processReplyBody() = 0;
 
 //AsyncJob virtual methods
-    virtual void swanSong();
-    virtual bool doneAll() const;
+    void swanSong() override;
+    bool doneAll() const override;
 
 public: // should be protected
     void serverComplete();     /**< call when no server communication is expected */
index 10c0e176ff447afdef68a144ac9c1e5253f945c4..91ae31de684b2bcd5bca0bfbd4788ed6472d5bfb 100644 (file)
@@ -31,8 +31,8 @@ public:
     explicit ErrorDetail(const int code): completionCode(code) {}
 
     /* ErrorDetail API */
-    virtual SBuf brief() const override;
-    virtual SBuf verbose(const HttpRequestPointer &) const override;
+    SBuf brief() const override;
+    SBuf verbose(const HttpRequestPointer &) const override;
 
 private:
     int completionCode; ///< FTP reply completion code
@@ -109,11 +109,9 @@ public:
 /// FTP client functionality shared among FTP Gateway and Relay clients.
 class Client: public ::Client
 {
-    CBDATA_CLASS(Client);
-
 public:
     explicit Client(FwdState *fwdState);
-    virtual ~Client();
+    ~Client() override;
 
     /// handle a fatal transaction error, closing the control connection
     virtual void failed(err_type error = ERR_NONE, int xerrno = 0,
@@ -123,7 +121,7 @@ public:
     virtual void timeout(const CommTimeoutCbParams &io);
 
     /* Client API */
-    virtual void maybeReadVirginBody();
+    void maybeReadVirginBody() override;
 
     void writeCommand(const char *buf);
 
@@ -179,14 +177,14 @@ public:
 
 protected:
     /* AsyncJob API */
-    virtual void start();
+    void start() override;
 
     /* Client API */
-    virtual void closeServer();
-    virtual bool doneWithServer() const;
-    virtual const Comm::ConnectionPointer & dataConnection() const;
-    virtual void abortAll(const char *reason);
-    virtual void noteDelayAwareReadChance();
+    void closeServer() override;
+    bool doneWithServer() const override;
+    const Comm::ConnectionPointer & dataConnection() const override;
+    void abortAll(const char *reason) override;
+    void noteDelayAwareReadChance() override;
 
     virtual Http::StatusCode failedHttpStatus(err_type &error);
     void ctrlClosed(const CommCloseCbParams &io);
@@ -202,8 +200,8 @@ protected:
     void initReadBuf();
 
     // sending of the request body to the server
-    virtual void sentRequestBody(const CommIoCbParams &io);
-    virtual void doneSendingRequestBody();
+    void sentRequestBody(const CommIoCbParams &io) override;
+    void doneSendingRequestBody() override;
 
     /// Waits for an FTP data connection to the server to be established/opened.
     /// This wait only happens in FTP passive mode (via PASV or EPSV).
index fb7882084e43bd98bd7d9d94874a304659c135c1..5f62869e6698bb38cdbc9cab2445bd07733c4536 100644 (file)
@@ -93,11 +93,11 @@ typedef void (StateMethod)(Ftp::Gateway *);
 /// converts one or more FTP responses into the final HTTP response.
 class Gateway : public Ftp::Client
 {
-    CBDATA_CLASS(Gateway);
+    CBDATA_CHILD(Gateway);
 
 public:
     Gateway(FwdState *);
-    virtual ~Gateway();
+    ~Gateway() override;
     char user[MAX_URL];
     char password[MAX_URL];
     int password_url;
@@ -125,8 +125,8 @@ public:
 
 public:
     // these should all be private
-    virtual void start();
-    virtual Http::StatusCode failedHttpStatus(err_type &error);
+    void start() override;
+    Http::StatusCode failedHttpStatus(err_type &error) override;
     int restartable();
     void appendSuccessHeader();
     void hackShortcut(StateMethod *nextState);
@@ -144,33 +144,33 @@ public:
     void buildTitleUrl();
     void writeReplyBody(const char *, size_t len);
     void printfReplyBody(const char *fmt, ...);
-    virtual void completeForwarding();
+    void completeForwarding() override;
     void processHeadResponse();
-    void processReplyBody();
+    void processReplyBody() override;
     void setCurrentOffset(int64_t offset) { currentOffset = offset; }
     int64_t getCurrentOffset() const { return currentOffset; }
 
-    virtual void dataChannelConnected(const CommConnectCbParams &io);
+    void dataChannelConnected(const CommConnectCbParams &io) override;
     static PF ftpDataWrite;
-    virtual void timeout(const CommTimeoutCbParams &io);
+    void timeout(const CommTimeoutCbParams &io) override;
     void ftpAcceptDataConnection(const CommAcceptCbParams &io);
 
     static HttpReply *ftpAuthRequired(HttpRequest * request, SBuf &realm, AccessLogEntry::Pointer &);
     SBuf ftpRealm();
     void loginFailed(void);
 
-    virtual void haveParsedReplyHeaders();
+    void haveParsedReplyHeaders() override;
 
     virtual bool haveControlChannel(const char *caller_name) const;
 
 protected:
-    virtual void handleControlReply();
-    virtual void dataClosed(const CommCloseCbParams &io);
+    void handleControlReply() override;
+    void dataClosed(const CommCloseCbParams &io) override;
 
 private:
-    virtual bool mayReadVirginReplyBody() const;
+    bool mayReadVirginReplyBody() const override;
     // BodyConsumer for HTTP: consume request body.
-    virtual void handleRequestBodyProducerAborted();
+    void handleRequestBodyProducerAborted() override;
 
     void loginParser(const SBuf &login, bool escaped);
 };
index 414961fcb30ab27796d5ed523fa7fc24a1f46186..7fc6941bccc95c90fd0b2e800603e17ab62ae7e9 100644 (file)
@@ -33,11 +33,11 @@ namespace Ftp
 /// and then relaying FTP replies back to our FTP server.
 class Relay: public Ftp::Client
 {
-    CBDATA_CLASS(Relay);
+    CBDATA_CHILD(Relay);
 
 public:
     explicit Relay(FwdState *const fwdState);
-    virtual ~Relay();
+    ~Relay() override;
 
 protected:
     const Ftp::MasterState &master() const;
@@ -46,21 +46,21 @@ protected:
     void serverState(const Ftp::ServerState newState);
 
     /* Ftp::Client API */
-    virtual void failed(err_type error = ERR_NONE, int xerrno = 0, ErrorState *ftperr = nullptr);
-    virtual void dataChannelConnected(const CommConnectCbParams &io);
+    void failed(err_type error = ERR_NONE, int xerrno = 0, ErrorState *ftperr = nullptr) override;
+    void dataChannelConnected(const CommConnectCbParams &io) override;
 
     /* Client API */
     virtual void serverComplete();
-    virtual void handleControlReply();
-    virtual void processReplyBody();
-    virtual void handleRequestBodyProducerAborted();
-    virtual bool mayReadVirginReplyBody() const;
-    virtual void completeForwarding();
-    virtual bool abortOnData(const char *reason);
+    void handleControlReply() override;
+    void processReplyBody() override;
+    void handleRequestBodyProducerAborted() override;
+    bool mayReadVirginReplyBody() const override;
+    void completeForwarding() override;
+    bool abortOnData(const char *reason) override;
 
     /* AsyncJob API */
-    virtual void start();
-    virtual void swanSong();
+    void start() override;
+    void swanSong() override;
 
     void forwardReply();
     void forwardError(err_type error = ERR_NONE, int xerrno = 0);
index d6d8d18f26d6c7507158c0c1bac3e98c2d072933..f5a0868116766ad4e7cd918fbb22699e7e730a94 100644 (file)
@@ -31,7 +31,7 @@ namespace Http
 /// connection during these negotiations. The caller receives TunnelerAnswer.
 class Tunneler: virtual public AsyncJob
 {
-    CBDATA_CLASS(Tunneler);
+    CBDATA_CHILD(Tunneler);
 
 public:
     using Answer = TunnelerAnswer;
@@ -49,11 +49,11 @@ public:
 
 protected:
     /* AsyncJob API */
-    virtual ~Tunneler();
-    virtual void start();
-    virtual bool doneAll() const;
-    virtual void swanSong();
-    virtual const char *status() const;
+    ~Tunneler() override;
+    void start() override;
+    bool doneAll() const override;
+    void swanSong() override;
+    const char *status() const override;
 
     void handleConnectionClosure(const CommCloseCbParams&);
     void watchForClosures();
index 40585730568668f74b8ffee4f77764f578282713..513ce718eaccdd735791c92fd98ce7c54e82b5d8 100644 (file)
@@ -100,7 +100,7 @@ class CommSelectEngine : public AsyncEngine
 {
 
 public:
-    virtual int checkEvents(int timeout);
+    int checkEvents(int timeout) override;
 };
 
 #endif
index e1e60649dc665157e33e5a57c97a4e01bbb0190d..ae187fa6d34e005f962a4d1845726fb10e967980 100644 (file)
@@ -23,22 +23,22 @@ namespace Comm
 /// Comm::OK with an open connection or another Comm::Flag with a closed one.
 class ConnOpener : public AsyncJob
 {
-    CBDATA_CLASS(ConnOpener);
+    CBDATA_CHILD(ConnOpener);
 
 public:
     typedef CbcPointer<ConnOpener> Pointer;
 
-    virtual bool doneAll() const;
+    bool doneAll() const override;
 
     ConnOpener(const Comm::ConnectionPointer &, const AsyncCall::Pointer &handler, time_t connect_timeout);
-    ~ConnOpener();
+    ~ConnOpener() override;
 
     void setHost(const char *);    ///< set the hostname note for this connection
     const char * getHost() const;  ///< get the hostname noted for this connection
 
 protected:
-    virtual void start();
-    virtual void swanSong();
+    void start() override;
+    void swanSong() override;
 
 private:
     // Undefined because two openers cannot share a connection
index 26cf784c29a52b713c7cd7474d5237b96f740a9d..8a7589895fde96308cc02d86484c3094e4215f3f 100644 (file)
@@ -77,7 +77,7 @@ public:
     Connection();
 
     /** Clear the connection properties and close any open socket. */
-    virtual ~Connection();
+    ~Connection() override;
 
     /// To prevent accidental copying of Connection objects that we started to
     /// open or that are open, use cloneProfile() instead.
@@ -138,8 +138,8 @@ public:
     const Security::NegotiationHistory *hasTlsNegotiations() const {return tlsHistory;}
 
     /* CodeContext API */
-    virtual ScopedId codeContextGist() const override;
-    virtual std::ostream &detailCodeContext(std::ostream &os) const override;
+    ScopedId codeContextGist() const override;
+    std::ostream &detailCodeContext(std::ostream &os) const override;
 
 public:
     /** Address/Port for the Squid end of a TCP link. */
index 553e1cc4eacaa30cce1cf45e001af65dbebe1bc9..857d99bdeb8f98463df52c9df5a9a184a3b8b53e 100644 (file)
@@ -37,16 +37,16 @@ class AcceptLimiter;
  */
 class TcpAcceptor : public AsyncJob
 {
-    CBDATA_CLASS(TcpAcceptor);
+    CBDATA_CHILD(TcpAcceptor);
 
 public:
     typedef CbcPointer<Comm::TcpAcceptor> Pointer;
 
 private:
-    virtual void start();
-    virtual bool doneAll() const;
-    virtual void swanSong();
-    virtual const char *status() const;
+    void start() override;
+    bool doneAll() const override;
+    void swanSong() override;
+    const char *status() const override;
 
     TcpAcceptor(const TcpAcceptor &); // not implemented.
 
index 909afd53852ce886e8fc614989f950ee27b574ba..492bce30eff2e98c01d10da505540712e9c82dac 100644 (file)
@@ -241,8 +241,8 @@ public:
 
 protected:
     /* DebugChannel API */
-    virtual bool shouldWrite(const DebugMessageHeader &) const final;
-    virtual void write(const DebugMessageHeader &, const CompiledDebugMessageBody &) final;
+    bool shouldWrite(const DebugMessageHeader &) const final;
+    void write(const DebugMessageHeader &, const CompiledDebugMessageBody &) final;
 };
 
 /// DebugChannel managing messages destined for "standard error stream" (stderr)
@@ -262,8 +262,8 @@ public:
 
 protected:
     /* DebugChannel API */
-    virtual bool shouldWrite(const DebugMessageHeader &) const final;
-    virtual void write(const DebugMessageHeader &, const CompiledDebugMessageBody &) final;
+    bool shouldWrite(const DebugMessageHeader &) const final;
+    void write(const DebugMessageHeader &, const CompiledDebugMessageBody &) final;
 
 private:
     /// whether we are the last resort for logging debugs() messages
@@ -280,8 +280,8 @@ public:
 
 protected:
     /* DebugChannel API */
-    virtual bool shouldWrite(const DebugMessageHeader &) const final;
-    virtual void write(const DebugMessageHeader &, const CompiledDebugMessageBody &) final;
+    bool shouldWrite(const DebugMessageHeader &) const final;
+    void write(const DebugMessageHeader &, const CompiledDebugMessageBody &) final;
 
 private:
     bool opened = false; ///< whether openlog() was called
index 61e6e07be22834f6c770218bca35074e396d7090..770cec88541c4b9e24001bd2a6eff5c17c2f13f3 100644 (file)
@@ -47,17 +47,17 @@ class Aggregate : public CompositePoolNode
 public:
     typedef RefCount<Aggregate> Pointer;
     Aggregate();
-    ~Aggregate();
+    ~Aggregate() override;
     virtual DelaySpec *rate() {return &spec;}
 
     virtual DelaySpec const *rate() const {return &spec;}
 
-    virtual void stats(StoreEntry * sentry);
-    virtual void dump(StoreEntry *entry) const;
-    virtual void update(int incr);
-    virtual void parse();
+    void stats(StoreEntry * sentry) override;
+    void dump(StoreEntry *entry) const override;
+    void update(int incr) override;
+    void parse() override;
 
-    virtual DelayIdComposite::Pointer id(CompositeSelectionDetails &);
+    DelayIdComposite::Pointer id(CompositeSelectionDetails &) override;
 
 private:
 
@@ -68,9 +68,9 @@ private:
 
     public:
         AggregateId (RefCount<Aggregate>);
-        virtual int bytesWanted (int min, int max) const;
-        virtual void bytesIn(int qty);
-        virtual void delayRead(const AsyncCallPointer &);
+        int bytesWanted (int min, int max) const override;
+        void bytesIn(int qty) override;
+        void delayRead(const AsyncCallPointer &) override;
 
     private:
         RefCount<Aggregate> theAggregate;
@@ -110,15 +110,15 @@ class VectorPool : public CompositePoolNode
 
 public:
     typedef RefCount<VectorPool> Pointer;
-    virtual void dump(StoreEntry *entry) const;
-    virtual void parse();
-    virtual void update(int incr);
-    virtual void stats(StoreEntry * sentry);
+    void dump(StoreEntry *entry) const override;
+    void parse() override;
+    void update(int incr) override;
+    void stats(StoreEntry * sentry) override;
 
-    virtual DelayIdComposite::Pointer id(CompositeSelectionDetails &);
+    DelayIdComposite::Pointer id(CompositeSelectionDetails &) override;
     VectorMap<unsigned char, DelayBucket> buckets;
     VectorPool();
-    ~VectorPool();
+    ~VectorPool() override;
 
 protected:
     bool keyAllocated (unsigned char const key) const;
@@ -139,8 +139,8 @@ protected:
 
     public:
         Id (RefCount<VectorPool>, int);
-        virtual int bytesWanted (int min, int max) const;
-        virtual void bytesIn(int qty);
+        int bytesWanted (int min, int max) const override;
+        void bytesIn(int qty) override;
 
     private:
         RefCount<VectorPool> theVector;
@@ -154,8 +154,8 @@ class IndividualPool : public VectorPool
     MEMPROXY_CLASS(IndividualPool);
 
 protected:
-    virtual char const *label() const {return "Individual";}
-    virtual unsigned int makeKey(Ip::Address &src_addr) const;
+    char const *label() const override {return "Individual";}
+    unsigned int makeKey(Ip::Address &src_addr) const override;
 };
 
 /// \ingroup DelayPoolsInternal
@@ -164,8 +164,8 @@ class ClassCNetPool : public VectorPool
     MEMPROXY_CLASS(ClassCNetPool);
 
 protected:
-    virtual char const *label() const {return "Network";}
-    virtual unsigned int makeKey (Ip::Address &src_addr) const;
+    char const *label() const override {return "Network";}
+    unsigned int makeKey (Ip::Address &src_addr) const override;
 };
 
 /* don't use remote storage for these */
@@ -193,14 +193,14 @@ class ClassCHostPool : public CompositePoolNode
 
 public:
     typedef RefCount<ClassCHostPool> Pointer;
-    virtual void dump(StoreEntry *entry) const;
-    virtual void parse();
-    virtual void update(int incr);
-    virtual void stats(StoreEntry * sentry);
+    void dump(StoreEntry *entry) const override;
+    void parse() override;
+    void update(int incr) override;
+    void stats(StoreEntry * sentry) override;
 
-    virtual DelayIdComposite::Pointer id(CompositeSelectionDetails &);
+    DelayIdComposite::Pointer id(CompositeSelectionDetails &) override;
     ClassCHostPool();
-    ~ClassCHostPool();
+    ~ClassCHostPool() override;
 
 protected:
     bool keyAllocated (unsigned char const key) const;
@@ -228,8 +228,8 @@ protected:
 
     public:
         Id (RefCount<ClassCHostPool>, unsigned char, unsigned char);
-        virtual int bytesWanted (int min, int max) const;
-        virtual void bytesIn(int qty);
+        int bytesWanted (int min, int max) const override;
+        void bytesIn(int qty) override;
 
     private:
         RefCount<ClassCHostPool> theClassCHost;
index 60358c834eda16a878c4beb317f16dc5c9390790..380678ec126f4b873beb43f48af76c6c2c471998 100644 (file)
@@ -206,8 +206,8 @@ class ConfigRr : public RegisteredRunner
 {
 public:
     /* RegisteredRunner API */
-    virtual void startReconfigure() override;
-    virtual void endingShutdown() override;
+    void startReconfigure() override;
+    void endingShutdown() override;
 };
 
 RunnerRegistrationEntry(ConfigRr);
index 1dab0a7e7eeb2d9659c96744624ba617e3890679..452077e6da27162dfc7668d4749083fd1f252d69 100644 (file)
@@ -21,8 +21,8 @@ public:
     explicit NamedErrorDetail(const char *aName): name(aName) {}
 
     /* ErrorDetail API */
-    virtual SBuf brief() const override { return name; }
-    virtual SBuf verbose(const HttpRequestPointer &) const override { return name; }
+    SBuf brief() const override { return name; }
+    SBuf verbose(const HttpRequestPointer &) const override { return name; }
 
 private:
     /// distinguishes us from all other NamedErrorDetail objects
index f0c1c55373bfe70032b861435e917eb391051a3d..f13367b3eae98aaa113955435a681f4381c10459 100644 (file)
@@ -22,7 +22,7 @@ class ErrorDetail: public RefCountable
 public:
     using Pointer = ErrorDetailPointer;
 
-    virtual ~ErrorDetail() {}
+    ~ErrorDetail() override {}
 
     /// \returns a single "token" summarizing available details
     /// suitable as an access.log field and similar output processed by programs
index c6a4393786feba8da5210d6da869d325d28de4cb..9229bea41b1e490fe5424f57836d07de38de39a1 100644 (file)
@@ -26,11 +26,11 @@ public:
     explicit ExceptionErrorDetail(const SourceLocationId id): exceptionId(SQUID_EXCEPTION_START_BASE + id) {}
 
     /* ErrorDetail API */
-    virtual SBuf brief() const override {
+    SBuf brief() const override {
         return ToSBuf("exception=", std::hex, exceptionId);
     }
 
-    virtual SBuf verbose(const HttpRequestPointer &) const override {
+    SBuf verbose(const HttpRequestPointer &) const override {
         return ToSBuf("Exception (ID=", std::hex, exceptionId, ')');
     }
 
index f52a629aa1c16f3251c00920afc257c0cc27155d..d0545c012faf12006f0a9e8b2419d741dab890d4 100644 (file)
@@ -29,8 +29,8 @@ public:
     static SBuf Brief(int errorNo);
 
     /* ErrorDetail API */
-    virtual SBuf brief() const override;
-    virtual SBuf verbose(const HttpRequestPointer &) const override;
+    SBuf brief() const override;
+    SBuf verbose(const HttpRequestPointer &) const override;
 
 private:
     // hidden by NewIfAny() to avoid creating SysErrorDetail from zero errno
index 5af40191f03a55ec0946ee88c8c39f053f5891f5..59195c999fa1e5d213fae691d3103b05891408dc 100644 (file)
@@ -218,7 +218,7 @@ public:
     const char *text() { return template_.c_str(); }
 
 protected:
-    virtual void setDefault() override {
+    void setDefault() override {
         template_ = "Internal Error: Missing Template ";
         template_.append(templateName.termedBuf());
     }
index 53dc38adff8a53f0ffe876bb1b11098ed1736f1c..4cad924daf72d9d0f25aeab0f9e9c08716cd3c19 100644 (file)
@@ -19,9 +19,9 @@
 class ESIVariableExpression : public ESIVarState::Variable
 {
 public:
-    ~ESIVariableExpression();
+    ~ESIVariableExpression() override;
     ESIVariableExpression (String const &value);
-    virtual void eval (ESIVarState &state, char const *, char const *) const;
+    void eval (ESIVarState &state, char const *, char const *) const override;
 
 private:
     String expression;
@@ -37,14 +37,14 @@ public:
     ESIAssign (esiTreeParentPtr, int, const char **, ESIContext *);
     ESIAssign (ESIAssign const &);
     ESIAssign &operator=(ESIAssign const &);
-    ~ESIAssign();
-    esiProcessResult_t process (int dovars);
-    void render(ESISegment::Pointer);
-    bool addElement(ESIElement::Pointer);
-    void provideData (ESISegment::Pointer data, ESIElement * source);
-    Pointer makeCacheable() const;
-    Pointer makeUsable(esiTreeParentPtr, ESIVarState &) const;
-    void finish();
+    ~ESIAssign() override;
+    esiProcessResult_t process (int dovars) override;
+    void render(ESISegment::Pointer) override;
+    bool addElement(ESIElement::Pointer) override;
+    void provideData (ESISegment::Pointer data, ESIElement * source) override;
+    Pointer makeCacheable() const override;
+    Pointer makeUsable(esiTreeParentPtr, ESIVarState &) const override;
+    void finish() override;
 
 private:
     void evaluateVariable();
index 656dacfed9375fdf0f8fb7685b2ff3f8346084d9..565a32eb3e41b86ba520776a654acda80f70de44 100644 (file)
@@ -45,7 +45,7 @@ public:
         memset(&flags, 0, sizeof(flags));
     }
 
-    ~ESIContext();
+    ~ESIContext() override;
 
     enum esiKick_t {
         ESI_KICK_FAILED,
@@ -55,8 +55,8 @@ public:
     };
 
     /* when esi processing completes */
-    void provideData(ESISegment::Pointer, ESIElement *source);
-    void fail (ESIElement *source, char const*anError = nullptr);
+    void provideData(ESISegment::Pointer, ESIElement *source) override;
+    void fail (ESIElement *source, char const*anError = nullptr) override;
     void startRead();
     void finishRead();
     bool reading() const;
@@ -153,10 +153,10 @@ private:
     void updateCachedAST();
     bool hasCachedAST() const;
     void getCachedAST();
-    virtual void start(const char *el, const char **attr, size_t attrCount);
-    virtual void end(const char *el);
-    virtual void parserDefault (const char *s, int len);
-    virtual void parserComment (const char *s);
+    void start(const char *el, const char **attr, size_t attrCount) override;
+    void end(const char *el) override;
+    void parserDefault (const char *s, int len) override;
+    void parserComment (const char *s) override;
     bool processing;
 };
 
index 32dcdfb966a704b246e1aa29be210e1ca1776263..12dd8881d0460215f3405380533c0889cf142a22 100644 (file)
@@ -32,7 +32,7 @@ struct esiTreeParent : public RefCountable {
 
     virtual void fail(ESIElement * /* source */, char const * /* reason */ = nullptr) {}
 
-    virtual ~esiTreeParent() {}
+    ~esiTreeParent() override {}
 };
 
 typedef RefCount<esiTreeParent> esiTreeParentPtr;
index 514686144dabdcaffe7111e4b4d268cbe8d4dcae..7e5283295fd9a62f155dd9d4adc5317aecae59d2 100644 (file)
@@ -89,13 +89,13 @@ class esiComment : public ESIElement
     MEMPROXY_CLASS(esiComment);
 
 public:
-    ~esiComment();
+    ~esiComment() override;
     esiComment();
-    Pointer makeCacheable() const;
-    Pointer makeUsable(esiTreeParentPtr, ESIVarState &) const;
+    Pointer makeCacheable() const override;
+    Pointer makeUsable(esiTreeParentPtr, ESIVarState &) const override;
 
-    void render(ESISegment::Pointer);
-    void finish();
+    void render(ESISegment::Pointer) override;
+    void finish() override;
 };
 
 #include "esi/Literal.h"
@@ -112,13 +112,13 @@ class esiRemove : public ESIElement
 
 public:
     esiRemove() : ESIElement() {}
-    virtual ~esiRemove() {}
+    ~esiRemove() override {}
 
-    virtual void render(ESISegment::Pointer);
-    virtual bool addElement (ESIElement::Pointer);
-    virtual Pointer makeCacheable() const;
-    virtual Pointer makeUsable(esiTreeParentPtr, ESIVarState &) const;
-    virtual void finish() {}
+    void render(ESISegment::Pointer) override;
+    bool addElement (ESIElement::Pointer) override;
+    Pointer makeCacheable() const override;
+    Pointer makeUsable(esiTreeParentPtr, ESIVarState &) const override;
+    void finish() override {}
 };
 
 class esiTry : public ESIElement
@@ -127,15 +127,15 @@ class esiTry : public ESIElement
 
 public:
     esiTry(esiTreeParentPtr aParent);
-    ~esiTry();
+    ~esiTry() override;
 
-    void render(ESISegment::Pointer);
-    bool addElement (ESIElement::Pointer);
-    void fail(ESIElement *, char const * = nullptr);
-    esiProcessResult_t process (int dovars);
-    void provideData (ESISegment::Pointer data, ESIElement * source);
-    Pointer makeCacheable() const;
-    Pointer makeUsable(esiTreeParentPtr, ESIVarState &) const;
+    void render(ESISegment::Pointer) override;
+    bool addElement (ESIElement::Pointer) override;
+    void fail(ESIElement *, char const * = nullptr) override;
+    esiProcessResult_t process (int dovars) override;
+    void provideData (ESISegment::Pointer data, ESIElement * source) override;
+    Pointer makeCacheable() const override;
+    Pointer makeUsable(esiTreeParentPtr, ESIVarState &) const override;
 
     ESIElement::Pointer attempt;
     ESIElement::Pointer except;
@@ -146,7 +146,7 @@ public:
         int attemptfailed:1; /* The attempt branch failed */
         int exceptfailed:1; /* the except branch failed */
     } flags;
-    void finish();
+    void finish() override;
 
 private:
     void notifyParent();
@@ -164,24 +164,24 @@ class esiChoose : public ESIElement
 
 public:
     esiChoose(esiTreeParentPtr);
-    ~esiChoose();
+    ~esiChoose() override;
 
-    void render(ESISegment::Pointer);
-    bool addElement (ESIElement::Pointer);
-    void fail(ESIElement *, char const * = nullptr);
-    esiProcessResult_t process (int dovars);
+    void render(ESISegment::Pointer) override;
+    bool addElement (ESIElement::Pointer) override;
+    void fail(ESIElement *, char const * = nullptr) override;
+    esiProcessResult_t process (int dovars) override;
 
-    void provideData (ESISegment::Pointer data, ESIElement *source);
+    void provideData (ESISegment::Pointer data, ESIElement *source) override;
     void makeCachableElements(esiChoose const &old);
     void makeUsableElements(esiChoose const &old, ESIVarState &);
-    Pointer makeCacheable() const;
-    Pointer makeUsable(esiTreeParentPtr, ESIVarState &) const;
+    Pointer makeCacheable() const override;
+    Pointer makeUsable(esiTreeParentPtr, ESIVarState &) const override;
     void NULLUnChosen();
 
     Esi::Elements elements;
     int chosenelement;
     ESIElement::Pointer otherwise;
-    void finish();
+    void finish() override;
 
 private:
     esiChoose(esiChoose const &);
@@ -196,9 +196,9 @@ class esiWhen : public esiSequence
 
 public:
     esiWhen(esiTreeParentPtr aParent, int attributes, const char **attr, ESIVarState *);
-    ~esiWhen();
-    Pointer makeCacheable() const;
-    Pointer makeUsable(esiTreeParentPtr, ESIVarState &) const;
+    ~esiWhen() override;
+    Pointer makeCacheable() const override;
+    Pointer makeUsable(esiTreeParentPtr, ESIVarState &) const override;
 
     bool testsTrue() const { return testValue;}
 
index 32bb62d8736c944d638fb9243a8f0ff07fcde225..cb8daceb21997bdefc7c732372c2e272cea15427 100644 (file)
@@ -23,7 +23,7 @@ namespace Esi
 class ExpatRr : public RegisteredRunner
 {
 public:
-    void finalizeConfig()
+    void finalizeConfig() override
     {
         registration.reset(new ESIParser::Register("expat", &ESIExpatParser::NewParser));
     }
index 46477b0c88733647589fab67bddd75fe879a0dc5..b43d89284e9b68896475c23748da2882f265dd1b 100644 (file)
@@ -22,13 +22,13 @@ class ESIExpatParser : public ESIParser
 
 public:
     ESIExpatParser(ESIParserClient *);
-    ~ESIExpatParser();
+    ~ESIExpatParser() override;
 
     /** \retval true    on success */
-    bool parse(char const *dataToParse, size_t const lengthOfData, bool const endOfStream);
+    bool parse(char const *dataToParse, size_t const lengthOfData, bool const endOfStream) override;
 
-    long int lineNumber() const;
-    char const * errorString() const;
+    long int lineNumber() const override;
+    char const * errorString() const override;
 
     EsiParserDeclaration;
 
index 5d157ec968de99f210a0184432dd34e96b63e555..7d9348aa8df183c7bbbd246f259f97308092bde3 100644 (file)
@@ -25,7 +25,7 @@ class ESIStreamContext : public RefCountable
 public:
     typedef RefCount<ESIStreamContext> Pointer;
     ESIStreamContext();
-    ~ESIStreamContext();
+    ~ESIStreamContext() override;
     void freeResources();
     int finished;
     ESIIncludePtr include;
@@ -39,11 +39,11 @@ class ESIInclude : public ESIElement
 
 public:
     ESIInclude(esiTreeParentPtr, int attributes, const char **attr, ESIContext *);
-    ~ESIInclude();
-    void render(ESISegment::Pointer);
-    esiProcessResult_t process (int dovars);
-    Pointer makeCacheable() const;
-    Pointer makeUsable(esiTreeParentPtr, ESIVarState &) const;
+    ~ESIInclude() override;
+    void render(ESISegment::Pointer) override;
+    esiProcessResult_t process (int dovars) override;
+    Pointer makeCacheable() const override;
+    Pointer makeUsable(esiTreeParentPtr, ESIVarState &) const override;
     void subRequestDone (ESIStreamContext::Pointer, bool);
 
     struct {
@@ -58,7 +58,7 @@ public:
     ESIVarState *varState;
     char *srcurl, *alturl;
     void includeFail(ESIStreamContext::Pointer);
-    void finish();
+    void finish() override;
 
 private:
     void Start (ESIStreamContext::Pointer, char const *, ESIVarState *);
index 4b16f8b10450225600976fda74b067d2fa1ddabc..bf66ba2895dedc4bf51774c3dbb2fcb7f615b499 100644 (file)
@@ -27,7 +27,7 @@ namespace Esi
 class Libxml2Rr : public RegisteredRunner
 {
 public:
-    void finalizeConfig()
+    void finalizeConfig() override
     {
         registration.reset(new ESIParser::Register("libxml2", &ESILibxml2Parser::NewParser));
     }
index 01e6059676013d9aa761f61f948802033f995583..3bf9191ccb1fbeb392dfce670c1e3d1e2b6d3004 100644 (file)
@@ -52,11 +52,11 @@ class ESILibxml2Parser : public ESIParser
 
 public:
     ESILibxml2Parser(ESIParserClient *);
-    ~ESILibxml2Parser();
+    ~ESILibxml2Parser() override;
     /* true on success */
-    bool parse(char const *dataToParse, size_t const lengthOfData, bool const endOfStream);
-    long int lineNumber() const;
-    char const * errorString() const;
+    bool parse(char const *dataToParse, size_t const lengthOfData, bool const endOfStream) override;
+    long int lineNumber() const override;
+    char const * errorString() const override;
 
     ESIParserClient *getClient() { return theClient; }
 
index 33cc7f55a11b6cfbc597b3d4416bda18883d9088..9ce5580a161cc164cf02817167b55ab17f818d15 100644 (file)
@@ -22,12 +22,12 @@ class esiLiteral : public ESIElement
 public:
     esiLiteral(ESISegment::Pointer);
     esiLiteral(ESIContext *, const char *s, int len);
-    ~esiLiteral();
+    ~esiLiteral() override;
 
-    void render(ESISegment::Pointer);
-    esiProcessResult_t process (int dovars);
-    Pointer makeCacheable() const;
-    Pointer makeUsable(esiTreeParentPtr, ESIVarState &) const;
+    void render(ESISegment::Pointer) override;
+    esiProcessResult_t process (int dovars) override;
+    Pointer makeCacheable() const override;
+    Pointer makeUsable(esiTreeParentPtr, ESIVarState &) const override;
     /* optimise copies away later */
     ESISegment::Pointer buffer;
 
@@ -36,7 +36,7 @@ public:
     } flags;
 
     ESIVarState *varState;
-    void finish();
+    void finish() override;
 
 private:
     esiLiteral(esiLiteral const &);
index 5ff46e610f63c5dfcbf65603dfaa7f28b8d1111a..84eaeb56cac53675157b501a1376d79b748415ca 100644 (file)
@@ -29,7 +29,7 @@ public:
 
     ESISegment() : len(0), next(nullptr) {*buf = 0;}
     ESISegment(ESISegment const &);
-    ~ESISegment() {}
+    ~ESISegment() override {}
 
     ESISegment::Pointer cloneList() const;
     char *listToChar() const;
index 83ea115abc985dc4d1e9fda2aae26534de3c7932..37923406e94585aeaef13b48535d124f52e9ee5b 100644 (file)
@@ -22,19 +22,19 @@ class esiSequence : public ESIElement
 
 public:
     esiSequence(esiTreeParentPtr, bool = false);
-    ~esiSequence();
+    ~esiSequence() override;
 
-    void render(ESISegment::Pointer);
-    bool addElement (ESIElement::Pointer);
-    esiProcessResult_t process (int dovars);
-    void provideData (ESISegment::Pointer, ESIElement*);
-    bool mayFail () const;
+    void render(ESISegment::Pointer) override;
+    bool addElement (ESIElement::Pointer) override;
+    esiProcessResult_t process (int dovars) override;
+    void provideData (ESISegment::Pointer, ESIElement*) override;
+    bool mayFail () const override;
     void wontFail();
-    void fail(ESIElement *, char const *anError = nullptr);
+    void fail(ESIElement *, char const *anError = nullptr) override;
     void makeCachableElements(esiSequence const &old);
-    Pointer makeCacheable() const;
+    Pointer makeCacheable() const override;
     void makeUsableElements(esiSequence const &old, ESIVarState &);
-    Pointer makeUsable(esiTreeParentPtr, ESIVarState &) const;
+    Pointer makeUsable(esiTreeParentPtr, ESIVarState &) const override;
 
     Esi::Elements elements; /* unprocessed or rendered nodes */
     size_t processedcount;
@@ -42,7 +42,7 @@ public:
     struct {
         int dovars:1; /* for esiVar */
     } flags;
-    void finish();
+    void finish() override;
 
 protected:
     esiSequence(esiSequence const &);
index 6417bdb6447a5b0ee9cebc28395887bbdc3504d6..0f49c528a300aab35d40cac51b7934ac502e285f 100644 (file)
@@ -101,21 +101,21 @@ class ESIVariableCookie : public ESIVarState::Variable
 {
 
 public:
-    virtual void eval (ESIVarState &state, char const *, char const *) const;
+    void eval (ESIVarState &state, char const *, char const *) const override;
 };
 
 class ESIVariableHost : public ESIVarState::Variable
 {
 
 public:
-    virtual void eval (ESIVarState &state, char const *, char const *) const;
+    void eval (ESIVarState &state, char const *, char const *) const override;
 };
 
 class ESIVariableLanguage : public ESIVarState::Variable
 {
 
 public:
-    virtual void eval (ESIVarState &state, char const *, char const *) const;
+    void eval (ESIVarState &state, char const *, char const *) const override;
 };
 
 class ESIVariableQuery : public ESIVarState::Variable
@@ -123,8 +123,8 @@ class ESIVariableQuery : public ESIVarState::Variable
 
 public:
     ESIVariableQuery(char const *uri);
-    ~ESIVariableQuery();
-    virtual void eval (ESIVarState &state, char const *, char const *) const;
+    ~ESIVariableQuery() override;
+    void eval (ESIVarState &state, char const *, char const *) const override;
     char const *queryString() const;
 
     struct _query_elem const *queryVector() const;
@@ -140,16 +140,16 @@ class ESIVariableReferer : public ESIVarState::Variable
 {
 
 public:
-    virtual void eval (ESIVarState &state, char const *, char const *) const;
+    void eval (ESIVarState &state, char const *, char const *) const override;
 };
 
 class ESIVariableUserAgent : public ESIVarState::Variable
 {
 
 public:
-    ~ESIVariableUserAgent();
+    ~ESIVariableUserAgent() override;
     ESIVariableUserAgent (ESIVarState &state);
-    virtual void eval (ESIVarState &state, char const *, char const *) const;
+    void eval (ESIVarState &state, char const *, char const *) const override;
 
 private:
     static char const * esiUserOs[];
index 4ee4df1766e5b20db9130d88f4be31077f0d2728..5d75ec1f645d52396f48bd665090b971fb9bff88 100644 (file)
@@ -31,9 +31,9 @@ public:
 
     EventDialer(EVH *aHandler, void *anArg, bool lockedArg);
     EventDialer(const EventDialer &d);
-    virtual ~EventDialer();
+    ~EventDialer() override;
 
-    virtual void print(std::ostream &os) const;
+    void print(std::ostream &os) const override;
     virtual bool canDial(AsyncCall &call);
 
     void dial(AsyncCall &) { theHandler(theArg); }
index 31fc9ab7bea25ada6af16791f6d27878a22b1b69..c03ae76621fbd864b10f90020b16e4df0cd22844 100644 (file)
@@ -47,7 +47,7 @@ class EventScheduler : public AsyncEngine
 
 public:
     EventScheduler();
-    ~EventScheduler();
+    ~EventScheduler() override;
     /* cancel a scheduled but not dispatched event */
     void cancel(EVH * func, void * arg);
     /* clean up the used memory in the scheduler */
@@ -60,7 +60,7 @@ public:
     bool find(EVH * func, void * arg);
     /* schedule a callback function to run in when seconds */
     void schedule(const char *name, EVH * func, void *arg, double when, int weight, bool cbdata=true);
-    int checkEvents(int timeout);
+    int checkEvents(int timeout) override;
     static EventScheduler *GetInstance();
 
 private:
index e63685f6d6cad95886b1c30dae7d7fe089c8f5d7..eaaffa6a39c2f9c37ad129a407486122e0fb33e6 100644 (file)
@@ -35,13 +35,13 @@ public:
         ssize_t size;
     };
     HeaderUpdater(const Rock::SwapDir::Pointer &aStore, const Ipc::StoreMapUpdate &update);
-    virtual ~HeaderUpdater() override = default;
+    ~HeaderUpdater() override = default;
 
 protected:
     /* AsyncJob API */
-    virtual void start() override;
-    virtual bool doneAll() const override;
-    virtual void swanSong() override;
+    void start() override;
+    bool doneAll() const override;
+    void swanSong() override;
 
 private:
     static StoreIOState::STRCB NoteRead;
index c51da8b88bcebf9249ac8e4b8e187dc9c9c93f4b..43cba944074134b2dcdeec0e235889a264d8154d 100644 (file)
@@ -433,7 +433,7 @@ public:
         callback_data = cbdataReference(cb.callback_data);
     }
 
-    virtual ~StoreIOStateCb() {
+    ~StoreIOStateCb() override {
         cbdataReferenceDone(callback_data); // may be nil already
     }
 
@@ -447,7 +447,7 @@ public:
         return cbdataReferenceValid(callback_data) && callback;
     }
 
-    virtual void print(std::ostream &os) const {
+    void print(std::ostream &os) const override {
         os << '(' << callback_data << ", err=" << errflag << ')';
     }
 
index 0a5a191248da1c7c894b1cb649b1fd098387dc60..90e2b2bd9d4c7c0589cdb3363f63eba94a801c18 100644 (file)
@@ -30,14 +30,14 @@ public:
     typedef RefCount<IoState> Pointer;
 
     IoState(Rock::SwapDir::Pointer &aDir, StoreEntry *e, StoreIOState::STFNCB *cbFile, StoreIOState::STIOCB *cbIo, void *data);
-    virtual ~IoState();
+    ~IoState() override;
 
     void file(const RefCount<DiskFile> &aFile);
 
     // ::StoreIOState API
-    virtual void read_(char *buf, size_t size, off_t offset, STRCB * callback, void *callback_data);
-    virtual bool write(char const *buf, size_t size, off_t offset, FREE * free_func);
-    virtual void close(int how);
+    void read_(char *buf, size_t size, off_t offset, STRCB * callback, void *callback_data) override;
+    bool write(char const *buf, size_t size, off_t offset, FREE * free_func) override;
+    void close(int how) override;
 
     /// whether we are still waiting for the I/O results (i.e., not closed)
     bool stillWaiting() const { return theFile != nullptr; }
index b5f2bfed7a5d200ba050f59f07221863a8bc1298..fb46abc26a8c92bb4828c3e74717b8e17a24ffb2 100644 (file)
@@ -57,15 +57,15 @@ protected:
     static bool IsResponsible(const SwapDir &);
 
     Rebuild(SwapDir *dir, const Ipc::Mem::Pointer<Stats> &);
-    virtual ~Rebuild() override;
+    ~Rebuild() override;
 
     /* Registered Runner API */
-    virtual void startShutdown() override;
+    void startShutdown() override;
 
     /* AsyncJob API */
-    virtual void start() override;
-    virtual bool doneAll() const override;
-    virtual void swanSong() override;
+    void start() override;
+    bool doneAll() const override;
+    void swanSong() override;
 
     bool doneLoading() const;
     bool doneValidating() const;
index a7cbae6ca384944ccc44b285810c9f3b822a7f28..9230835e35afaa54c34cbbde053c297b52832779 100644 (file)
@@ -23,11 +23,11 @@ public:
     static void Stats(StoreEntry * sentry);
 
     StoreFileSystem();
-    virtual ~StoreFileSystem();
+    ~StoreFileSystem() override;
 
     /* StoreFileSystem API */
-    virtual char const *type() const override;
-    virtual SwapDir *createSwapDir() override;
+    char const *type() const override;
+    SwapDir *createSwapDir() override;
 
 private:
     //static Stats Stats_;
index 7619a9e460fa3a5e63f4cc801746069bcca05e98..696b82b94a602fee6d0d4b84d930e4d3481edbff 100644 (file)
@@ -36,23 +36,23 @@ public:
     typedef Ipc::StoreMap DirMap;
 
     SwapDir();
-    virtual ~SwapDir();
+    ~SwapDir() override;
 
     /* public ::SwapDir API */
-    virtual void reconfigure();
-    virtual StoreEntry *get(const cache_key *key);
-    virtual void evictCached(StoreEntry &);
-    virtual void evictIfFound(const cache_key *);
-    virtual void disconnect(StoreEntry &e);
-    virtual uint64_t currentSize() const;
-    virtual uint64_t currentCount() const;
-    virtual bool doReportStat() const;
-    virtual void finalizeSwapoutSuccess(const StoreEntry &);
-    virtual void finalizeSwapoutFailure(StoreEntry &);
-    virtual void create();
-    virtual void parse(int index, char *path);
-    virtual bool smpAware() const { return true; }
-    virtual bool hasReadableEntry(const StoreEntry &) const;
+    void reconfigure() override;
+    StoreEntry *get(const cache_key *key) override;
+    void evictCached(StoreEntry &) override;
+    void evictIfFound(const cache_key *) override;
+    void disconnect(StoreEntry &e) override;
+    uint64_t currentSize() const override;
+    uint64_t currentCount() const override;
+    bool doReportStat() const override;
+    void finalizeSwapoutSuccess(const StoreEntry &) override;
+    void finalizeSwapoutFailure(StoreEntry &) override;
+    void create() override;
+    void parse(int index, char *path) override;
+    bool smpAware() const override { return true; }
+    bool hasReadableEntry(const StoreEntry &) const override;
 
     // temporary path to the shared memory map of first slots of cached entries
     SBuf inodeMapPath() const;
@@ -78,36 +78,36 @@ public:
     void writeError(StoreIOState &sio);
 
     /* StoreMapCleaner API */
-    virtual void noteFreeMapSlice(const Ipc::StoreMapSliceId fileno);
+    void noteFreeMapSlice(const Ipc::StoreMapSliceId fileno) override;
 
     uint64_t slotSize; ///< all db slots are of this size
 
 protected:
     /* Store API */
-    virtual bool anchorToCache(StoreEntry &);
-    virtual bool updateAnchored(StoreEntry &);
+    bool anchorToCache(StoreEntry &) override;
+    bool updateAnchored(StoreEntry &) override;
 
     /* protected ::SwapDir API */
-    virtual bool needsDiskStrand() const;
-    virtual void init();
-    virtual ConfigOption *getOptionTree() const;
-    virtual bool allowOptionReconfigure(const char *const option) const;
-    virtual bool canStore(const StoreEntry &e, int64_t diskSpaceNeeded, int &load) const;
-    virtual StoreIOState::Pointer createStoreIO(StoreEntry &, StoreIOState::STFNCB *, StoreIOState::STIOCB *, void *);
-    virtual StoreIOState::Pointer openStoreIO(StoreEntry &, StoreIOState::STFNCB *, StoreIOState::STIOCB *, void *);
-    virtual void maintain();
-    virtual void diskFull();
-    virtual void reference(StoreEntry &e);
-    virtual bool dereference(StoreEntry &e);
-    virtual void updateHeaders(StoreEntry *e);
-    virtual bool unlinkdUseful() const;
-    virtual void statfs(StoreEntry &e) const;
+    bool needsDiskStrand() const override;
+    void init() override;
+    ConfigOption *getOptionTree() const override;
+    bool allowOptionReconfigure(const char *const option) const override;
+    bool canStore(const StoreEntry &e, int64_t diskSpaceNeeded, int &load) const override;
+    StoreIOState::Pointer createStoreIO(StoreEntry &, StoreIOState::STFNCB *, StoreIOState::STIOCB *, void *) override;
+    StoreIOState::Pointer openStoreIO(StoreEntry &, StoreIOState::STFNCB *, StoreIOState::STIOCB *, void *) override;
+    void maintain() override;
+    void diskFull() override;
+    void reference(StoreEntry &e) override;
+    bool dereference(StoreEntry &e) override;
+    void updateHeaders(StoreEntry *e) override;
+    bool unlinkdUseful() const override;
+    void statfs(StoreEntry &e) const override;
 
     /* IORequestor API */
-    virtual void ioCompletedNotification();
-    virtual void closeCompleted();
-    virtual void readCompleted(const char *buf, int len, int errflag, RefCount< ::ReadRequest>);
-    virtual void writeCompleted(int errflag, size_t len, RefCount< ::WriteRequest>);
+    void ioCompletedNotification() override;
+    void closeCompleted() override;
+    void readCompleted(const char *buf, int len, int errflag, RefCount< ::ReadRequest>) override;
+    void writeCompleted(int errflag, size_t len, RefCount< ::WriteRequest>) override;
 
     void parseSize(const bool reconfiguring); ///< parses anonymous cache_dir size option
     void validateOptions(); ///< warns of configuration problems; may quit
@@ -156,11 +156,11 @@ class SwapDirRr: public Ipc::Mem::RegisteredRunner
 {
 public:
     /* ::RegisteredRunner API */
-    virtual ~SwapDirRr();
+    ~SwapDirRr() override;
 
 protected:
     /* Ipc::Mem::RegisteredRunner API */
-    virtual void create();
+    void create() override;
 
 private:
     std::vector<Ipc::Mem::Owner<Rebuild::Stats> *> rebuildStatsOwners;
index 7c453da674fb841501a13632525b1876814ba9ce..092bb6954cf33909e2dab4a6c05cc79edafc28cf 100644 (file)
@@ -36,11 +36,11 @@ class StoreFSufs : public StoreFileSystem
 public:
     static StoreFileSystem &GetInstance();
     StoreFSufs(char const *DefaultModuleType, char const *label);
-    virtual ~StoreFSufs() {}
+    ~StoreFSufs() override {}
 
     /* StoreFileSystem API */
-    virtual const char *type() const override;
-    virtual SwapDir *createSwapDir() override;
+    const char *type() const override;
+    SwapDir *createSwapDir() override;
 
 protected:
     DiskIOModule *IO;
index af4eeca196aea34a28ce09c24db36b8f0e984c66..c9f9d1bb9e5ff448d614e33df17d54371534f0f5 100644 (file)
@@ -23,24 +23,24 @@ class StoreSearchUFS : public StoreSearch
 
 public:
     StoreSearchUFS(RefCount<UFSSwapDir> sd);
-    virtual ~StoreSearchUFS();
+    ~StoreSearchUFS() override;
 
     // TODO: misplaced Iterator API
     /**
      * callback the client when a new StoreEntry is available
      * or an error occurs
      */
-    virtual void next(void (callback)(void *cbdata), void *cbdata);
+    void next(void (callback)(void *cbdata), void *cbdata) override;
 
     /**
      \retval true if a new StoreEntry is immediately available
      \retval false if a new StoreEntry is NOT immediately available
      */
-    virtual bool next();
+    bool next() override;
 
-    virtual bool error() const;
-    virtual bool isDone() const;
-    virtual StoreEntry *currentItem();
+    bool error() const override;
+    bool isDone() const override;
+    StoreEntry *currentItem() override;
 
     RefCount<UFSSwapDir> sd;
     RemovalPolicyWalker *walker;
index eb2458bac26de7660e1b9361e635637d1a494fa2..61b9ff42ad6c893bdf2dd97d211b7c92c1792db5 100644 (file)
@@ -25,13 +25,13 @@ class UFSStoreState : public StoreIOState, public IORequestor
 
 public:
     UFSStoreState(SwapDir * SD, StoreEntry * anEntry, STIOCB * callback_, void *callback_data_);
-    ~UFSStoreState();
-    virtual void close(int how);
-    virtual void closeCompleted();
+    ~UFSStoreState() override;
+    void close(int how) override;
+    void closeCompleted() override;
     // protected:
-    virtual void ioCompletedNotification();
-    virtual void readCompleted(const char *buf, int len, int errflag, RefCount<ReadRequest>);
-    virtual void writeCompleted(int errflag, size_t len, RefCount<WriteRequest>);
+    void ioCompletedNotification() override;
+    void readCompleted(const char *buf, int len, int errflag, RefCount<ReadRequest>) override;
+    void writeCompleted(int errflag, size_t len, RefCount<WriteRequest>) override;
     RefCount<DiskFile> theFile;
     bool opening;
     bool creating;
@@ -39,8 +39,8 @@ public:
     bool reading;
     bool writing;
     /* StoreIOState API */
-    void read_(char *buf, size_t size, off_t offset, STRCB * callback, void *callback_data);
-    virtual bool write(char const *buf, size_t size, off_t offset, FREE * free_func);
+    void read_(char *buf, size_t size, off_t offset, STRCB * callback, void *callback_data) override;
+    bool write(char const *buf, size_t size, off_t offset, FREE * free_func) override;
 
 protected:
     virtual void doCloseCallback (int errflag);
index 65301a42f27816bb88a0b5eded17894543e27905..c85258d54525ec9cfed736f3e6ae48b8a8af3013 100644 (file)
@@ -47,10 +47,10 @@ public:
     UFSCleanLog(SwapDir *aSwapDir) : sd(aSwapDir) {}
 
     /// Get the next entry that is a candidate for clean log writing
-    virtual const StoreEntry *nextEntry();
+    const StoreEntry *nextEntry() override;
 
     /// "write" an entry to the clean log file.
-    virtual void write(StoreEntry const &);
+    void write(StoreEntry const &) override;
 
     SBuf cur;
     SBuf newLog;
index 8575b74c37536170aafeeb2765527a0bfa06af98..6cc8c5f201f18454210294ce43851b28636e5f74 100644 (file)
@@ -41,41 +41,41 @@ public:
     static bool FilenoBelongsHere(int fn, int cachedir, int level1dir, int level2dir);
 
     UFSSwapDir(char const *aType, const char *aModuleType);
-    virtual ~UFSSwapDir();
+    ~UFSSwapDir() override;
 
     /* Store::Disk API */
-    virtual void create() override;
-    virtual void init() override;
-    virtual void dump(StoreEntry &) const override;
-    virtual bool doubleCheck(StoreEntry &) override;
-    virtual bool unlinkdUseful() const override;
-    virtual void statfs(StoreEntry &) const override;
-    virtual void maintain() override;
-    virtual void evictCached(StoreEntry &) override;
-    virtual void evictIfFound(const cache_key *) override;
-    virtual bool canStore(const StoreEntry &e, int64_t diskSpaceNeeded, int &load) const override;
-    virtual void reference(StoreEntry &) override;
-    virtual bool dereference(StoreEntry &) override;
-    virtual StoreIOState::Pointer createStoreIO(StoreEntry &, StoreIOState::STFNCB *, StoreIOState::STIOCB *, void *) override;
-    virtual StoreIOState::Pointer openStoreIO(StoreEntry &, StoreIOState::STFNCB *, StoreIOState::STIOCB *, void *) override;
-    virtual void openLog() override;
-    virtual void closeLog() override;
-    virtual int writeCleanStart() override;
-    virtual void writeCleanDone() override;
-    virtual void logEntry(const StoreEntry & e, int op) const override;
-    virtual void parse(int index, char *path) override;
-    virtual void reconfigure() override;
-    virtual int callback() override;
-    virtual void sync() override;
-    virtual void finalizeSwapoutSuccess(const StoreEntry &) override;
-    virtual void finalizeSwapoutFailure(StoreEntry &) override;
-    virtual uint64_t currentSize() const override { return cur_size; }
-    virtual uint64_t currentCount() const override { return n_disk_objects; }
-    virtual ConfigOption *getOptionTree() const override;
-    virtual bool smpAware() const override { return false; }
+    void create() override;
+    void init() override;
+    void dump(StoreEntry &) const override;
+    bool doubleCheck(StoreEntry &) override;
+    bool unlinkdUseful() const override;
+    void statfs(StoreEntry &) const override;
+    void maintain() override;
+    void evictCached(StoreEntry &) override;
+    void evictIfFound(const cache_key *) override;
+    bool canStore(const StoreEntry &e, int64_t diskSpaceNeeded, int &load) const override;
+    void reference(StoreEntry &) override;
+    bool dereference(StoreEntry &) override;
+    StoreIOState::Pointer createStoreIO(StoreEntry &, StoreIOState::STFNCB *, StoreIOState::STIOCB *, void *) override;
+    StoreIOState::Pointer openStoreIO(StoreEntry &, StoreIOState::STFNCB *, StoreIOState::STIOCB *, void *) override;
+    void openLog() override;
+    void closeLog() override;
+    int writeCleanStart() override;
+    void writeCleanDone() override;
+    void logEntry(const StoreEntry & e, int op) const override;
+    void parse(int index, char *path) override;
+    void reconfigure() override;
+    int callback() override;
+    void sync() override;
+    void finalizeSwapoutSuccess(const StoreEntry &) override;
+    void finalizeSwapoutFailure(StoreEntry &) override;
+    uint64_t currentSize() const override { return cur_size; }
+    uint64_t currentCount() const override { return n_disk_objects; }
+    ConfigOption *getOptionTree() const override;
+    bool smpAware() const override { return false; }
     /// as long as ufs relies on the global store_table to index entries,
     /// it is wrong to ask individual ufs cache_dirs whether they have an entry
-    virtual bool hasReadableEntry(const StoreEntry &) const override { return false; }
+    bool hasReadableEntry(const StoreEntry &) const override { return false; }
 
     void unlinkFile(sfileno f);
     // move down when unlink is a virtual method
index 48e8521f0669d14b791202d37b26d10422262b65..06d3f8fec7b95ad4f2382ff395d6e82253747d1c 100644 (file)
@@ -41,7 +41,7 @@ public:
         record_size = sizeof(UFSSwapLogParser_v1_32bs::StoreSwapLogDataOld);
     }
     /// Convert the on-disk 32-bit format to our current format while reading
-    bool ReadRecord(StoreSwapLogData &swapData) {
+    bool ReadRecord(StoreSwapLogData &swapData) override {
         UFSSwapLogParser_v1_32bs::StoreSwapLogDataOld readData;
         int bytes = sizeof(UFSSwapLogParser_v1_32bs::StoreSwapLogDataOld);
 
@@ -71,7 +71,7 @@ public:
     UFSSwapLogParser_v2(FILE *fp): Fs::Ufs::UFSSwapLogParser(fp) {
         record_size = sizeof(StoreSwapLogData);
     }
-    bool ReadRecord(StoreSwapLogData &swapData) {
+    bool ReadRecord(StoreSwapLogData &swapData) override {
         assert(log);
         return fread(&swapData, sizeof(StoreSwapLogData), 1, log) == 1;
     }
index fb2865c7d89b3f6109cdb74d8b3a8c5156429e3d..1f9f9a645ebd20c9f48e0a8f6d9a5dd1978fcb6f 100644 (file)
@@ -172,7 +172,7 @@ private:
 class HelperServerBase: public CbdataParent
 {
 public:
-    virtual ~HelperServerBase();
+    ~HelperServerBase() override;
     /** Closes pipes to the helper safely.
      * Handles the case where the read and write pipes are the same FD.
      *
@@ -266,7 +266,7 @@ public:
     typedef std::map<uint64_t, Requests::iterator> RequestIndex;
     RequestIndex requestsIndex; ///< maps request IDs to requests
 
-    virtual ~helper_server();
+    ~helper_server() override;
     /// Search in queue for the request with requestId, return the related
     /// Xaction object and remove it from queue.
     /// If concurrency is disabled then the requestId is ignored and the
@@ -278,9 +278,9 @@ public:
     void checkForTimedOutRequests(bool const retry);
 
     /*HelperServerBase API*/
-    virtual bool reserved() override {return false;}
-    virtual void dropQueued() override;
-    virtual helper *getParent() const override {return parent;}
+    bool reserved() override {return false;}
+    void dropQueued() override;
+    helper *getParent() const override {return parent;}
 
     /// Read timeout handler
     static void requestTimeout(const CommTimeoutCbParams &io);
@@ -296,13 +296,13 @@ class helper_stateful_server : public HelperServerBase
     CBDATA_CHILD(helper_stateful_server);
 
 public:
-    virtual ~helper_stateful_server();
+    ~helper_stateful_server() override;
     void reserve();
     void clearReservation();
 
     /* HelperServerBase API */
-    virtual bool reserved() override {return reservationId.reserved();}
-    virtual helper *getParent() const override {return parent;}
+    bool reserved() override {return reservationId.reserved();}
+    helper *getParent() const override {return parent;}
 
     /// close handler to handle exited server processes
     static void HelperServerClosed(helper_stateful_server *srv);
index 144704879f6082aabf49d70bb900907e2f2e533d..8156831b6941b957f71192df3060b568b98ea7b2 100644 (file)
@@ -136,12 +136,12 @@ public:
     }
 
     /* CodeContext API */
-    virtual ScopedId codeContextGist() const; // override
-    virtual std::ostream &detailCodeContext(std::ostream &os) const; // override
+    ScopedId codeContextGist() const override; // override
+    std::ostream &detailCodeContext(std::ostream &os) const override; // override
 
     /* StoreClient API */
-    virtual LogTags *loggingTags() const;
-    virtual void fillChecklist(ACLFilledChecklist &) const;
+    LogTags *loggingTags() const override;
+    void fillChecklist(ACLFilledChecklist &) const override;
 
 public:
     const char *method = nullptr;
index 2c369786b18126fb934db2634528978438458d2a..a5b4aac1f888a2865f41498de0fc0069478a96c8 100644 (file)
@@ -21,7 +21,7 @@ class String;
 
 class HttpStateData : public Client
 {
-    CBDATA_CLASS(HttpStateData);
+    CBDATA_CHILD(HttpStateData);
 
 public:
 
@@ -42,7 +42,7 @@ public:
     };
 
     HttpStateData(FwdState *);
-    ~HttpStateData();
+    ~HttpStateData() override;
 
     static void httpBuildRequestHeader(HttpRequest * request,
                                        StoreEntry * entry,
@@ -50,13 +50,13 @@ public:
                                        HttpHeader * hdr_out,
                                        const Http::StateFlags &flags);
 
-    virtual const Comm::ConnectionPointer & dataConnection() const;
+    const Comm::ConnectionPointer & dataConnection() const override;
     /* should be private */
     bool sendRequest();
     void processReplyHeader();
-    void processReplyBody();
+    void processReplyBody() override;
     void readReply(const CommIoCbParams &io);
-    virtual void maybeReadVirginBody(); // read response data from the network
+    void maybeReadVirginBody() override; // read response data from the network
 
     // Checks whether the response is cacheable/shareable.
     ReuseDecision::Answers reusableReply(ReuseDecision &decision);
@@ -76,7 +76,7 @@ public:
 
 protected:
     /* Client API */
-    virtual void noteDelayAwareReadChance();
+    void noteDelayAwareReadChance() override;
 
     void processReply();
     void proceedAfter1xx();
@@ -104,13 +104,13 @@ private:
     bool continueAfterParsingHeader();
     void truncateVirginBody();
 
-    virtual void start();
-    virtual void haveParsedReplyHeaders();
-    virtual bool getMoreRequestBody(MemBuf &buf);
-    virtual void closeServer(); // end communication with the server
-    virtual bool doneWithServer() const; // did we end communication?
-    virtual void abortAll(const char *reason); // abnormal termination
-    virtual bool mayReadVirginReplyBody() const;
+    void start() override;
+    void haveParsedReplyHeaders() override;
+    bool getMoreRequestBody(MemBuf &buf) override;
+    void closeServer() override; // end communication with the server
+    bool doneWithServer() const override; // did we end communication?
+    void abortAll(const char *reason) override; // abnormal termination
+    bool mayReadVirginReplyBody() const override;
 
     void abortTransaction(const char *reason) { abortAll(reason); } // abnormal termination
 
@@ -127,15 +127,15 @@ private:
 
     // consuming request body
     virtual void handleMoreRequestBodyAvailable();
-    virtual void handleRequestBodyProducerAborted();
+    void handleRequestBodyProducerAborted() override;
 
     void writeReplyBody();
     bool decodeAndWriteReplyBody();
     bool finishingBrokenPost();
     bool finishingChunkedRequest();
-    void doneSendingRequestBody();
+    void doneSendingRequestBody() override;
     void requestBodyHandler(MemBuf &);
-    virtual void sentRequestBody(const CommIoCbParams &io);
+    void sentRequestBody(const CommIoCbParams &io) override;
     void wroteLast(const CommIoCbParams &io);
     void sendComplete();
     void httpStateConnClosed(const CommCloseCbParams &params);
index a06c34e6d9d3d4a54f378b919a275db7afe4f85c..c1b8c53de54a04372adf13dd46f7e2bd853d9e57 100644 (file)
@@ -46,7 +46,7 @@ public:
     };
 
     Message(http_hdr_owner_type);
-    virtual ~Message();
+    ~Message() override;
 
     virtual void reset() = 0; // will have body when http*Clean()s are gone
 
index d01c6f66ee286666d88bf5728d10c53a659a3d56..58e290a334646593bbdd562d0e034a31951c026b 100644 (file)
@@ -73,7 +73,7 @@ class Stream : public RefCountable
 public:
     /// construct with HTTP/1.x details
     Stream(const Comm::ConnectionPointer &aConn, ClientHttpRequest *aReq);
-    ~Stream();
+    ~Stream() override;
 
     /// register this stream with the Server
     void registerWithConn();
index 7216401eb3f421fff37aa5590efde6999521de11..ae587257e43c6c8d5cb4beaef43f2142ddd040e0 100644 (file)
@@ -48,7 +48,7 @@ public:
     Parser &operator =(const Parser &) = default;
     Parser(Parser &&) = default;
     Parser &operator =(Parser &&) = default;
-    virtual ~Parser() {}
+    ~Parser() override {}
 
     /// Set this parser back to a default state.
     /// Will DROP any reference to a buffer (does not free).
index 4992d1e9b791e13e57e8133d298279bd90d7b1f0..02f0bac5e761a04c8a8f6a6ce92993b945d64535 100644 (file)
@@ -36,12 +36,12 @@ public:
     RequestParser &operator =(const RequestParser &) = default;
     RequestParser(RequestParser &&) = default;
     RequestParser &operator =(RequestParser &&) = default;
-    virtual ~RequestParser() {}
+    ~RequestParser() override {}
 
     /* Http::One::Parser API */
-    virtual void clear() {*this = RequestParser();}
-    virtual Http1::Parser::size_type firstLineSize() const;
-    virtual bool parse(const SBuf &aBuf);
+    void clear() override {*this = RequestParser();}
+    Http1::Parser::size_type firstLineSize() const override;
+    bool parse(const SBuf &aBuf) override;
 
     /// the HTTP method if this is a request message
     const HttpRequestMethod & method() const {return method_;}
index 78c8a40eb2d0afaa82b48ccfa70dbd06bd580b19..890850b91cb637cd8dd35af79c2f59f23119431b 100644 (file)
@@ -34,12 +34,12 @@ public:
     ResponseParser &operator =(const ResponseParser &) = default;
     ResponseParser(ResponseParser &&) = default;
     ResponseParser &operator =(ResponseParser &&) = default;
-    virtual ~ResponseParser() {}
+    ~ResponseParser() override {}
 
     /* Http::One::Parser API */
-    virtual void clear() {*this=ResponseParser();}
-    virtual Http1::Parser::size_type firstLineSize() const;
-    virtual bool parse(const SBuf &aBuf);
+    void clear() override {*this=ResponseParser();}
+    Http1::Parser::size_type firstLineSize() const override;
+    bool parse(const SBuf &aBuf) override;
 
     /* respone specific fields, read-only */
     Http::StatusCode messageStatus() const { return statusCode_;}
index a01b701ac9288dc482ba486aed4f90814d1ab22c..08b73cf5640ed270837d0f3e4c99aa6967bfe598 100644 (file)
@@ -52,7 +52,7 @@ class TeChunkedParser : public Http1::Parser
 {
 public:
     TeChunkedParser();
-    virtual ~TeChunkedParser() { theOut=nullptr; /* we do not own this object */ }
+    ~TeChunkedParser() override { theOut=nullptr; /* we do not own this object */ }
 
     /// set the buffer to be used to store decoded chunk data
     void setPayloadBuffer(MemBuf *parsedContent) {theOut = parsedContent;}
@@ -64,9 +64,9 @@ public:
     bool needsMoreSpace() const;
 
     /* Http1::Parser API */
-    virtual void clear();
-    virtual bool parse(const SBuf &);
-    virtual Parser::size_type firstLineSize() const {return 0;} // has no meaning with multiple chunks
+    void clear() override;
+    bool parse(const SBuf &) override;
+    Parser::size_type firstLineSize() const override {return 0;} // has no meaning with multiple chunks
 
 private:
     bool parseChunkSize(Tokenizer &tok);
index 458e3b23e0772677d5413ec14e11eb3b955da6d9..78eae9e633330fec3cd2bff2d323f5d902651421 100644 (file)
@@ -134,13 +134,13 @@ class Icmp4 : public Icmp
 {
 public:
     Icmp4();
-    virtual ~Icmp4();
+    ~Icmp4() override;
 
-    virtual int Open();
+    int Open() override;
 
 #if USE_ICMP
-    virtual void SendEcho(Ip::Address &, int, const char*, int);
-    virtual void Recv(void);
+    void SendEcho(Ip::Address &, int, const char*, int) override;
+    void Recv(void) override;
 #endif
 };
 
index 82fb06e99cb28cfc9fb2dbfa2cc48426d8dd08c8..b20d7f21bb6d670f747fe0c785fd06ba734191de 100644 (file)
@@ -46,13 +46,13 @@ class Icmp6 : public Icmp
 {
 public:
     Icmp6();
-    virtual ~Icmp6();
+    ~Icmp6() override;
 
-    virtual int Open();
+    int Open() override;
 
 #if USE_ICMP
-    virtual void SendEcho(Ip::Address &, int, const char*, int);
-    virtual void Recv(void);
+    void SendEcho(Ip::Address &, int, const char*, int) override;
+    void Recv(void) override;
 #endif
 };
 
index 624e7945d44a6e507d11b44abbf75d88283da37e..8cb7091a4a3828db73d9997a346bbdcc93becdc8 100644 (file)
@@ -19,13 +19,13 @@ class IcmpPinger : public Icmp
 {
 public:
     IcmpPinger();
-    virtual ~IcmpPinger();
+    ~IcmpPinger() override;
 
     /// Start and initiate control channel to squid
-    virtual int Open();
+    int Open() override;
 
     /// Shutdown pinger helper and control channel
-    virtual void Close();
+    void Close() override;
 
 #if USE_ICMP
 
@@ -33,11 +33,11 @@ public:
     void SendResult(pingerReplyData &preply, int len);
 
     /// Handle ICMP requests from squid, passing to helpers.
-    virtual void Recv(void);
+    void Recv(void) override;
 
 private:
     // unused in IcmpPinger
-    virtual void SendEcho(Ip::Address &, int, const char *, int) {}
+    void SendEcho(Ip::Address &, int, const char *, int) override {}
 
     /**
      * Control channel(s) to squid.
index ba51d8a786305ddd069c51779d85744f14e25df7..44cf993cba0bc591ad9891f0264bd992adeea965 100644 (file)
@@ -25,16 +25,16 @@ class IcmpSquid : public Icmp
 {
 public:
     IcmpSquid();
-    virtual ~IcmpSquid();
+    ~IcmpSquid() override;
 
-    virtual int Open();
-    virtual void Close();
+    int Open() override;
+    void Close() override;
 
     void DomainPing(Ip::Address &to, const char *domain);
 
 #if USE_ICMP
-    virtual void SendEcho(Ip::Address &to, int opcode, const char* payload=nullptr, int len=0);
-    virtual void Recv(void);
+    void SendEcho(Ip::Address &to, int opcode, const char* payload=nullptr, int len=0) override;
+    void Recv(void) override;
 #endif
 };
 
index fe9b7cd76de97e9594aeeaae56df361bfaa549ce..f2d71b8d8fa4746d68a03ee4ccf3c8c4620fefc6 100644 (file)
@@ -208,7 +208,7 @@ public:
     ICP2State(icp_common_t & aHeader, HttpRequest *aRequest):
         ICPState(aHeader, aRequest),rtt(0),src_rtt(0),flags(0) {}
 
-    ~ICP2State();
+    ~ICP2State() override;
 
     int rtt;
     int src_rtt;
index c8cd2f1373b4e9caf448e41113bfee8309abe07a..396be077aa54499bcafbaa6c95531cfab6a4c701 100644 (file)
@@ -27,7 +27,7 @@ public:
     ICP3State(icp_common_t &aHeader, HttpRequest *aRequest) :
         ICPState(aHeader, aRequest) {}
 
-    ~ICP3State() = default;
+    ~ICP3State() override = default;
 };
 
 /// \ingroup ServerProtocolICPInternal3
index 23b694a0c3d7298683f36b2a47ce3ef79c7590b5..edd6bf05c8fba8a9bbecaf443e9758d27d2c9938 100644 (file)
@@ -19,7 +19,7 @@ class IdentLookup : public ACLChecklist::AsyncState
 
 public:
     static IdentLookup *Instance();
-    virtual void checkForAsync(ACLChecklist *)const;
+    void checkForAsync(ACLChecklist *)const override;
 
 private:
     static IdentLookup instance_;
@@ -36,19 +36,19 @@ class ACLIdent : public ACL
 
 public:
     ACLIdent(ACLData<char const *> *newData, char const *);
-    ~ACLIdent();
+    ~ACLIdent() override;
 
     /* ACL API */
-    virtual char const *typeString() const;
-    virtual void parse();
-    virtual bool isProxyAuth() const {return true;}
-    virtual int match(ACLChecklist *checklist);
-    virtual SBufList dump() const;
-    virtual bool empty () const;
+    char const *typeString() const override;
+    void parse() override;
+    bool isProxyAuth() const override {return true;}
+    int match(ACLChecklist *checklist) override;
+    SBufList dump() const override;
+    bool empty () const override;
 
 private:
     /* ACL API */
-    virtual const Acl::Options &lineOptions();
+    const Acl::Options &lineOptions() override;
 
     ACLData<char const *> *data;
     char const *type_;
index 8ec2e1c798852fca4343f462f519b0a17589b2dd..8021e4c8aa962796d54c809a0da4940cb0cfcb23 100644 (file)
@@ -29,7 +29,7 @@ namespace Ipc
 ///  Coordinates shared activities of Strands (Squid processes or threads)
 class Coordinator: public Port
 {
-    CBDATA_CLASS(Coordinator);
+    CBDATA_CHILD(Coordinator);
 
 public:
     static Coordinator* Instance();
@@ -42,8 +42,8 @@ public:
     const StrandCoords &strands() const; ///< currently registered strands
 
 protected:
-    virtual void start(); // Port (AsyncJob) API
-    virtual void receive(const TypedMsgHdr& message); // Port API
+    void start() override; // Port (AsyncJob) API
+    void receive(const TypedMsgHdr& message) override; // Port API
 
     StrandCoord* findStrand(int kidId); ///< registered strand or NULL
     void registerStrand(const StrandCoord &); ///< adds or updates existing
index f6401052901df87ccbaad86afbc71775ec72e6cf..729cffa0508de0e32e466001e2dca4756499741b 100644 (file)
@@ -19,8 +19,6 @@
 #include "ipc/RequestId.h"
 #include "ipc/TypedMsgHdr.h"
 
-CBDATA_NAMESPACED_CLASS_INIT(Ipc, Forwarder);
-
 Ipc::Forwarder::RequestsMap Ipc::Forwarder::TheRequestsMap;
 Ipc::RequestId::Index Ipc::Forwarder::LastRequestId = 0;
 
index 9d1c087c654a4b348e0499dd28478391d66bef1d..04ad65c728705063a08a36202586d44cae9d18e7 100644 (file)
@@ -28,25 +28,25 @@ namespace Ipc
  */
 class Forwarder: public AsyncJob
 {
-    CBDATA_CLASS(Forwarder);
+    CBDATA_INTERMEDIATE();
 
 public:
     Forwarder(Request::Pointer aRequest, double aTimeout);
-    virtual ~Forwarder();
+    ~Forwarder() override;
 
     /// finds and calls the right Forwarder upon Coordinator's response
     static void HandleRemoteAck(RequestId);
 
     /* has-to-be-public AsyncJob API */
-    virtual void callException(const std::exception& e);
+    void callException(const std::exception& e) override;
 
     CodeContextPointer codeContext;
 
 protected:
     /* AsyncJob API */
-    virtual void start();
-    virtual void swanSong();
-    virtual bool doneAll() const;
+    void start() override;
+    void swanSong() override;
+    bool doneAll() const override;
 
     virtual void handleError();
     virtual void handleTimeout();
index 05d3b360a29edb71594b7ae4dc86073babc9a758..fa7d1a0a37d9142bc7c3294a3adc297f61adcc4f 100644 (file)
@@ -21,8 +21,6 @@
 #include <algorithm>
 #include <unordered_map>
 
-CBDATA_NAMESPACED_CLASS_INIT(Ipc, Inquirer);
-
 Ipc::RequestId::Index Ipc::Inquirer::LastRequestId = 0;
 
 namespace Ipc {
index 7bd5508368ec9e62c278209f1b114dfe96d85c64..6c7c8650c5085d841ed8c04813cd81f42858be97 100644 (file)
@@ -26,26 +26,26 @@ namespace Ipc
 /// aggregating individual strand responses and dumping the result if needed
 class Inquirer: public AsyncJob
 {
-    CBDATA_CLASS(Inquirer);
+    CBDATA_INTERMEDIATE();
 
 public:
     Inquirer(Request::Pointer aRequest, const Ipc::StrandCoords& coords, double aTimeout);
-    virtual ~Inquirer();
+    ~Inquirer() override;
 
     /// finds and calls the right Inquirer upon strand's response
     static void HandleRemoteAck(const Response& response);
 
     /* has-to-be-public AsyncJob API */
-    virtual void callException(const std::exception& e);
+    void callException(const std::exception& e) override;
 
     CodeContextPointer codeContext;
 
 protected:
     /* AsyncJob API */
-    virtual void start();
-    virtual void swanSong();
-    virtual bool doneAll() const;
-    virtual const char *status() const;
+    void start() override;
+    void swanSong() override;
+    bool doneAll() const override;
+    const char *status() const override;
 
     /// inquire the next strand
     virtual void inquire();
index 87c233ed30738182cba7fb3deb12c57a5bfcbf8e..48a78ca4dc73fcb5c73e5a3a39e2e00dbb40eaed 100644 (file)
@@ -29,8 +29,8 @@ public:
     static String CoordinatorAddr();
 
 protected:
-    virtual void start() = 0; // UdsOp (AsyncJob) API; has body
-    virtual bool doneAll() const; // UdsOp (AsyncJob) API
+    void start() override = 0; // UdsOp (AsyncJob) API; has body
+    bool doneAll() const override; // UdsOp (AsyncJob) API
 
     /// read the next incoming message
     void doListen();
index d7f0ebd4a0f1cd0e088f4e129ac5e5a97dfccfe4..7580d9f084bdab341dd70b7ce359f2f48f8f9dac 100644 (file)
@@ -284,12 +284,12 @@ public:
     template<class Value> bool findOldest(const int remoteProcessId, Value &value) const;
 
 protected:
-    virtual const OneToOneUniQueue &inQueue(const int remoteProcessId) const;
-    virtual const OneToOneUniQueue &outQueue(const int remoteProcessId) const;
-    virtual const QueueReader &localReader() const;
-    virtual const QueueReader &remoteReader(const int processId) const;
-    virtual int remotesCount() const;
-    virtual int remotesIdOffset() const;
+    const OneToOneUniQueue &inQueue(const int remoteProcessId) const override;
+    const OneToOneUniQueue &outQueue(const int remoteProcessId) const override;
+    const QueueReader &localReader() const override;
+    const QueueReader &remoteReader(const int processId) const override;
+    int remotesCount() const override;
+    int remotesIdOffset() const override;
 
 private:
     bool validProcessId(const Group group, const int processId) const;
@@ -348,12 +348,12 @@ public:
     MultiQueue(const String &id, const int localProcessId);
 
 protected:
-    virtual const OneToOneUniQueue &inQueue(const int remoteProcessId) const;
-    virtual const OneToOneUniQueue &outQueue(const int remoteProcessId) const;
-    virtual const QueueReader &localReader() const;
-    virtual const QueueReader &remoteReader(const int remoteProcessId) const;
-    virtual int remotesCount() const;
-    virtual int remotesIdOffset() const;
+    const OneToOneUniQueue &inQueue(const int remoteProcessId) const override;
+    const OneToOneUniQueue &outQueue(const int remoteProcessId) const override;
+    const QueueReader &localReader() const override;
+    const QueueReader &remoteReader(const int remoteProcessId) const override;
+    int remotesCount() const override;
+    int remotesIdOffset() const override;
 
 private:
     bool validProcessId(const int processId) const;
index 41413f15033840e55398f493a4194d1ef5121a5d..98db06d1f78e7d9a3c86a3182fcd592bc0176e1e 100644 (file)
@@ -26,16 +26,16 @@ class StrandCoord;
 /// Receives coordination messages on behalf of its process or thread
 class Strand: public Port
 {
-    CBDATA_CLASS(Strand);
+    CBDATA_CHILD(Strand);
 
 public:
     Strand();
 
-    virtual void start(); // Port (AsyncJob) API
+    void start() override; // Port (AsyncJob) API
 
 protected:
-    virtual void timedout(); // Port (UsdOp) API
-    virtual void receive(const TypedMsgHdr &message); // Port API
+    void timedout() override; // Port (UsdOp) API
+    void receive(const TypedMsgHdr &message) override; // Port API
 
 private:
     void registerSelf(); /// let Coordinator know this strand exists
index 9ace9bc6e4be26d674feec9a67c342a9bfef4570..2d000d259bc327e05cb90d46bb6b2a3fc473808c 100644 (file)
@@ -31,7 +31,7 @@ class UdsOp: public AsyncJob
 {
 public:
     UdsOp(const String &pathAddr);
-    virtual ~UdsOp();
+    ~UdsOp() override;
 
 public:
     struct sockaddr_un address; ///< UDS address from path; treat as read-only
@@ -67,7 +67,7 @@ struct sockaddr_un PathToAddress(const String &pathAddr);
 /// attempts to send an IPC message a few times, with a timeout
 class UdsSender: public UdsOp
 {
-    CBDATA_CLASS(UdsSender);
+    CBDATA_CHILD(UdsSender);
 
 public:
     UdsSender(const String& pathAddr, const TypedMsgHdr& aMessage);
@@ -75,10 +75,10 @@ public:
     CodeContextPointer codeContext;
 
 protected:
-    virtual void swanSong(); // UdsOp (AsyncJob) API
-    virtual void start(); // UdsOp (AsyncJob) API
-    virtual bool doneAll() const; // UdsOp (AsyncJob) API
-    virtual void timedout(); // UdsOp API
+    void swanSong() override; // UdsOp (AsyncJob) API
+    void start() override; // UdsOp (AsyncJob) API
+    bool doneAll() const override; // UdsOp (AsyncJob) API
+    void timedout() override; // UdsOp API
 
 private:
     void startSleep();
index 48d729e0ff61daa90f38f5643bfe102885bf686d..602696ee62bf9aad70d24cfb4fc1eda3756de467 100644 (file)
@@ -94,10 +94,10 @@ class SharedMemPagesRr: public Ipc::Mem::RegisteredRunner
 public:
     /* RegisteredRunner API */
     SharedMemPagesRr(): owner(nullptr) {}
-    virtual void useConfig();
-    virtual void create();
-    virtual void open();
-    virtual ~SharedMemPagesRr();
+    void useConfig() override;
+    void create() override;
+    void open() override;
+    ~SharedMemPagesRr() override;
 
 private:
     Ipc::Mem::PagePool::Owner *owner;
index 3befd7c93996d06bc255ac860e72323cd541303a..f4de6c923a56d79806f561a99ddf51be8bfb48c9 100644 (file)
@@ -85,7 +85,7 @@ class RegisteredRunner: public ::RegisteredRunner
 {
 public:
     /* RegisteredRunner API */
-    virtual void useConfig();
+    void useConfig() override;
 
 protected:
     /// called when the runner should create a new memory segment
index fe73c58ef00d61edccd20c83b59de841df35bad6..b581891776995834f5c7347aecd172ff6cba944a 100644 (file)
@@ -194,7 +194,7 @@ private:
 class IpReceiver: public virtual CbdataParent
 {
 public:
-    virtual ~IpReceiver() {}
+    ~IpReceiver() override {}
 
     /// Called when nbgethostbyname() fully resolves the name.
     /// The `ips` may contain both bad and good IP addresses, but each good IP
index ec7ca5f7b19908583ed9f31e3308e90a2ada5fcb..7df995f1735b7134d63270e986b62d373b450fd6 100644 (file)
@@ -28,7 +28,7 @@ namespace Log
  */
 class TcpLogger : public AsyncJob
 {
-    CBDATA_CLASS(TcpLogger);
+    CBDATA_CHILD(TcpLogger);
 
 public:
     typedef CbcPointer<TcpLogger> Pointer;
@@ -38,7 +38,7 @@ public:
 
 protected:
     TcpLogger(size_t, bool, Ip::Address);
-    virtual ~TcpLogger();
+    ~TcpLogger() override;
 
     /// Called when Squid is reconfiguring (or exiting) to give us a chance to
     /// flush remaining buffers and end this job w/o loss of data. No new log
@@ -53,9 +53,9 @@ protected:
     void flush();
 
     /* AsyncJob API */
-    virtual void start();
-    virtual bool doneAll() const;
-    virtual void swanSong();
+    void start() override;
+    bool doneAll() const override;
+    void swanSong() override;
 
 private:
     /* Logfile API. Map c-style Logfile calls to TcpLogger method calls. */
index b912c11ef051d88df58e00ccb9a7370ad2536163..cfe012b4fb2fd57eb10dc1d53e50d17f92dbb0b5 100644 (file)
@@ -187,7 +187,7 @@ class StoreRootEngine : public AsyncEngine
 {
 
 public:
-    int checkEvents(int) {
+    int checkEvents(int) override {
         Store::Root().callback();
         return EVENT_IDLE;
     };
@@ -197,7 +197,7 @@ class SignalEngine: public AsyncEngine
 {
 
 public:
-    virtual int checkEvents(int timeout);
+    int checkEvents(int timeout) override;
 
 private:
     static void StopEventLoop(void *) {
index 69c1666867b5e24c4ae23e4d50485d13ba05635d..dcde77515f7dd2385fd9ca40db647397c637c681 100644 (file)
@@ -143,11 +143,11 @@ public:
     virtual void clean(time_t maxage) = 0;
 
     /* Mem::Allocator API */
-    virtual PoolMeter const &getMeter() const;
-    virtual void *alloc();
-    virtual void freeOne(void *);
-    virtual size_t objectSize() const;
-    virtual int getInUseCount() = 0;
+    PoolMeter const &getMeter() const override;
+    void *alloc() override;
+    void freeOne(void *) override;
+    size_t objectSize() const override;
+    int getInUseCount() override = 0;
 
 protected:
     virtual void *allocate() = 0;
index 18d4f50cb5e609f66888783b1e93337d91134f44..78f1082ff0cb9949cd8eadc94e4bd6e9493f1733 100644 (file)
@@ -23,23 +23,23 @@ class MemPoolChunked : public MemImplementingAllocator
 public:
     friend class MemChunk;
     MemPoolChunked(const char *label, size_t obj_size);
-    ~MemPoolChunked();
+    ~MemPoolChunked() override;
     void convertFreeCacheToChunkFreeCache();
-    virtual void clean(time_t maxage);
+    void clean(time_t maxage) override;
     void createChunk();
     void *get();
     void push(void *obj);
 
     /* Mem::Allocator API */
-    virtual size_t getStats(Mem::PoolStats &);
-    virtual int getInUseCount();
-    virtual void setChunkSize(size_t);
+    size_t getStats(Mem::PoolStats &) override;
+    int getInUseCount() override;
+    void setChunkSize(size_t) override;
 
 protected:
-    virtual void *allocate();
-    virtual void deallocate(void *, bool aggressive);
+    void *allocate() override;
+    void deallocate(void *, bool aggressive) override;
 public:
-    virtual bool idleTrigger(int shift) const;
+    bool idleTrigger(int shift) const override;
 
     size_t chunk_size;
     int chunk_capacity;
index 84083446404517e2348579f96505092534357059..b85c5326ff1eb62dcccaf2ccb27f28e24d7cc11e 100644 (file)
@@ -37,17 +37,17 @@ class MemPoolMalloc : public MemImplementingAllocator
 {
 public:
     MemPoolMalloc(char const *label, size_t aSize);
-    ~MemPoolMalloc();
-    virtual bool idleTrigger(int shift) const;
-    virtual void clean(time_t maxage);
+    ~MemPoolMalloc() override;
+    bool idleTrigger(int shift) const override;
+    void clean(time_t maxage) override;
 
     /* Mem::Allocator API */
-    virtual size_t getStats(Mem::PoolStats &);
-    virtual int getInUseCount();
+    size_t getStats(Mem::PoolStats &) override;
+    int getInUseCount() override;
 
 protected:
-    virtual void *allocate();
-    virtual void deallocate(void *, bool aggressive);
+    void *allocate() override;
+    void deallocate(void *, bool aggressive) override;
 private:
     std::stack<void *> freelist;
 };
index f66ddf42ec75225124122ac7cf94b0e661d988fe..6ef7af7942bfa2ff98d1a008756866072c1d3039 100644 (file)
@@ -28,7 +28,7 @@ public:
 
 public:
     Action(const CommandPointer &aCmd);
-    virtual ~Action();
+    ~Action() override;
 
     /* for local Cache Manager use */
 
index dbcfbca01f72cda527f7c9a434bc1c031de8abb0..c5e8eb82eb50c4bbfa5bf99c2a27594919b407ab 100644 (file)
@@ -25,7 +25,7 @@ class ActionCreator: public RefCountable
 public:
     typedef RefCount<ActionCreator> Pointer;
 
-    virtual ~ActionCreator() {}
+    ~ActionCreator() override {}
 
     /// returns a pointer to the new Action object for cmd; never nil
     virtual ActionPointer create(const CommandPointer &cmd) const = 0;
index 56dc58e8b36a1e3d9337bf4e104ad1dc5544ec74..48f140bbf23c95c8459ebdec23b06a5d0cdf07e3 100644 (file)
@@ -21,14 +21,14 @@ namespace Mgr
 /// Comm-writes it using parent StoreToCommWriter.
 class ActionWriter: public StoreToCommWriter
 {
-    CBDATA_CLASS(ActionWriter);
+    CBDATA_CHILD(ActionWriter);
 
 public:
     ActionWriter(const Action::Pointer &anAction, const Comm::ConnectionPointer &conn);
 
 protected:
     /* AsyncJob API */
-    virtual void start();
+    void start() override;
 
 private:
     Action::Pointer action; ///< action that fills the entry
index a9b45f4ee631247dbef30b15fdf8261f91516fbd..6b3cc810bf2a5b09afe4721e33896ede5b21188c 100644 (file)
@@ -27,7 +27,7 @@ class IndexAction: public Action
 public:
     static Pointer Create(const CommandPointer &cmd);
     /* Action API */
-    virtual void dump(StoreEntry *entry);
+    void dump(StoreEntry *entry) override;
 
 protected:
     IndexAction(const CommandPointer &cmd);
@@ -39,7 +39,7 @@ class MenuAction: public Action
 public:
     static Pointer Create(const CommandPointer &cmd);
     /* Action API */
-    virtual void dump(StoreEntry *entry);
+    void dump(StoreEntry *entry) override;
 
 protected:
     MenuAction(const CommandPointer &cmd);
@@ -51,7 +51,7 @@ class ShutdownAction: public Action
 public:
     static Pointer Create(const CommandPointer &cmd);
     /* Action API */
-    virtual void dump(StoreEntry *entry);
+    void dump(StoreEntry *entry) override;
 
 protected:
     ShutdownAction(const CommandPointer &cmd);
@@ -63,7 +63,7 @@ class ReconfigureAction: public Action
 public:
     static Pointer Create(const CommandPointer &cmd);
     /* Action API */
-    virtual void dump(StoreEntry *entry);
+    void dump(StoreEntry *entry) override;
 
 protected:
     ReconfigureAction(const CommandPointer &cmd);
@@ -75,7 +75,7 @@ class RotateAction: public Action
 public:
     static Pointer Create(const CommandPointer &cmd);
     /* Action API */
-    virtual void dump(StoreEntry *entry);
+    void dump(StoreEntry *entry) override;
 
 protected:
     RotateAction(const CommandPointer &cmd);
@@ -87,7 +87,7 @@ class OfflineToggleAction: public Action
 public:
     static Pointer Create(const CommandPointer &cmd);
     /* Action API */
-    virtual void dump(StoreEntry *entry);
+    void dump(StoreEntry *entry) override;
 
 protected:
     OfflineToggleAction(const CommandPointer &cmd);
index f7142623699508236b847286e2537af7ee73b6a7..66e04a0c91485542f545eadc5cee91932f8262b8 100644 (file)
@@ -96,14 +96,14 @@ protected:
 public:
     static Pointer Create(const CommandPointer &cmd);
     /* Action API */
-    virtual void add(const Action& action);
-    virtual void pack(Ipc::TypedMsgHdr& msg) const;
-    virtual void unpack(const Ipc::TypedMsgHdr& msg);
+    void add(const Action& action) override;
+    void pack(Ipc::TypedMsgHdr& msg) const override;
+    void unpack(const Ipc::TypedMsgHdr& msg) override;
 
 protected:
     /* Action API */
-    virtual void collect();
-    virtual void dump(StoreEntry* entry);
+    void collect() override;
+    void dump(StoreEntry* entry) override;
 
 private:
     CountersActionData data;
index d40c6f24e3bae1d3985393ec66a15ff99190b0aa..6bbadeab56fb127d2ef7a13b65476f7f52ac7599 100644 (file)
@@ -22,15 +22,15 @@ namespace Mgr
 /// provides Coordinator with a local cache manager response
 class Filler: public StoreToCommWriter
 {
-    CBDATA_CLASS(Filler);
+    CBDATA_CHILD(Filler);
 
 public:
     Filler(const Action::Pointer &, const Comm::ConnectionPointer &, Ipc::RequestId);
 
 protected:
     /* AsyncJob API */
-    virtual void start();
-    virtual void swanSong();
+    void start() override;
+    void swanSong() override;
 
 private:
     Action::Pointer action; ///< action that will run() and sendResponse()
index 9fceafb62293fc3148efa0f9992fb1215c44da32..81d68f4fa68fb20d7e4979cce1fe7f85bed1d8b8 100644 (file)
@@ -30,19 +30,19 @@ namespace Mgr
  */
 class Forwarder: public Ipc::Forwarder
 {
-    CBDATA_CLASS(Forwarder);
+    CBDATA_CHILD(Forwarder);
 
 public:
     Forwarder(const Comm::ConnectionPointer &aConn, const ActionParams &aParams, HttpRequest* aRequest,
               StoreEntry* anEntry, const AccessLogEntryPointer &anAle);
-    virtual ~Forwarder();
+    ~Forwarder() override;
 
 protected:
     /* Ipc::Forwarder API */
-    virtual void swanSong();
-    virtual void handleError();
-    virtual void handleTimeout();
-    virtual void handleException(const std::exception& e);
+    void swanSong() override;
+    void handleError() override;
+    void handleTimeout() override;
+    void handleException(const std::exception& e) override;
 
 private:
     void noteCommClosed(const CommCloseCbParams& params);
index d2ea07edd02ba35bb854e4ec4ae7831958678e61..ece164f926779db588cd3720ecf6170a69df9ec7 100644 (file)
@@ -28,13 +28,13 @@ public:
     static Pointer Create(const CommandPointer &cmd, OBJH *aHandler);
 
     /* Action API */
-    virtual void respond(const Request& request);
+    void respond(const Request& request) override;
     // we cannot aggregate because we do not even know what the handler does
-    virtual bool aggregatable() const { return false; }
+    bool aggregatable() const override { return false; }
 
 protected:
     /* Action API */
-    virtual void dump(StoreEntry *entry);
+    void dump(StoreEntry *entry) override;
 
 private:
     OBJH *handler; ///< legacy function that collects and dumps info
@@ -47,7 +47,7 @@ public:
     explicit FunActionCreator(OBJH *aHandler): handler(aHandler) {}
 
     /* ActionCreator API */
-    virtual Action::Pointer create(const CommandPointer &cmd) const {
+    Action::Pointer create(const CommandPointer &cmd) const override {
         return FunAction::Create(cmd, handler);
     }
 
index a1fb42fd05aeeb1044cc0ee697f6659dc0244806..38b200bf948d91506a4740abe0a37ecde2badad2 100644 (file)
@@ -99,15 +99,15 @@ protected:
 public:
     static Pointer Create(const CommandPointer &cmd);
     /* Action API */
-    virtual void add(const Action& action);
-    virtual void respond(const Request& request);
-    virtual void pack(Ipc::TypedMsgHdr& msg) const;
-    virtual void unpack(const Ipc::TypedMsgHdr& msg);
+    void add(const Action& action) override;
+    void respond(const Request& request) override;
+    void pack(Ipc::TypedMsgHdr& msg) const override;
+    void unpack(const Ipc::TypedMsgHdr& msg) override;
 
 protected:
     /* Action API */
-    virtual void collect();
-    virtual void dump(StoreEntry* entry);
+    void collect() override;
+    void dump(StoreEntry* entry) override;
 
 private:
     InfoActionData data;
index e98fbeb4e2e41ab9380e9810814cf4c8cfe771aa..4e9445ab9f6b7aa6a7ecd571906d28ec8bf77da8 100644 (file)
@@ -25,7 +25,7 @@ namespace Mgr
 /// aggregating individual strand responses and dumping the result if needed
 class Inquirer: public Ipc::Inquirer
 {
-    CBDATA_CLASS(Inquirer);
+    CBDATA_CHILD(Inquirer);
 
 public:
     Inquirer(Action::Pointer anAction, const Request &aCause,
@@ -33,13 +33,13 @@ public:
 
 protected:
     /* AsyncJob API */
-    virtual void start();
-    virtual bool doneAll() const;
+    void start() override;
+    bool doneAll() const override;
 
     /* Ipc::Inquirer API */
-    virtual void cleanup();
-    virtual void sendResponse();
-    virtual bool aggregate(Ipc::Response::Pointer aResponse);
+    void cleanup() override;
+    void sendResponse() override;
+    bool aggregate(Ipc::Response::Pointer aResponse) override;
 
 private:
     void noteWroteHeader(const CommIoCbParams& params);
index 5d6d30e654462ee91cb843b636140054d7440243..4461dae1eeda6ee68b112bedf7637bd0024c7adb 100644 (file)
@@ -24,8 +24,8 @@ class IntParam: public QueryParam
 public:
     IntParam();
     IntParam(const std::vector<int>& anArray);
-    virtual void pack(Ipc::TypedMsgHdr& msg) const;
-    virtual void unpackValue(const Ipc::TypedMsgHdr& msg);
+    void pack(Ipc::TypedMsgHdr& msg) const override;
+    void unpackValue(const Ipc::TypedMsgHdr& msg) override;
     const std::vector<int>& value() const;
 
 private:
index d6c49008a25d728f8317964fabecfcc621c95877..3c6799de6af3fb6f5b03acda18091394c47c4a54 100644 (file)
@@ -116,14 +116,14 @@ public:
     static Pointer Create5min(const CommandPointer &cmd);
     static Pointer Create60min(const CommandPointer &cmd);
     /* Action API */
-    virtual void add(const Action& action);
-    virtual void pack(Ipc::TypedMsgHdr& msg) const;
-    virtual void unpack(const Ipc::TypedMsgHdr& msg);
+    void add(const Action& action) override;
+    void pack(Ipc::TypedMsgHdr& msg) const override;
+    void unpack(const Ipc::TypedMsgHdr& msg) override;
 
 protected:
     /* Action API */
-    virtual void collect();
-    virtual void dump(StoreEntry* entry);
+    void collect() override;
+    void dump(StoreEntry* entry) override;
 
 private:
     int minutes;
index dc4a3a5ebcf8cf002b02fec470ac0b9424637136..ce1108b71556766efba75813d926fbbfb733e46e 100644 (file)
@@ -40,14 +40,14 @@ protected:
 public:
     static Pointer Create(const CommandPointer &cmd);
     /* Action API */
-    virtual void add(const Action& action);
-    virtual void pack(Ipc::TypedMsgHdr& msg) const;
-    virtual void unpack(const Ipc::TypedMsgHdr& msg);
+    void add(const Action& action) override;
+    void pack(Ipc::TypedMsgHdr& msg) const override;
+    void unpack(const Ipc::TypedMsgHdr& msg) override;
 
 protected:
     /* Action API */
-    virtual void collect();
-    virtual void dump(StoreEntry* entry);
+    void collect() override;
+    void dump(StoreEntry* entry) override;
 
 private:
     IoActionData data;
index e00396ddd99d5c9486ff191f3650e179c3fdb1d3..659af5384724f9488234015ef672406a82ecf5f9 100644 (file)
@@ -25,7 +25,7 @@ public:
 
 public:
     QueryParam(Type aType): type(aType) {}
-    virtual ~QueryParam() {}
+    ~QueryParam() override {}
     virtual void pack(Ipc::TypedMsgHdr& msg) const = 0; ///< store parameter into msg
     virtual void unpackValue(const Ipc::TypedMsgHdr& msg) = 0; ///< load parameter value from msg
 
index 59b2dd7954ef2dc69e7a72422a1129dca6c35dbb..6f4430773d7205257f1ceb632ed65e133052e2a6 100644 (file)
@@ -27,8 +27,8 @@ public:
 
     explicit Request(const Ipc::TypedMsgHdr& msg); ///< from recvmsg()
     /* Ipc::Request API */
-    virtual void pack(Ipc::TypedMsgHdr& msg) const;
-    virtual Pointer clone() const;
+    void pack(Ipc::TypedMsgHdr& msg) const override;
+    Pointer clone() const override;
 
 public:
     Comm::ConnectionPointer conn; ///< HTTP client connection descriptor
index 38461f8b322a9f859c7a564c1b052506bf9d6478..72d543dca5444c625af135092c25c33c33e001d2 100644 (file)
@@ -29,8 +29,8 @@ public:
     explicit Response(const Ipc::TypedMsgHdr& msg); ///< from recvmsg()
 
     /* Ipc::Response API */
-    virtual void pack(Ipc::TypedMsgHdr& msg) const;
-    virtual Ipc::Response::Pointer clone() const;
+    void pack(Ipc::TypedMsgHdr& msg) const override;
+    Ipc::Response::Pointer clone() const override;
 
     bool hasAction() const; ///< whether response contain action object
     const Action& getAction() const; ///< returns action object
index 75e82c32d470a8d2590286427b15c62c162568c4..d4d303adaadcc8f3828490a0cfc3b309dcc7bac8 100644 (file)
@@ -53,14 +53,14 @@ protected:
 public:
     static Pointer Create(const CommandPointer &cmd);
     /* Action API */
-    virtual void add(const Action& action);
-    virtual void pack(Ipc::TypedMsgHdr& msg) const;
-    virtual void unpack(const Ipc::TypedMsgHdr& msg);
+    void add(const Action& action) override;
+    void pack(Ipc::TypedMsgHdr& msg) const override;
+    void unpack(const Ipc::TypedMsgHdr& msg) override;
 
 protected:
     /* Action API */
-    virtual void collect();
-    virtual void dump(StoreEntry* entry);
+    void collect() override;
+    void dump(StoreEntry* entry) override;
 
 private:
     ServiceTimesActionData data;
index 8087bcc6ec0a1ddcf93e2f74704c54ac0278d176..f43a8b3cabc9c50d887a63f35ba48cca15e4e31e 100644 (file)
@@ -39,14 +39,14 @@ protected:
 public:
     static Pointer Create(const CommandPointer &cmd);
     /* Action API */
-    virtual void add(const Action& action);
-    virtual void pack(Ipc::TypedMsgHdr& msg) const;
-    virtual void unpack(const Ipc::TypedMsgHdr& msg);
+    void add(const Action& action) override;
+    void pack(Ipc::TypedMsgHdr& msg) const override;
+    void unpack(const Ipc::TypedMsgHdr& msg) override;
 
 protected:
     /* Action API */
-    virtual void collect();
-    virtual void dump(StoreEntry* entry);
+    void collect() override;
+    void dump(StoreEntry* entry) override;
 
 private:
     StoreIoActionData data;
index 83e7e561bbdee23888b65b02c122b745f5d39bfd..1d1091d2a24964151f43fac4b80dcf1129147482 100644 (file)
@@ -20,8 +20,6 @@
 #include "Store.h"
 #include "StoreClient.h"
 
-CBDATA_NAMESPACED_CLASS_INIT(Mgr, StoreToCommWriter);
-
 Mgr::StoreToCommWriter::StoreToCommWriter(const Comm::ConnectionPointer &conn, StoreEntry* anEntry):
     AsyncJob("Mgr::StoreToCommWriter"),
     clientConnection(conn), entry(anEntry), sc(nullptr), writeOffset(0), closer(nullptr)
index 8fd9b5d94aed8e1a32df15f5ea8951ed1bda6305..b69dc30fb24cf971903f31b3cf509f3ab345726a 100644 (file)
@@ -28,17 +28,17 @@ namespace Mgr
 /// for the given StoreEntry and client FD
 class StoreToCommWriter: public AsyncJob
 {
-    CBDATA_CLASS(StoreToCommWriter);
+    CBDATA_INTERMEDIATE();
 
 public:
     StoreToCommWriter(const Comm::ConnectionPointer &conn, StoreEntry *anEntry);
-    virtual ~StoreToCommWriter();
+    ~StoreToCommWriter() override;
 
 protected:
     /* AsyncJob API */
-    virtual void start();
-    virtual void swanSong();
-    virtual bool doneAll() const;
+    void start() override;
+    void swanSong() override;
+    bool doneAll() const override;
 
     /// request more action results from the store
     void scheduleStoreCopy();
index e69d4bb12c6c9c8154955aa3f963a3042e3a5583..43075d19e1c1f1b80f687e0bf2976dbd0d370e27 100644 (file)
@@ -24,8 +24,8 @@ class StringParam: public QueryParam
 public:
     StringParam();
     StringParam(const String& aString);
-    virtual void pack(Ipc::TypedMsgHdr& msg) const;
-    virtual void unpackValue(const Ipc::TypedMsgHdr& msg);
+    void pack(Ipc::TypedMsgHdr& msg) const override;
+    void unpackValue(const Ipc::TypedMsgHdr& msg) override;
     const String& value() const;
 
 private:
index 3c3829b64661caeb782bd94d0fdba2ec1f022333..95f9ba16d2577bb2a97c56a4d974dc4225da0d53 100644 (file)
@@ -44,14 +44,14 @@ class MimeIcon : public StoreClient
 
 public:
     explicit MimeIcon(const char *aName);
-    ~MimeIcon();
+    ~MimeIcon() override;
     void setName(char const *);
     SBuf getName() const;
     void load();
 
     /* StoreClient API */
-    virtual LogTags *loggingTags() const { return nullptr; } // no access logging/ACLs
-    virtual void fillChecklist(ACLFilledChecklist &) const;
+    LogTags *loggingTags() const override { return nullptr; } // no access logging/ACLs
+    void fillChecklist(ACLFilledChecklist &) const override;
 
 private:
     SBuf icon_;
index 85e44e50bf97a0d934e1b47f769925fb8cb3e771..497e3050e492fe10ec42a297a3255749fceb5ec3 100644 (file)
@@ -40,7 +40,7 @@ class IdleConnList: public hash_link, private IndependentRunner
 
 public:
     IdleConnList(const char *key, PconnPool *parent);
-    ~IdleConnList();
+    ~IdleConnList() override;
 
     /// Pass control of the connection to the idle list.
     void push(const Comm::ConnectionPointer &conn);
@@ -62,7 +62,7 @@ public:
     void closeN(size_t count);
 
     // IndependentRunner API
-    virtual void endingShutdown();
+    void endingShutdown() override;
 private:
     bool isAvailable(int i) const;
     bool removeAt(int index);
index 8a40392c75f93842abdb89517e69a8194de44d33..11e4851d47b8e1258794356ec2aa84f4d4d3b44b 100644 (file)
@@ -59,7 +59,7 @@ public:
     /// create a MemBlob containing a copy of the buffer of a given size
     MemBlob(const char *buffer, const size_type bufferSize);
 
-    virtual ~MemBlob();
+    ~MemBlob() override;
 
     /// the number unused bytes at the end of the allocated blob
     size_type spaceSize() const { return capacity - size; }
index bea7fe6d571f0de97f40ed5f2ff4a2ae6afdfda7..82562b023ef44885f93800b47129a9e460ee6a17 100644 (file)
@@ -18,7 +18,7 @@ namespace Security
 
 /// A simple PeerConnector for SSL/TLS cache_peers. No SslBump capabilities.
 class BlindPeerConnector: public Security::PeerConnector {
-    CBDATA_CLASS(BlindPeerConnector);
+    CBDATA_CHILD(BlindPeerConnector);
 public:
     BlindPeerConnector(HttpRequestPointer &aRequest,
                        const Comm::ConnectionPointer &aServerConn,
@@ -37,14 +37,14 @@ public:
     /// to try and reuse a TLS session and sets the hostname to use for
     /// certificate validation
     /// \returns true on successful initialization
-    virtual bool initialize(Security::SessionPointer &);
+    bool initialize(Security::SessionPointer &) override;
 
     /// Return the configured TLS context object
-    virtual Security::ContextPointer getTlsContext();
+    Security::ContextPointer getTlsContext() override;
 
     /// On success, stores the used TLS session for later use.
     /// On error, informs the peer.
-    virtual void noteNegotiationDone(ErrorState *);
+    void noteNegotiationDone(ErrorState *) override;
 };
 
 } // namespace Security
index 6610711a04d8ac4ae7ee202318ccf862791fc95f..0b37d14e4a6a8617fefcdba1d9d56b7a2a2c08f3 100644 (file)
@@ -56,8 +56,8 @@ public:
 #endif
 
     /* ErrorDetail API */
-    virtual SBuf brief() const;
-    virtual SBuf verbose(const HttpRequestPointer &) const;
+    SBuf brief() const override;
+    SBuf verbose(const HttpRequestPointer &) const override;
 
     /// \returns error category; \see ErrorCode
     ErrorCode errorNo() const { return error_no; }
index 3087cb8183c90d8a796cd1b789ef4ee8179727a6..d6d110aa08b4946093025a6b0afb5ed9e37a1f30 100644 (file)
@@ -35,8 +35,6 @@
 #include "ssl/helper.h"
 #endif
 
-CBDATA_NAMESPACED_CLASS_INIT(Security, PeerConnector);
-
 Security::PeerConnector::PeerConnector(const Comm::ConnectionPointer &aServerConn, const AsyncCallback<EncryptorAnswer> &aCallback, const AccessLogEntryPointer &alp, const time_t timeout):
     AsyncJob("Security::PeerConnector"),
     noteFwdPconnUse(false),
index 3703e28ecf400733a463ea026be86f9f1f46db1b..ee6291f6e2e22bbf8b7ab9132e980afd2c0b0e4a 100644 (file)
@@ -47,7 +47,7 @@ typedef RefCount<IoResult> IoResultPointer;
  */
 class PeerConnector: virtual public AsyncJob, public Acl::ChecklistFiller
 {
-    CBDATA_CLASS(PeerConnector);
+    CBDATA_INTERMEDIATE();
 
 public:
     typedef CbcPointer<PeerConnector> Pointer;
@@ -56,20 +56,20 @@ public:
                   const AsyncCallback<EncryptorAnswer> &,
                   const AccessLogEntryPointer &alp,
                   const time_t timeout = 0);
-    virtual ~PeerConnector();
+    ~PeerConnector() override;
 
     /// hack: whether the connection requires fwdPconnPool->noteUses()
     bool noteFwdPconnUse;
 
 protected:
     // AsyncJob API
-    virtual void start();
-    virtual bool doneAll() const;
-    virtual void swanSong();
-    virtual const char *status() const;
+    void start() override;
+    bool doneAll() const override;
+    void swanSong() override;
+    const char *status() const override;
 
     /* Acl::ChecklistFiller API */
-    virtual void fillChecklist(ACLFilledChecklist &) const;
+    void fillChecklist(ACLFilledChecklist &) const override;
 
     /// The connection read timeout callback handler.
     void commTimeoutHandler(const CommTimeoutCbParams &);
index b7abd4e60e1e14f51b501c5d88bc00bbf28e99b4..d51323acd59331fd16e2912e62920d92b954bdfe 100644 (file)
@@ -39,13 +39,13 @@ public:
     ServerOptions &operator =(const ServerOptions &);
     ServerOptions(ServerOptions &&o) { this->operator =(o); }
     ServerOptions &operator =(ServerOptions &&o) { this->operator =(o); return *this; }
-    virtual ~ServerOptions() = default;
+    ~ServerOptions() override = default;
 
     /* Security::PeerOptions API */
-    virtual void parse(const char *);
-    virtual void clear() {*this = ServerOptions();}
-    virtual Security::ContextPointer createBlankContext() const;
-    virtual void dumpCfg(Packable *, const char *pfx) const;
+    void parse(const char *) override;
+    void clear() override {*this = ServerOptions();}
+    Security::ContextPointer createBlankContext() const override;
+    void dumpCfg(Packable *, const char *pfx) const override;
 
     /// initialize all server contexts as-needed and load PEM files.
     /// if none can be created this may do nothing.
index 863c6b0e89fe114f50d6eff2e7be05c0003341c6..fd9a5e322d5394bb02ebc4a04c93eb007a89d2ad 100644 (file)
@@ -413,11 +413,11 @@ class SharedSessionCacheRr: public Ipc::Mem::RegisteredRunner
 public:
     /* RegisteredRunner API */
     SharedSessionCacheRr(): owner(nullptr) {}
-    virtual void useConfig();
-    virtual ~SharedSessionCacheRr();
+    void useConfig() override;
+    ~SharedSessionCacheRr() override;
 
 protected:
-    virtual void create();
+    void create() override;
 
 private:
     Ipc::MemMap::Owner *owner;
index 08d6b9c1f8453f12f24aa599c224c52474a9525e..4395258864bbfbbbf630053e4600072c60e40316 100644 (file)
@@ -60,10 +60,10 @@ class Server: public ConnStateData
 
 public:
     explicit Server(const MasterXaction::Pointer &xact);
-    virtual ~Server() override;
+    ~Server() override;
 
     /* AsyncJob API */
-    virtual void callException(const std::exception &e) override;
+    void callException(const std::exception &e) override;
 
     /// Called by Ftp::Client class when it is start receiving or
     /// sending data.
@@ -93,21 +93,21 @@ protected:
     };
 
     /* ConnStateData API */
-    virtual Http::Stream *parseOneRequest() override;
-    virtual void processParsedRequest(Http::StreamPointer &context) override;
-    virtual void notePeerConnection(Comm::ConnectionPointer conn) override;
-    virtual void clientPinnedConnectionClosed(const CommCloseCbParams &io) override;
-    virtual void handleReply(HttpReply *header, StoreIOBuffer receivedData) override;
-    virtual int pipelinePrefetchMax() const override;
-    virtual bool writeControlMsgAndCall(HttpReply *rep, AsyncCall::Pointer &call) override;
-    virtual time_t idleTimeout() const override;
+    Http::Stream *parseOneRequest() override;
+    void processParsedRequest(Http::StreamPointer &context) override;
+    void notePeerConnection(Comm::ConnectionPointer conn) override;
+    void clientPinnedConnectionClosed(const CommCloseCbParams &io) override;
+    void handleReply(HttpReply *header, StoreIOBuffer receivedData) override;
+    int pipelinePrefetchMax() const override;
+    bool writeControlMsgAndCall(HttpReply *rep, AsyncCall::Pointer &call) override;
+    time_t idleTimeout() const override;
 
     /* BodyPipe API */
-    virtual void noteMoreBodySpaceAvailable(BodyPipe::Pointer) override;
-    virtual void noteBodyConsumerAborted(BodyPipe::Pointer ptr) override;
+    void noteMoreBodySpaceAvailable(BodyPipe::Pointer) override;
+    void noteBodyConsumerAborted(BodyPipe::Pointer ptr) override;
 
     /* AsyncJob API */
-    virtual void start() override;
+    void start() override;
 
     /* Comm callbacks */
     static void AcceptCtrlConnection(const CommAcceptCbParams &params);
index 303070794da5198e0ca687b28eca220e1ffe09e2..553627bb73966c1994831597c5c8643843600d57 100644 (file)
@@ -19,30 +19,30 @@ namespace One
 /// Manages a connection from an HTTP/1 or HTTP/0.9 client.
 class Server: public ConnStateData
 {
-    CBDATA_CLASS(Server);
+    CBDATA_CHILD(Server);
 
 public:
     Server(const MasterXaction::Pointer &xact, const bool beHttpsServer);
-    virtual ~Server() {}
+    ~Server() override {}
 
     void readSomeHttpData();
 
 protected:
     /* ConnStateData API */
-    virtual Http::Stream *parseOneRequest();
-    virtual void processParsedRequest(Http::StreamPointer &context);
-    virtual void handleReply(HttpReply *rep, StoreIOBuffer receivedData);
-    virtual bool writeControlMsgAndCall(HttpReply *rep, AsyncCall::Pointer &call);
-    virtual int pipelinePrefetchMax() const;
-    virtual time_t idleTimeout() const;
-    virtual void noteTakeServerConnectionControl(ServerConnectionContext);
+    Http::Stream *parseOneRequest() override;
+    void processParsedRequest(Http::StreamPointer &context) override;
+    void handleReply(HttpReply *rep, StoreIOBuffer receivedData) override;
+    bool writeControlMsgAndCall(HttpReply *rep, AsyncCall::Pointer &call) override;
+    int pipelinePrefetchMax() const override;
+    time_t idleTimeout() const override;
+    void noteTakeServerConnectionControl(ServerConnectionContext) override;
 
     /* BodyPipe API */
-    virtual void noteMoreBodySpaceAvailable(BodyPipe::Pointer);
-    virtual void noteBodyConsumerAborted(BodyPipe::Pointer);
+    void noteMoreBodySpaceAvailable(BodyPipe::Pointer) override;
+    void noteBodyConsumerAborted(BodyPipe::Pointer) override;
 
     /* AsyncJob API */
-    virtual void start();
+    void start() override;
 
     void proceedAfterBodyContinuation(Http::StreamPointer context);
 
index ae0ec2541d7b85d8bfc061fe053900b1c58e197a..db5f521f43fb22a3a9102b1cb06e235a74c39032 100644 (file)
@@ -30,12 +30,12 @@ class Server : virtual public AsyncJob, public BodyProducer
 {
 public:
     Server(const MasterXactionPointer &xact);
-    virtual ~Server() {}
+    ~Server() override {}
 
     /* AsyncJob API */
-    virtual void start();
-    virtual bool doneAll() const;
-    virtual void swanSong();
+    void start() override;
+    bool doneAll() const override;
+    void swanSong() override;
 
     /// whether to stop serving our client after reading EOF on its connection
     virtual bool shouldCloseOnEof() const = 0;
index d5e9841a4105e64bcda29fe03a6772de99850795..7921e36805829bae6afdda03d2d85a09006bb4f3 100644 (file)
@@ -26,7 +26,7 @@ namespace Snmp
  */
 class Forwarder: public Ipc::Forwarder
 {
-    CBDATA_CLASS(Forwarder);
+    CBDATA_CHILD(Forwarder);
 
 public:
     Forwarder(const Pdu& aPdu, const Session& aSession, int aFd,
@@ -34,9 +34,9 @@ public:
 
 protected:
     /* Ipc::Forwarder API */
-    virtual void swanSong();
-    virtual void handleTimeout();
-    virtual void handleException(const std::exception& e);
+    void swanSong() override;
+    void handleTimeout() override;
+    void handleException(const std::exception& e) override;
 
 private:
     void noteCommClosed(const CommCloseCbParams& params);
index 7ea033f1da4df18ebc63a7647013f420bd4eb77a..9e923196eba1afee48f1decdf29164eb4287c9cf 100644 (file)
@@ -25,21 +25,21 @@ namespace Snmp
 /// aggregates strand responses and send back the result to client
 class Inquirer: public Ipc::Inquirer
 {
-    CBDATA_CLASS(Inquirer);
+    CBDATA_CHILD(Inquirer);
 
 public:
     Inquirer(const Request& aRequest, const Ipc::StrandCoords& coords);
 
 protected:
     /* AsyncJob API */
-    virtual void start();
-    virtual bool doneAll() const;
+    void start() override;
+    bool doneAll() const override;
 
     /* Ipc::Inquirer API */
-    virtual void cleanup();
-    virtual void handleException(const std::exception& e);
-    virtual void sendResponse();
-    virtual bool aggregate(Ipc::Response::Pointer aResponse);
+    void cleanup() override;
+    void handleException(const std::exception& e) override;
+    void sendResponse() override;
+    bool aggregate(Ipc::Response::Pointer aResponse) override;
 
 private:
     void noteCommClosed(const CommCloseCbParams& params);
index 89220e42d01e6ba28d4b36a812f815102678c706..1800d1bd58f67e1e58186e678a6ab45d2825c86d 100644 (file)
@@ -29,8 +29,8 @@ public:
 
     explicit Request(const Ipc::TypedMsgHdr& msg); ///< from recvmsg()
     /* Ipc::Request API */
-    virtual void pack(Ipc::TypedMsgHdr& msg) const;
-    virtual Pointer clone() const;
+    void pack(Ipc::TypedMsgHdr& msg) const override;
+    Pointer clone() const override;
 
 public:
     Pdu pdu; ///< SNMP protocol data unit
index dbe8668e9b4ac5e918a50801aa665b72a5ea6c7f..007f6b57c565540424da8f8aabe4c682e6e432f9 100644 (file)
@@ -26,8 +26,8 @@ public:
     explicit Response(Ipc::RequestId); ///< sender's constructor
     explicit Response(const Ipc::TypedMsgHdr& msg); ///< from recvmsg()
     /* Ipc::Response API */
-    virtual void pack(Ipc::TypedMsgHdr& msg) const;
-    virtual Ipc::Response::Pointer clone() const;
+    void pack(Ipc::TypedMsgHdr& msg) const override;
+    Ipc::Response::Pointer clone() const override;
 
 public:
     Pdu pdu; ///< SNMP protocol data unit
index 21acf5c1a69757c29e0824dad8b09d7b9e41c7a4..b23804a8e1b5cc3324484b014439b1d430ac2820 100644 (file)
@@ -55,7 +55,7 @@ void oid2addr(oid *Dest, Ip::Address &addr, u_int code);
 class ACLSNMPCommunityStrategy: public ACLStrategy<char const *>
 {
 public:
-    virtual int match (ACLData<MatchType> *&data, ACLFilledChecklist *checklist) override;
+    int match (ACLData<MatchType> *&data, ACLFilledChecklist *checklist) override;
 };
 
 #endif /* SQUID_SNMP_CORE_H */
index f3c87698e95fd39658bf58adc1e3918b05631aa1..1b134c10011a4c049ec9253eac616533a628872f 100644 (file)
@@ -37,7 +37,7 @@ public:
 
 private:
     ErrorDetailsList::Pointer  theDetails;
-    virtual bool parse() override;
+    bool parse() override;
 };
 }// namespace Ssl
 
index 73f7107255e4a63d7a33d0e2efa1d0631f200dbc..39da48833c3136a7df17768a97d72534b70aeb66 100644 (file)
@@ -18,7 +18,7 @@ namespace Ssl
 
 /// A PeerConnector for HTTP origin servers. Capable of SslBumping.
 class PeekingPeerConnector: public Security::PeerConnector {
-    CBDATA_CLASS(PeekingPeerConnector);
+    CBDATA_CHILD(PeekingPeerConnector);
 public:
     PeekingPeerConnector(HttpRequestPointer &aRequest,
                          const Comm::ConnectionPointer &aServerConn,
@@ -28,11 +28,11 @@ public:
                          time_t timeout = 0);
 
     /* Security::PeerConnector API */
-    virtual bool initialize(Security::SessionPointer &);
-    virtual Security::ContextPointer getTlsContext();
-    virtual void noteWantWrite();
-    virtual void noteNegotiationError(const Security::ErrorDetailPointer &);
-    virtual void noteNegotiationDone(ErrorState *error);
+    bool initialize(Security::SessionPointer &) override;
+    Security::ContextPointer getTlsContext() override;
+    void noteWantWrite() override;
+    void noteNegotiationError(const Security::ErrorDetailPointer &) override;
+    void noteNegotiationDone(ErrorState *error) override;
 
     /// Updates associated client connection manager members
     /// if the server certificate was received from the server.
index f50f64cb0919a024abf47e6ff7d545904d6b683a..ff81801600664c5201629808a7a84dd7c6ad180d 100644 (file)
@@ -75,13 +75,13 @@ public:
     /// The ClientBio version of the Ssl::Bio::stateChanged method
     /// When the client hello message retrieved, fill the
     /// "features" member with the client provided information.
-    virtual void stateChanged(const SSL *ssl, int where, int ret);
+    void stateChanged(const SSL *ssl, int where, int ret) override;
     /// The ClientBio version of the Ssl::Bio::write method
-    virtual int write(const char *buf, int size, BIO *table);
+    int write(const char *buf, int size, BIO *table) override;
     /// The ClientBio version of the Ssl::Bio::read method
     /// If the holdRead flag is true then it does not write any data
     /// to socket and sets the "read retry" flag of the BIO to true
-    virtual int read(char *buf, int size, BIO *table);
+    int read(char *buf, int size, BIO *table) override;
     /// Prevents or allow writing on socket.
     void hold(bool h) {holdRead_ = holdWrite_ = h;}
 
@@ -125,18 +125,18 @@ public:
     explicit ServerBio(const int anFd);
 
     /// The ServerBio version of the Ssl::Bio::stateChanged method
-    virtual void stateChanged(const SSL *ssl, int where, int ret);
+    void stateChanged(const SSL *ssl, int where, int ret) override;
     /// The ServerBio version of the Ssl::Bio::write method
     /// If a clientRandom number is set then rewrites the raw hello message
     /// "client random" field with the provided random number.
     /// It may buffer the output packets.
-    virtual int write(const char *buf, int size, BIO *table);
+    int write(const char *buf, int size, BIO *table) override;
     /// The ServerBio version of the Ssl::Bio::read method
     /// If the record flag is set then append the data to the rbuf member
-    virtual int read(char *buf, int size, BIO *table);
+    int read(char *buf, int size, BIO *table) override;
     /// The ServerBio version of the Ssl::Bio::flush method.
     /// Flushes any buffered data
-    virtual void flush(BIO *table);
+    void flush(BIO *table) override;
     /// Sets the random number to use in client SSL HELLO message
     void setClientFeatures(Security::TlsDetails::Pointer const &details, SBuf const &hello);
 
index acda638ae1c7a6b982916f25463d99822dba9a6c..9c9ebbb2ec1afc6db135ea25574b30f3f01a415d 100644 (file)
@@ -37,12 +37,12 @@ class CertificateStorageAction : public Mgr::Action
 public:
     CertificateStorageAction(const Mgr::Command::Pointer &cmd);
     static Pointer Create(const Mgr::Command::Pointer &cmd);
-    virtual void dump (StoreEntry *sentry);
+    void dump (StoreEntry *sentry) override;
     /**
      * We do not support aggregation of information across workers
      * TODO: aggregate these stats
      */
-    virtual bool aggregatable() const { return false; }
+    bool aggregatable() const override { return false; }
 };
 
 inline uint64_t MemoryUsedByContext(const Security::ContextPointer &) {
index 02e6450521e406a68f90d16ab881f59e66216c84..1e1b5884d542a9c1d3613706fe6407aa628bfa9f 100644 (file)
@@ -23,23 +23,23 @@ class Controller: public Storage
 {
 public:
     Controller();
-    virtual ~Controller() override;
+    ~Controller() override;
 
     /* Storage API */
-    virtual void create() override;
-    virtual void init() override;
-    virtual uint64_t maxSize() const override;
-    virtual uint64_t minSize() const override;
-    virtual uint64_t currentSize() const override;
-    virtual uint64_t currentCount() const override;
-    virtual int64_t maxObjectSize() const override;
-    virtual void getStats(StoreInfoStats &stats) const override;
-    virtual void stat(StoreEntry &) const override;
-    virtual void sync() override;
-    virtual void maintain() override;
-    virtual void evictCached(StoreEntry &) override;
-    virtual void evictIfFound(const cache_key *) override;
-    virtual int callback() override;
+    void create() override;
+    void init() override;
+    uint64_t maxSize() const override;
+    uint64_t minSize() const override;
+    uint64_t currentSize() const override;
+    uint64_t currentCount() const override;
+    int64_t maxObjectSize() const override;
+    void getStats(StoreInfoStats &stats) const override;
+    void stat(StoreEntry &) const override;
+    void sync() override;
+    void maintain() override;
+    void evictCached(StoreEntry &) override;
+    void evictIfFound(const cache_key *) override;
+    int callback() override;
 
     /// \returns a locally indexed and SMP-tracked matching StoreEntry (or nil)
     /// Slower than peek() but does not restrict StoreEntry use and storage.
index ff7e1c82f47acd01d3a46a4c062ec75e9638c8bd..daadfc3bed1e447b2b3177478823f5d51ecf4ba9 100644 (file)
@@ -25,7 +25,7 @@ public:
     typedef RefCount<Disk> Pointer;
 
     explicit Disk(char const *aType);
-    virtual ~Disk();
+    ~Disk() override;
     virtual void reconfigure() = 0;
     char const *type() const;
 
@@ -43,16 +43,16 @@ public:
     virtual void diskFull();
 
     /* Controlled API */
-    virtual void create() override;
-    virtual StoreEntry *get(const cache_key *) override;
-    virtual uint64_t maxSize() const override { return max_size; }
-    virtual uint64_t minSize() const override;
-    virtual int64_t maxObjectSize() const override;
-    virtual void getStats(StoreInfoStats &stats) const override;
-    virtual void stat(StoreEntry &) const override;
-    virtual void reference(StoreEntry &e) override;
-    virtual bool dereference(StoreEntry &e) override;
-    virtual void maintain() override;
+    void create() override;
+    StoreEntry *get(const cache_key *) override;
+    uint64_t maxSize() const override { return max_size; }
+    uint64_t minSize() const override;
+    int64_t maxObjectSize() const override;
+    void getStats(StoreInfoStats &stats) const override;
+    void stat(StoreEntry &) const override;
+    void reference(StoreEntry &e) override;
+    bool dereference(StoreEntry &e) override;
+    void maintain() override;
     /// whether this disk storage is capable of serving multiple workers
     virtual bool smpAware() const = 0;
 
index e6fd0af1ef68b5f97124a8a262ff86efe050e5fa..996a35458ec9262d253aff56ff891e959b802e8f 100644 (file)
@@ -21,26 +21,26 @@ public:
     Disks();
 
     /* Storage API */
-    virtual void create() override;
-    virtual void init() override;
-    virtual StoreEntry *get(const cache_key *) override;
-    virtual uint64_t maxSize() const override;
-    virtual uint64_t minSize() const override;
-    virtual uint64_t currentSize() const override;
-    virtual uint64_t currentCount() const override;
-    virtual int64_t maxObjectSize() const override;
-    virtual void getStats(StoreInfoStats &stats) const override;
-    virtual void stat(StoreEntry &) const override;
-    virtual void sync() override;
-    virtual void reference(StoreEntry &) override;
-    virtual bool dereference(StoreEntry &e) override;
-    virtual void updateHeaders(StoreEntry *) override;
-    virtual void maintain() override;
-    virtual bool anchorToCache(StoreEntry &) override;
-    virtual bool updateAnchored(StoreEntry &) override;
-    virtual void evictCached(StoreEntry &) override;
-    virtual void evictIfFound(const cache_key *) override;
-    virtual int callback() override;
+    void create() override;
+    void init() override;
+    StoreEntry *get(const cache_key *) override;
+    uint64_t maxSize() const override;
+    uint64_t minSize() const override;
+    uint64_t currentSize() const override;
+    uint64_t currentCount() const override;
+    int64_t maxObjectSize() const override;
+    void getStats(StoreInfoStats &stats) const override;
+    void stat(StoreEntry &) const override;
+    void sync() override;
+    void reference(StoreEntry &) override;
+    bool dereference(StoreEntry &e) override;
+    void updateHeaders(StoreEntry *) override;
+    void maintain() override;
+    bool anchorToCache(StoreEntry &) override;
+    bool updateAnchored(StoreEntry &) override;
+    void evictCached(StoreEntry &) override;
+    void evictIfFound(const cache_key *) override;
+    int callback() override;
 
     /// update configuration, including limits (re)calculation
     void configure();
index 26a960329ef4a6b4e0a41dbd245dd31cc73cf8e5..ba89506fab0742c5ccccab9e6526fec7dae981cf 100644 (file)
@@ -23,11 +23,11 @@ class LocalSearch : public StoreSearch
 
 public:
     /* StoreSearch API */
-    virtual void next(void (callback)(void *cbdata), void *cbdata) override;
-    virtual bool next() override;
-    virtual bool error() const override;
-    virtual bool isDone() const override;
-    virtual StoreEntry *currentItem() override;
+    void next(void (callback)(void *cbdata), void *cbdata) override;
+    bool next() override;
+    bool error() const override;
+    bool isDone() const override;
+    StoreEntry *currentItem() override;
 
 private:
     void copyBucket();
index 38731e4dfb62a157c18e000ad67a1be1cd284dc6..cff5ed8fe691e83985ed29fb5fb637b44ae674bf 100644 (file)
@@ -23,7 +23,7 @@ namespace Store {
 class Storage: public RefCountable
 {
 public:
-    virtual ~Storage() {}
+    ~Storage() override {}
 
     /// create system resources needed for this store to operate in the future
     virtual void create() = 0;
index 1742e195dd8e402a0daf712625e1711327ad036d..8390aca297791d0b965e387bffa747c7f53d7807 100644 (file)
@@ -24,15 +24,15 @@ public:
     int _buffer_calls;
     int _flush_calls;
 
-    virtual void buffer() {
+    void buffer() override {
         _buffer_calls += 1;
     }
 
-    virtual void flush() {
+    void flush() override {
         _flush_calls += 1;
     }
 
-    virtual void append(char const * buf, int len) {
+    void append(char const * buf, int len) override {
         if (!buf || len < 0) // old 'String' can't handle these cases
             return;
         _appended_text.append(buf, len);
index ee85802fc2b473d1898e3c02ced370017e5e113d..16da5c2ba501f10ffca0eb660552d16aeb608530 100644 (file)
@@ -20,23 +20,23 @@ public:
     bool statsCalled;
 
     /* Store::Disk API */
-    virtual uint64_t maxSize() const override;
-    virtual uint64_t currentSize() const override;
-    virtual uint64_t currentCount() const override;
-    virtual void stat(StoreEntry &) const override;
-    virtual void finalizeSwapoutSuccess(const StoreEntry &) override {}
-    virtual void finalizeSwapoutFailure(StoreEntry &) override {}
-    virtual void reconfigure() override;
-    virtual void init() override;
-    virtual bool unlinkdUseful() const override;
-    virtual bool canStore(const StoreEntry &e, int64_t diskSpaceNeeded, int &load) const override;
-    virtual StoreIOState::Pointer createStoreIO(StoreEntry &, StoreIOState::STFNCB *, StoreIOState::STIOCB *, void *) override;
-    virtual StoreIOState::Pointer openStoreIO(StoreEntry &, StoreIOState::STFNCB *, StoreIOState::STIOCB *, void *) override;
-    virtual void parse(int, char*) override;
-    virtual void evictCached(StoreEntry &) override {}
-    virtual void evictIfFound(const cache_key *) override {}
-    virtual bool hasReadableEntry(const StoreEntry &) const override { return false; }
-    virtual bool smpAware() const override { return false; }
+    uint64_t maxSize() const override;
+    uint64_t currentSize() const override;
+    uint64_t currentCount() const override;
+    void stat(StoreEntry &) const override;
+    void finalizeSwapoutSuccess(const StoreEntry &) override {}
+    void finalizeSwapoutFailure(StoreEntry &) override {}
+    void reconfigure() override;
+    void init() override;
+    bool unlinkdUseful() const override;
+    bool canStore(const StoreEntry &e, int64_t diskSpaceNeeded, int &load) const override;
+    StoreIOState::Pointer createStoreIO(StoreEntry &, StoreIOState::STFNCB *, StoreIOState::STIOCB *, void *) override;
+    StoreIOState::Pointer openStoreIO(StoreEntry &, StoreIOState::STFNCB *, StoreIOState::STIOCB *, void *) override;
+    void parse(int, char*) override;
+    void evictCached(StoreEntry &) override {}
+    void evictIfFound(const cache_key *) override {}
+    bool hasReadableEntry(const StoreEntry &) const override { return false; }
+    bool smpAware() const override { return false; }
 };
 
 typedef RefCount<TestSwapDir> TestSwapDirPointer;
index b3dacbb3ae576485f5b4361c2bc6895f093a5b50..11d377306d903df0ea5300c31865808b06d25ae9 100644 (file)
@@ -7,12 +7,18 @@
  */
 
 #include "squid.h"
-#include "ipc/Forwarder.h"
 
-//Avoid linker errors about Ipc::Forwarder
-void foo_stub_ipc_forwarder();
-void foo_stub_ipc_forwarder()
-{
-    Ipc::Forwarder foo(nullptr,1.0);
-}
+#define STUB_API "ipc/Forwarder.cc"
+#include "tests/STUB.h"
+
+#include "ipc/Forwarder.h"
+Ipc::Forwarder::Forwarder(Request::Pointer, double): AsyncJob("Ipc::Forwarder"), timeout(0) {STUB}
+Ipc::Forwarder::~Forwarder() STUB
+void Ipc::Forwarder::start() STUB
+bool Ipc::Forwarder::doneAll() const STUB_RETVAL(false)
+void Ipc::Forwarder::swanSong() STUB
+void Ipc::Forwarder::callException(const std::exception &) STUB
+void Ipc::Forwarder::handleError() STUB
+void Ipc::Forwarder::handleTimeout() STUB
+void Ipc::Forwarder::handleException(const std::exception &) STUB
 
index bf1d110855d05b3480a71ed7d5625842d2f9783f..0ea14b4150f47eb087e37fb2eab9bac06d92ff76 100644 (file)
@@ -73,7 +73,6 @@ const char *Security::NegotiationHistory::printTlsVersion(AnyP::ProtocolVersion
 
 #include "security/PeerConnector.h"
 class TlsNegotiationDetails: public RefCountable {};
-CBDATA_NAMESPACED_CLASS_INIT(Security, PeerConnector);
 namespace Security
 {
 PeerConnector::PeerConnector(const Comm::ConnectionPointer &, const AsyncCallback<EncryptorAnswer> &, const AccessLogEntryPointer &, const time_t):
index 3edb09a791b2fec61c6f0d1e5078c8602a0556a1..3c0411fe0029fa99f9b6517b3a6c98cbdf03948d 100644 (file)
@@ -27,7 +27,7 @@ class testACLMaxUserIP : public CPPUNIT_NS::TestFixture
     CPPUNIT_TEST_SUITE_END();
 
 public:
-    virtual void setUp() override;
+    void setUp() override;
 
 protected:
     void testDefaults();
index e9cbf6cd10d9733887a9250511354154b47aa7eb..fdb5c67040f9cbe188ea7cc70870725bb7b3cdca 100644 (file)
@@ -24,7 +24,7 @@ class testCacheManager : public CPPUNIT_NS::TestFixture
     CPPUNIT_TEST_SUITE_END();
 
 public:
-    void setUp();
+    void setUp() override;
 
 protected:
     void testCreate();
index e61b536a87fa699b5cbd49e8565d26c42eaa3dc4..ac62556cb6411c28726a1dd5bfe70efd7a39041b 100644 (file)
@@ -22,7 +22,7 @@ class testConfigParser : public CPPUNIT_NS::TestFixture
     CPPUNIT_TEST_SUITE_END();
 
 public:
-    void setUp();
+    void setUp() override;
 
 protected:
     bool doParseQuotedTest(const char *, const char *);
index 9e8b26bd7720f532e469969e9ebec45208953bf5..e0841a49ccdd32a659d9bbc850fa4b49e4d6b07b 100644 (file)
@@ -22,7 +22,7 @@ class testDiskIO : public CPPUNIT_NS::TestFixture
     CPPUNIT_TEST_SUITE_END();
 
 public:
-    void setUp();
+    void setUp() override;
 
 protected:
     void testFindDefault();
index bdff2598ebcafa5e2e8fe015a649e546ea1c19c4..9738fb5ceacd5bd5d13f255d1c7b706565eb01c1 100644 (file)
@@ -27,7 +27,7 @@ class testEvent : public CPPUNIT_NS::TestFixture
     CPPUNIT_TEST_SUITE_END();
 
 public:
-    void setUp();
+    void setUp() override;
 
 protected:
     void testCreate();
index e659a27d5652093e0f2af3704b62ac7dd9f19346..10006f1e88191e399c6209cc0e79900d0be50503 100644 (file)
@@ -28,7 +28,7 @@ class RecordingEngine : public AsyncEngine
 public:
     RecordingEngine(int aTimeout = 0) : return_timeout(aTimeout) {}
 
-    virtual int checkEvents(int timeout) {
+    int checkEvents(int timeout) override {
         ++calls;
         lasttimeout = timeout;
         return return_timeout;
@@ -131,7 +131,7 @@ public:
     StubTime() : calls(0) {}
 
     int calls;
-    void tick() {
+    void tick() override {
         ++calls;
     }
 };
index a07abf4a7d1886b5b7228306a92c9ef23d8e4511..4aaadf1ef550644a4fc3447d8ef1381f0e97b9ae 100644 (file)
@@ -22,7 +22,7 @@ class testHttpReply : public CPPUNIT_NS::TestFixture
     CPPUNIT_TEST_SUITE_END();
 
 public:
-    void setUp();
+    void setUp() override;
 
 protected:
     void testSanityCheckFirstLine();
index 63140a7de840a3d3951328efce941694e0bd7d27..6a4db98e929ae947757a1fc596d22f4b87dab2f0 100644 (file)
@@ -24,7 +24,7 @@ class testHttpRequest : public CPPUNIT_NS::TestFixture
     CPPUNIT_TEST_SUITE_END();
 
 public:
-    void setUp();
+    void setUp() override;
 
 protected:
     void testCreateFromUrl();
index 1684c77717bf5c6d0f2ac134917975378b88bdc9..a90e8fb1efe0203d6de59ee67cd110110e1fbdbf 100644 (file)
@@ -19,15 +19,15 @@ class stubIcmp : public Icmp
 {
 public:
     stubIcmp() {};
-    virtual ~stubIcmp() {};
-    virtual int Open() { return 0; };
-    virtual void Close() {};
+    ~stubIcmp() override {};
+    int Open() override { return 0; };
+    void Close() override {};
 
     /// Construct ECHO request
-    virtual void SendEcho(Ip::Address &, int, const char *, int) {}
+    void SendEcho(Ip::Address &, int, const char *, int) override {}
 
     /// Handle ICMP responses.
-    virtual void Recv(void) {};
+    void Recv(void) override {};
 
     /* methods to relay test data from tester to private methods being tested */
     int testChecksum(unsigned short *ptr, int size) { return CheckSum(ptr,size); };
index d73ae6126f21dbcf3223bf4cbe12a40d7a8cecf6..0248590e559029bba356b7061dcc4ad742afa0c8 100644 (file)
@@ -22,7 +22,7 @@ class testPackableStream : public CPPUNIT_NS::TestFixture
     CPPUNIT_TEST_SUITE_END();
 
 public:
-    void setUp();
+    void setUp() override;
 
 protected:
     void testGetStream();
index ccff873a9eb948aadd314963dc626048a5f8fb6d..ab43fd93803e529edcc49399092af48b0e952d57 100644 (file)
@@ -19,7 +19,7 @@ class _ToRefCount : public RefCountable
 {
 public:
     _ToRefCount () {++Instances;}
-    ~_ToRefCount() {--Instances;}
+    ~_ToRefCount() override {--Instances;}
 
     int someMethod() {
         if (!Instances)
index e048baf213cbc650d789d4c2fbcb383b637412d8..4d690e587d4b48b961b96609432203b333156dd9 100644 (file)
@@ -24,8 +24,8 @@ class testRock : public CPPUNIT_NS::TestFixture
 
 public:
     testRock() : rr(nullptr) {}
-    virtual void setUp();
-    virtual void tearDown();
+    void setUp() override;
+    void tearDown() override;
 
     typedef RefCount<Rock::SwapDir> SwapDirPointer;
 
index 4674fd80fdbf27a03c25812462b9186cb0b04bf8..d5465efd2ba8aae6b05b0fb8949a4ca7d13b9056 100644 (file)
@@ -47,29 +47,29 @@ public:
 
     bool statsCalled;
 
-    virtual int callback();
+    int callback() override;
 
     virtual StoreEntry* get(const cache_key*);
 
     virtual void get(String, void (*)(StoreEntry*, void*), void*);
 
-    virtual void init();
+    void init() override;
 
-    virtual void maintain() {};
+    void maintain() override {};
 
-    virtual uint64_t maxSize() const;
+    uint64_t maxSize() const override;
 
-    virtual uint64_t minSize() const;
+    uint64_t minSize() const override;
 
-    virtual uint64_t currentSize() const;
+    uint64_t currentSize() const override;
 
-    virtual uint64_t currentCount() const;
+    uint64_t currentCount() const override;
 
-    virtual int64_t maxObjectSize() const;
+    int64_t maxObjectSize() const override;
 
-    virtual void getStats(StoreInfoStats &) const;
+    void getStats(StoreInfoStats &) const override;
 
-    virtual void stat(StoreEntry &) const; /* output stats to the provided store entry */
+    void stat(StoreEntry &) const override; /* output stats to the provided store entry */
 
     virtual void reference(StoreEntry &) {} /* Reference this object */
 
index 9786bd08fe4a4718ebf454afacf64aa197735e78..ac25e360f46d6d5837906145529301f725aa79cf 100644 (file)
@@ -26,7 +26,7 @@ class testString : public CPPUNIT_NS::TestFixture
     CPPUNIT_TEST_SUITE_END();
 
 public:
-    void setUp();
+    void setUp() override;
 
 protected:
     void testCmpDefault();
index 1e1d25370aa2078fbd8f8f6dc8e1d83966ec9edf..1df0514b92e72c07486fb61af523ee1a0540d5e2 100644 (file)
@@ -23,7 +23,7 @@ class testURL : public CPPUNIT_NS::TestFixture
     CPPUNIT_TEST_SUITE_END();
 
 public:
-    void setUp();
+    void setUp() override;
 
 protected:
 
index 810258785ff07e5838681a96224d40186ad698cd..2fa4993ca988a63189fb83269d10c3f551fc3b8e 100644 (file)
@@ -29,7 +29,7 @@ class testUriScheme : public CPPUNIT_NS::TestFixture
     CPPUNIT_TEST_SUITE_END();
 
 public:
-    void setUp();
+    void setUp() override;
 
 protected:
     void testAssignFromprotocol_t();
index 22ad8ba32596739cbd9591fbe16f633e604cdea6..e1520bbf226589f6409cc92f6648cf15ba90569f 100644 (file)
@@ -77,7 +77,7 @@ class TunnelStateData: public PeerSelectionInitiator
 
 public:
     TunnelStateData(ClientHttpRequest *);
-    virtual ~TunnelStateData();
+    ~TunnelStateData() override;
     TunnelStateData(const TunnelStateData &); // do not implement
     TunnelStateData &operator =(const TunnelStateData &); // do not implement
 
@@ -218,8 +218,8 @@ public:
     void secureConnectionToPeer(const Comm::ConnectionPointer &);
 
     /* PeerSelectionInitiator API */
-    virtual void noteDestination(Comm::ConnectionPointer conn) override;
-    virtual void noteDestinationsEnd(ErrorState *selectionError) override;
+    void noteDestination(Comm::ConnectionPointer conn) override;
+    void noteDestinationsEnd(ErrorState *selectionError) override;
 
     void syncHierNote(const Comm::ConnectionPointer &server, const char *origin);
 
index 5c7907c65ef3814af435923f01fedb29776144ef..04b30f86b2c0033abc54d1f3f9c247cb95c3a860 100644 (file)
@@ -39,7 +39,7 @@ public:
     void start (HttpRequest *, StoreEntry *);
     void setUriResFromRequest(HttpRequest *);
 
-    virtual ~UrnState();
+    ~UrnState() override;
 
     StoreEntry *entry = nullptr;
     store_client *sc = nullptr;
@@ -53,8 +53,8 @@ public:
 
 private:
     /* StoreClient API */
-    virtual LogTags *loggingTags() const { return ale ? &ale->cache.code : nullptr; }
-    virtual void fillChecklist(ACLFilledChecklist &) const;
+    LogTags *loggingTags() const override { return ale ? &ale->cache.code : nullptr; }
+    void fillChecklist(ACLFilledChecklist &) const override;
 
     char *urlres = nullptr;
 };
index 6f28b3b597637ce56947b04252d569d5dda10f94..f3a43c7783546a8205d83fb17aa0b4f643b9c4f6 100644 (file)
@@ -68,7 +68,7 @@ class ChildVirtual : public BaseVirtual
 public:
     void *operator new (size_t);
     void operator delete (void *);
-    virtual ~ChildVirtual();
+    ~ChildVirtual() override;
     static CallCounter Calls;
 };