]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Bug 5129 pt1: remove Lock use from HttpRequestMethod (#825)
authorAmos Jeffries <yadij@users.noreply.github.com>
Mon, 17 May 2021 08:10:33 +0000 (08:10 +0000)
committerAmos Jeffries <yadij@users.noreply.github.com>
Sun, 30 May 2021 09:58:14 +0000 (21:58 +1200)
Removes the need for a custom assignment operator with a questionable
implementation, addressing compiler and static analysis warnings.

src/http/RequestMethod.h
src/http/forward.h

index f59c3f12432f2a9f26b6a9583e5a66e5d29f399a..9169260c8475d512e7112709a6c1a302758579dc 100644 (file)
@@ -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();
index 753d64f28012aee34667fae61f7faff6a8f5436b..680da663342f58f140f9f425dd8ef095830fe5ea 100644 (file)
@@ -26,7 +26,6 @@ typedef RefCount<Http::Stream> StreamPointer;
 
 // TODO move these classes into Http namespace
 class HttpRequestMethod;
-typedef RefCount<HttpRequestMethod> HttpRequestMethodPointer;
 
 class HttpRequest;
 typedef RefCount<HttpRequest> HttpRequestPointer;