From: Amos Jeffries Date: Tue, 5 Oct 2010 12:07:30 +0000 (+1300) Subject: const correctness in Subscription class X-Git-Tag: take08~55^2~124^2~45 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3c17fad40309038ae8ed5dcbf93c5af4fcb612e8;p=thirdparty%2Fsquid.git const correctness in Subscription class --- diff --git a/src/CommCalls.h b/src/CommCalls.h index 1933e0c11b..00785e7254 100644 --- a/src/CommCalls.h +++ b/src/CommCalls.h @@ -261,9 +261,6 @@ public: inline CommCbFunPtrCallT(int debugSection, int debugLevel, const char *callName, const Dialer &aDialer); -// XXX: obsolete comment? - // parameter cannot be const because getDialer() cannot be const - // getDialer() cannot because Comm IO syncWithComm() alters the object params data inline CommCbFunPtrCallT(const Pointer &p) : AsyncCall(p->debugSection, p->debugLevel, p->name), dialer(p->dialer) diff --git a/src/base/Subscription.h b/src/base/Subscription.h index f8ab6a951c..b9deea45b9 100644 --- a/src/base/Subscription.h +++ b/src/base/Subscription.h @@ -34,12 +34,6 @@ class CallSubscription: public Subscription { public: CallSubscription(const RefCount &aCall) : call(aCall) {}; - -// XXX: obsolete comment? - // cant be const sometimes because CommCbFunPtrCallT cant provide a const overload. - // CommCbFunPtrCallT lists why. boils down to Comm IO syncWithComm() existence - // NP: we still treat it as const though. - CallSubscription(RefCount &aCall) : call(aCall) {}; virtual AsyncCall::Pointer callback() { return new Call_(call); }; // virtual AsyncCall::Pointer callback() const { return new Call_(call); };