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_4_16~2 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=a526d3654b8961ed0d6de082fa15b621ab02e6f7;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 13ffd05ac8..7f578f407e 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 b43f583327..884f8313cd 100644 --- a/src/http/forward.h +++ b/src/http/forward.h @@ -21,7 +21,6 @@ typedef RefCount StreamPointer; // TODO move these classes into Http namespace class HttpRequestMethod; -typedef RefCount HttpRequestMethodPointer; class HttpRequest; typedef RefCount HttpRequestPointer;