]> 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>
Thu, 17 Jun 2021 10:13:05 +0000 (22:13 +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 13ffd05ac81162c699ccfa39dfbdeb3da4d1d154..7f578f407e8142ab3c940bb8e4d2414cfd61f330 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 b43f5833278ea95fbe3baceeefb36efac8c5c174..884f8313cd34ee47567565a67346e1da1639c98c 100644 (file)
@@ -21,7 +21,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;