Skip to content

Commit 4c3b119

Browse files
committed
Code format
1 parent 6de8684 commit 4c3b119

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

httplib.h

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1674,7 +1674,8 @@ class decompressor {
16741674

16751675
// 15 is the value of wbits, which should be at the maximum possible value
16761676
// to ensure that any gzip stream can be decoded. The offset of 32 specifies
1677-
// that the stream type should be automatically detected either gzip or deflate.
1677+
// that the stream type should be automatically detected either gzip or
1678+
// deflate.
16781679
is_valid_ = inflateInit2(&strm, 32 + 15) == Z_OK;
16791680
}
16801681

@@ -1874,8 +1875,8 @@ bool read_content(Stream &strm, T &x, size_t payload_max_length, int &status,
18741875
decompressor decompressor;
18751876

18761877
std::string content_encoding = x.get_header_value("Content-Encoding");
1877-
if (content_encoding.find("gzip") != std::string::npos
1878-
|| content_encoding.find("deflate") != std::string::npos) {
1878+
if (content_encoding.find("gzip") != std::string::npos ||
1879+
content_encoding.find("deflate") != std::string::npos) {
18791880
if (!decompressor.is_valid()) {
18801881
status = 500;
18811882
return false;
@@ -4125,11 +4126,9 @@ Client::Post(const char *path, const Headers &headers, size_t content_length,
41254126
content_type);
41264127
}
41274128

4128-
41294129
inline std::shared_ptr<Response>
41304130
Client::Post(const char *path, const Headers &headers, const Params &params) {
4131-
std::string query = detail::params_to_query_str(params);
4132-
4131+
auto query = detail::params_to_query_str(params);
41334132
return Post(path, headers, query, "application/x-www-form-urlencoded");
41344133
}
41354134

@@ -4201,8 +4200,7 @@ inline std::shared_ptr<Response> Client::Put(const char *path,
42014200

42024201
inline std::shared_ptr<Response>
42034202
Client::Put(const char *path, const Headers &headers, const Params &params) {
4204-
std::string query = detail::params_to_query_str(params);
4205-
4203+
auto query = detail::params_to_query_str(params);
42064204
return Put(path, headers, query, "application/x-www-form-urlencoded");
42074205
}
42084206

0 commit comments

Comments
 (0)