diff --git a/proxy/hdrs/HTTP.h b/proxy/hdrs/HTTP.h index 8636cf92d65..68d48a4f042 100644 --- a/proxy/hdrs/HTTP.h +++ b/proxy/hdrs/HTTP.h @@ -464,14 +464,15 @@ HTTPValTE *http_parse_te(const char *buf, int len, Arena *arena); class HTTPVersion { public: - HTTPVersion(); + HTTPVersion() = default; + HTTPVersion(HTTPVersion const &that) = default; explicit HTTPVersion(int32_t version); HTTPVersion(int ver_major, int ver_minor); void set(HTTPVersion ver); void set(int ver_major, int ver_minor); - HTTPVersion &operator=(const HTTPVersion &hv); + HTTPVersion &operator=(const HTTPVersion &hv) = default; int operator==(const HTTPVersion &hv) const; int operator!=(const HTTPVersion &hv) const; int operator>(const HTTPVersion &hv) const; @@ -480,7 +481,7 @@ class HTTPVersion int operator<=(const HTTPVersion &hv) const; public: - int32_t m_version; + int32_t m_version{HTTP_VERSION(1, 0)}; }; class IOBufferReader; @@ -654,11 +655,6 @@ class HTTPHdr : public MIMEHdr friend class UrlPrintHack; // don't ask. }; -/*------------------------------------------------------------------------- - -------------------------------------------------------------------------*/ - -inline HTTPVersion::HTTPVersion() : m_version(HTTP_VERSION(1, 0)) {} - /*------------------------------------------------------------------------- -------------------------------------------------------------------------*/ @@ -687,17 +683,6 @@ HTTPVersion::set(int ver_major, int ver_minor) m_version = HTTP_VERSION(ver_major, ver_minor); } -/*------------------------------------------------------------------------- - -------------------------------------------------------------------------*/ - -inline HTTPVersion & -HTTPVersion::operator=(const HTTPVersion &hv) -{ - m_version = hv.m_version; - - return *this; -} - /*------------------------------------------------------------------------- -------------------------------------------------------------------------*/