Skip to content

Commit b5b3736

Browse files
author
Marco Magdy
committed
More linter issues
1 parent a9e9b0d commit b5b3736

File tree

3 files changed

+20
-20
lines changed

3 files changed

+20
-20
lines changed

include/aws/http/response.h

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,12 @@ class response {
3131
* lower-case the name but store the value as is
3232
*/
3333
inline void add_header(std::string name, std::string const& value);
34-
inline void append_body(const char* p, size_t sz);
34+
inline void append_body(const char* payload, size_t payload_size);
3535
inline bool has_header(char const* header) const;
3636
inline lambda_runtime::outcome<std::string, bool> get_header(char const* header) const;
3737
inline response_code get_response_code() const { return m_response_code; }
38-
inline void set_response_code(aws::http::response_code c);
39-
inline void set_content_type(char const* ct);
38+
inline void set_response_code(aws::http::response_code code);
39+
inline void set_content_type(char const* content);
4040
inline std::string const& get_body() const;
4141

4242
private:
@@ -125,14 +125,14 @@ enum class response_code {
125125
NETWORK_CONNECT_TIMEOUT = 599
126126
};
127127

128-
inline void response::set_response_code(http::response_code c)
128+
inline void response::set_response_code(http::response_code code)
129129
{
130-
m_response_code = c;
130+
m_response_code = code;
131131
}
132132

133-
inline void response::set_content_type(char const* ct)
133+
inline void response::set_content_type(char const* content_type)
134134
{
135-
m_content_type = ct;
135+
m_content_type = content_type;
136136
}
137137

138138
inline std::string const& response::get_body() const
@@ -145,34 +145,34 @@ inline void response::add_header(std::string name, std::string const& value)
145145
m_headers.emplace_back(std::move(name), value);
146146
}
147147

148-
inline void response::append_body(const char* p, size_t sz)
148+
inline void response::append_body(const char* payload, size_t payload_size)
149149
{
150150
// simple and generates significantly less code than std::stringstream
151151
constexpr size_t min_capacity = 512;
152152
if (m_body.capacity() < min_capacity) {
153153
m_body.reserve(min_capacity);
154154
}
155155

156-
m_body.append(p, sz);
156+
m_body.append(payload, payload_size);
157157
}
158158

159159
inline bool response::has_header(char const* header) const
160160
{
161-
return std::any_of(m_headers.begin(), m_headers.end(), [header](std::pair<std::string, std::string> const& p) {
162-
return p.first == header;
161+
return std::any_of(m_headers.begin(), m_headers.end(), [header](std::pair<std::string, std::string> const& item) {
162+
return item.first == header;
163163
});
164164
}
165165

166166
inline lambda_runtime::outcome<std::string, bool> response::get_header(char const* header) const
167167
{
168-
auto it = std::find_if(m_headers.begin(), m_headers.end(), [header](std::pair<std::string, std::string> const& p) {
169-
return p.first == header;
168+
auto iter = std::find_if(m_headers.begin(), m_headers.end(), [header](std::pair<std::string, std::string> const& item) {
169+
return item.first == header;
170170
});
171171

172-
if (it == m_headers.end()) {
172+
if (iter == m_headers.end()) {
173173
return false;
174174
}
175-
return it->second;
175+
return iter->second;
176176
}
177177

178178
} // namespace http

include/aws/lambda-runtime/outcome.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@ namespace lambda_runtime {
2323
template <typename TResult, typename TFailure>
2424
class outcome {
2525
public:
26-
outcome(TResult const& s) : m_s(s), m_success(true) {}
27-
outcome(TResult&& s) : m_s(std::move(s)), m_success(true) {}
26+
outcome(TResult const& success) : m_s(success), m_success(true) {}
27+
outcome(TResult&& success) : m_s(std::move(success)), m_success(true) {}
2828

29-
outcome(TFailure const& f) : m_f(f), m_success(false) {}
30-
outcome(TFailure&& f) : m_f(std::move(f)), m_success(false) {}
29+
outcome(TFailure const& failure) : m_f(failure), m_success(false) {}
30+
outcome(TFailure&& failure) : m_f(std::move(failure)), m_success(false) {}
3131

3232
outcome(outcome const& other) : m_success(other.m_success)
3333
{

include/aws/logging/logging.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ enum class verbosity {
2525
debug,
2626
};
2727

28-
void log(verbosity v, char const* tag, char const* msg, va_list args);
28+
void log(verbosity verbosity, char const* tag, char const* msg, va_list args);
2929

3030
[[gnu::format(printf, 2, 3)]] inline void log_error(char const* tag, char const* msg, ...)
3131
{

0 commit comments

Comments
 (0)