Skip to content

Commit

Permalink
Fix coding style issue in HttpHeaders (SmingHub#1471)
Browse files Browse the repository at this point in the history
  • Loading branch information
mikee47 authored and slaff committed Oct 9, 2018
1 parent 72a0006 commit 05dbd17
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions Sming/SmingCore/Network/Http/HttpHeaders.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ String HttpHeaders::toString(HttpHeaderFieldName name) const
if(name < HTTP_HEADER_CUSTOM)
return *FieldNameStrings[name - 1];

return customFieldNames_[name - HTTP_HEADER_CUSTOM];
return customFieldNames[name - HTTP_HEADER_CUSTOM];
}

String HttpHeaders::toString(const String& name, const String& value)
Expand All @@ -56,7 +56,7 @@ HttpHeaderFieldName HttpHeaders::fromString(const String& name) const

HttpHeaderFieldName HttpHeaders::findCustomFieldName(const String& name) const
{
auto index = customFieldNames_.indexOf(name);
auto index = customFieldNames.indexOf(name);
if(index >= 0)
return static_cast<HttpHeaderFieldName>(HTTP_HEADER_CUSTOM + index);

Expand Down
8 changes: 4 additions & 4 deletions Sming/SmingCore/Network/Http/HttpHeaders.h
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,8 @@ class HttpHeaders : public HashMap<HttpHeaderFieldName, String>
{
auto field = fromString(name);
if(field == HTTP_HEADER_UNKNOWN) {
field = static_cast<HttpHeaderFieldName>(HTTP_HEADER_CUSTOM + customFieldNames_.count());
customFieldNames_.add(name);
field = static_cast<HttpHeaderFieldName>(HTTP_HEADER_CUSTOM + customFieldNames.count());
customFieldNames.add(name);
}
return operator[](field);
}
Expand Down Expand Up @@ -178,7 +178,7 @@ class HttpHeaders : public HashMap<HttpHeaderFieldName, String>

void clear()
{
customFieldNames_.clear();
customFieldNames.clear();
HashMap::clear();
}

Expand All @@ -189,7 +189,7 @@ class HttpHeaders : public HashMap<HttpHeaderFieldName, String>
*/
HttpHeaderFieldName findCustomFieldName(const String& name) const;

CStringArray customFieldNames_;
CStringArray customFieldNames;
};

#endif /* _SMING_CORE_NETWORK_HTTP_HEADERS_H_ */

0 comments on commit 05dbd17

Please sign in to comment.