Skip to content

Commit

Permalink
Fix codacy advisories, deprecate HttpRequest copy operator
Browse files Browse the repository at this point in the history
  • Loading branch information
mikee47 committed Feb 18, 2019
1 parent e856500 commit 11ddb12
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
11 changes: 10 additions & 1 deletion Sming/SmingCore/Network/Http/HttpHeaders.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,18 @@ enum HttpHeaderFieldName {
*
* @todo add name and/or value escaping
*/
class HttpHeaders : private HashMap<HttpHeaderFieldName, String>
class HttpHeaders : protected HashMap<HttpHeaderFieldName, String>
{
public:
HttpHeaders()
{
}

HttpHeaders(const HttpHeaders& headers)
{
*this = headers;
}

String toString(HttpHeaderFieldName name) const;

/** @brief Produce a string for output in the HTTP header, with line ending
Expand Down
1 change: 0 additions & 1 deletion Sming/SmingCore/Network/Http/HttpRequest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@

HttpRequest::HttpRequest(const HttpRequest& value) : uri(value.uri), method(value.method), headers(value.headers)
{
*this = value;
headersCompletedDelegate = value.headersCompletedDelegate;
requestBodyDelegate = value.requestBodyDelegate;
requestCompletedDelegate = value.requestCompletedDelegate;
Expand Down
1 change: 1 addition & 0 deletions Sming/SmingCore/Network/Http/HttpRequest.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ class HttpRequest
return new HttpRequest(*this);
}

/** @deprecated Please use `clone()` instead */
HttpRequest& operator=(const HttpRequest& rhs) SMING_DEPRECATED;

~HttpRequest()
Expand Down

0 comments on commit 11ddb12

Please sign in to comment.