Skip to content

Commit 2e98b9f

Browse files
authored
Inline all usings (#2629)
* inline all usings * simplify inline * code improvements * fix * fix missing inlines
1 parent a5361f8 commit 2e98b9f

File tree

1 file changed

+23
-29
lines changed

1 file changed

+23
-29
lines changed

src/aws-cpp-sdk-core/source/http/standard/StandardHttpRequest.cpp

+23-29
Original file line numberDiff line numberDiff line change
@@ -11,28 +11,22 @@
1111
#include <algorithm>
1212
#include <cassert>
1313

14-
using Aws::Http::Standard::StandardHttpRequest;
15-
using Aws::Http::HeaderValueCollection;
16-
using Aws::Http::Scheme;
17-
using Aws::Http::URI;
18-
using Aws::Utils::StringUtils;
19-
2014
static const char* STANDARD_HTTP_REQUEST_LOG_TAG = "StandardHttpRequest";
2115

22-
static bool IsDefaultPort(const URI& uri)
16+
static bool IsDefaultPort(const Aws::Http::URI& uri)
2317
{
2418
switch(uri.GetPort())
2519
{
2620
case 80:
27-
return uri.GetScheme() == Scheme::HTTP;
21+
return uri.GetScheme() == Aws::Http::Scheme::HTTP;
2822
case 443:
29-
return uri.GetScheme() == Scheme::HTTPS;
23+
return uri.GetScheme() == Aws::Http::Scheme::HTTPS;
3024
default:
3125
return false;
3226
}
3327
}
3428

35-
StandardHttpRequest::StandardHttpRequest(const URI& uri, HttpMethod method) :
29+
Aws::Http::Standard::StandardHttpRequest::StandardHttpRequest(const Aws::Http::URI& uri, Aws::Http::HttpMethod method) :
3630
HttpRequest(uri, method),
3731
bodyStream(nullptr),
3832
m_responseStreamFactory()
@@ -49,51 +43,51 @@ StandardHttpRequest::StandardHttpRequest(const URI& uri, HttpMethod method) :
4943
}
5044
}
5145

52-
HeaderValueCollection StandardHttpRequest::GetHeaders() const
46+
Aws::Http::HeaderValueCollection Aws::Http::Standard::StandardHttpRequest::GetHeaders() const
5347
{
5448
HeaderValueCollection headers;
5549

56-
for (HeaderValueCollection::const_iterator iter = headerMap.begin(); iter != headerMap.end(); ++iter)
50+
for (const auto & iter : headerMap)
5751
{
58-
headers.emplace(HeaderValuePair(iter->first, iter->second));
52+
headers.emplace(HeaderValuePair(iter.first, iter.second));
5953
}
6054

6155
return headers;
6256
}
6357

64-
const Aws::String& StandardHttpRequest::GetHeaderValue(const char* headerName) const
58+
const Aws::String& Aws::Http::Standard::StandardHttpRequest::GetHeaderValue(const char* headerName) const
6559
{
66-
auto iter = headerMap.find(StringUtils::ToLower(headerName));
60+
auto iter = headerMap.find(Utils::StringUtils::ToLower(headerName));
6761
assert (iter != headerMap.end());
6862
if (iter == headerMap.end()) {
69-
AWS_LOGSTREAM_ERROR(STANDARD_HTTP_REQUEST_LOG_TAG, "Requested a header value for a missing header key: " << headerName);
70-
static const Aws::String EMPTY_STRING = "";
63+
AWS_LOGSTREAM_ERROR(STANDARD_HTTP_REQUEST_LOG_TAG, "Requested a header value for a missing header key: " << headerName)
64+
static const Aws::String EMPTY_STRING;
7165
return EMPTY_STRING;
7266
}
7367
return iter->second;
7468
}
7569

76-
void StandardHttpRequest::SetHeaderValue(const char* headerName, const Aws::String& headerValue)
70+
void Aws::Http::Standard::StandardHttpRequest::SetHeaderValue(const char* headerName, const Aws::String& headerValue)
7771
{
78-
headerMap[StringUtils::ToLower(headerName)] = StringUtils::Trim(headerValue.c_str());
72+
headerMap[Utils::StringUtils::ToLower(headerName)] = Utils::StringUtils::Trim(headerValue.c_str());
7973
}
8074

81-
void StandardHttpRequest::SetHeaderValue(const Aws::String& headerName, const Aws::String& headerValue)
82-
{
83-
headerMap[StringUtils::ToLower(headerName.c_str())] = StringUtils::Trim(headerValue.c_str());
75+
void Aws::Http::Standard::StandardHttpRequest::SetHeaderValue(const Aws::String &headerName, const Aws::String &headerValue) {
76+
77+
headerMap[Utils::StringUtils::ToLower(headerName.c_str())] = Utils::StringUtils::Trim(headerValue.c_str());
8478
}
8579

86-
void StandardHttpRequest::DeleteHeader(const char* headerName)
80+
void Aws::Http::Standard::StandardHttpRequest::DeleteHeader(const char* headerName)
8781
{
88-
headerMap.erase(StringUtils::ToLower(headerName));
82+
headerMap.erase(Utils::StringUtils::ToLower(headerName));
8983
}
9084

91-
bool StandardHttpRequest::HasHeader(const char* headerName) const
85+
bool Aws::Http::Standard::StandardHttpRequest::HasHeader(const char* headerName) const
9286
{
93-
return headerMap.find(StringUtils::ToLower(headerName)) != headerMap.end();
87+
return headerMap.find(Utils::StringUtils::ToLower(headerName)) != headerMap.end();
9488
}
9589

96-
int64_t StandardHttpRequest::GetSize() const
90+
int64_t Aws::Http::Standard::StandardHttpRequest::GetSize() const
9791
{
9892
int64_t size = 0;
9993

@@ -102,12 +96,12 @@ int64_t StandardHttpRequest::GetSize() const
10296
return size;
10397
}
10498

105-
const Aws::IOStreamFactory& StandardHttpRequest::GetResponseStreamFactory() const
99+
const Aws::IOStreamFactory& Aws::Http::Standard::StandardHttpRequest::GetResponseStreamFactory() const
106100
{
107101
return m_responseStreamFactory;
108102
}
109103

110-
void StandardHttpRequest::SetResponseStreamFactory(const Aws::IOStreamFactory& factory)
104+
void Aws::Http::Standard::StandardHttpRequest::SetResponseStreamFactory(const Aws::IOStreamFactory& factory)
111105
{
112106
m_responseStreamFactory = factory;
113107
}

0 commit comments

Comments
 (0)