From: Amos Jeffries Date: Fri, 6 Jun 2014 16:04:31 +0000 (-0700) Subject: Restore copy-construct on Parser hierarchy X-Git-Tag: merge-candidate-3-v1~506^2~13 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c17b7a434177bfb9b979ca382821a340bd4ff67a;p=thirdparty%2Fsquid.git Restore copy-construct on Parser hierarchy While it does not make sense to clone a Parser and be running two independently on the same buffer simultaneously it is also no worth the added compexity of forbidding it at this time. --- diff --git a/src/http/one/Parser.h b/src/http/one/Parser.h index e4ec3f8471..e6ae3f7259 100644 --- a/src/http/one/Parser.h +++ b/src/http/one/Parser.h @@ -26,14 +26,10 @@ enum ParseState { */ class Parser : public RefCountable { - explicit Parser(const Parser&); // do not implement - Parser& operator =(const Parser&); // do not implement - public: typedef SBuf::size_type size_type; - Parser() { clear(); } - virtual ~Parser() {} + Parser() : parsingStage_(HTTP_PARSE_NONE) {} /// Set this parser back to a default state. /// Will DROP any reference to a buffer (does not free). diff --git a/src/http/one/RequestParser.h b/src/http/one/RequestParser.h index 8f6a51e40d..4481f68210 100644 --- a/src/http/one/RequestParser.h +++ b/src/http/one/RequestParser.h @@ -18,13 +18,9 @@ namespace One { */ class RequestParser : public Http1::Parser { - explicit RequestParser(const RequestParser&); // do not implement - RequestParser& operator =(const RequestParser&); // do not implement - public: /* Http::One::Parser API */ RequestParser() : Parser() {clear();} - virtual ~RequestParser() {} virtual void clear(); virtual Http1::Parser::size_type firstLineSize() const {return req.end - req.start + 1;} virtual bool parse(const SBuf &aBuf);