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: 4.15-20210522-snapshot~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=77c241ca0d23eec4e1a06a50220f9a015fcfb26d;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 f362a71c13..c5f695d0c7 100644 --- a/src/http/forward.h +++ b/src/http/forward.h @@ -38,7 +38,6 @@ typedef enum { class HttpHdrSc; class HttpRequestMethod; -typedef RefCount HttpRequestMethodPointer; class HttpRequest; typedef RefCount HttpRequestPointer;