[CodeFormat] Clang-format cpp sources (#4965)

Clang-format all c++ source files.
This commit is contained in:
sduzh
2020-11-28 18:36:49 +08:00
committed by GitHub
parent f944bf4d44
commit 6fedf5881b
1331 changed files with 62548 additions and 68514 deletions

View File

@ -20,21 +20,16 @@
namespace doris {
std::ostream& operator<<(std::ostream& os, const HttpChunkParseCtx& ctx) {
os << "HttpChunkParseCtx("
<< "state=" << ctx.state
<< "size=" << ctx.size
<< "length=" << ctx.length
<< ")";
os << "HttpChunkParseCtx("
<< "state=" << ctx.state << "size=" << ctx.size << "length=" << ctx.length << ")";
return os;
}
#define CR ((uint8_t)'\r')
#define LF ((uint8_t)'\n')
HttpParser::ParseState HttpParser::http_parse_chunked(
const uint8_t** buf,
const int64_t buf_len,
HttpChunkParseCtx* ctx) {
HttpParser::ParseState HttpParser::http_parse_chunked(const uint8_t** buf, const int64_t buf_len,
HttpChunkParseCtx* ctx) {
enum ChunkParseState {
SW_CHUNK_START = 0,
SW_CHUNK_SIZE,
@ -242,9 +237,9 @@ HttpParser::ParseState HttpParser::http_parse_chunked(
ctx->length = 3 /* "0" LF LF */;
break;
case SW_CHUNK_SIZE:
ctx->length = 1 /* LF */
+ (ctx->size ? ctx->size + 4 /* LF "0" LF LF */
: 1 /* LF */);
ctx->length = 1 /* LF */
+ (ctx->size ? ctx->size + 4 /* LF "0" LF LF */
: 1 /* LF */);
break;
case SW_CHUNK_EXTENSION:
case SW_CHUNK_EXTENSION_ALMOST_DONE:
@ -274,4 +269,4 @@ HttpParser::ParseState HttpParser::http_parse_chunked(
return rc;
}
}
} // namespace doris