From: Amos Jeffries Date: Mon, 17 May 2021 08:10:33 +0000 (+0000) Subject: Bug 5129 pt1: remove Lock use from HttpRequestMethod (#825) X-Git-Tag: SQUID_5_0_7~10 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=85f7857f03e7cfe2bc3116b1f63a6449b2b14ef8;p=thirdparty%2Fsquid.git Bug 5129 pt1: remove Lock use from HttpRequestMethod (#825) Removes the need for a custom assignment operator with a questionable implementation, addressing compiler and static analysis warnings. --- diff --git a/src/http/RequestMethod.h b/src/http/RequestMethod.h index f59c3f1243..9169260c84 100644 --- a/src/http/RequestMethod.h +++ b/src/http/RequestMethod.h @@ -23,7 +23,7 @@ class SquidConfig; * It has a runtime extension facility to allow it to * efficiently support new methods */ -class HttpRequestMethod : public RefCountable +class HttpRequestMethod { public: HttpRequestMethod() : theMethod(Http::METHOD_NONE), theImage() {} @@ -32,12 +32,6 @@ public: void HttpRequestMethodXXX(char const *); // deprecated old c-string to SBuf converter. - HttpRequestMethod & operator = (const HttpRequestMethod& aMethod) { - theMethod = aMethod.theMethod; - theImage = aMethod.theImage; - return *this; - } - HttpRequestMethod & operator = (Http::MethodType const aMethod) { theMethod = aMethod; theImage.clear(); diff --git a/src/http/forward.h b/src/http/forward.h index 753d64f280..680da66334 100644 --- a/src/http/forward.h +++ b/src/http/forward.h @@ -26,7 +26,6 @@ typedef RefCount StreamPointer; // TODO move these classes into Http namespace class HttpRequestMethod; -typedef RefCount HttpRequestMethodPointer; class HttpRequest; typedef RefCount HttpRequestPointer;