From f334cd371f58f30f98e5b3e46ba92a545809b811 Mon Sep 17 00:00:00 2001 From: jinjunzh Date: Mon, 16 May 2022 17:21:20 -0400 Subject: [PATCH] fixed code style issue --- src/Compression/CompressedWriteBuffer.cpp | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/src/Compression/CompressedWriteBuffer.cpp b/src/Compression/CompressedWriteBuffer.cpp index 52a7ea3c79e..5d5d3a7187c 100644 --- a/src/Compression/CompressedWriteBuffer.cpp +++ b/src/Compression/CompressedWriteBuffer.cpp @@ -1,11 +1,11 @@ #include #include -#include #include +#include -#include "CompressedWriteBuffer.h" #include +#include "CompressedWriteBuffer.h" namespace DB @@ -25,11 +25,11 @@ void CompressedWriteBuffer::nextImpl() UInt32 compressed_size = 0; size_t decompressed_size = offset(); UInt32 compressed_reserve_size = codec->getCompressedReserveSize(decompressed_size); - - if(out.available() > (compressed_reserve_size + CHECKSUM_SIZE)) + + if (out.available() > compressed_reserve_size + CHECKSUM_SIZE) { - char *out_checksum_ptr = out.position(); - char *out_compressed_ptr = out.position() + CHECKSUM_SIZE; + char * out_checksum_ptr = out.position(); + char * out_compressed_ptr = out.position() + CHECKSUM_SIZE; compressed_size = codec->compress(working_buffer.begin(), decompressed_size, out_compressed_ptr); CityHash_v1_0_2::uint128 checksum = CityHash_v1_0_2::CityHash128(out_compressed_ptr, compressed_size); @@ -52,10 +52,7 @@ CompressedWriteBuffer::~CompressedWriteBuffer() finalize(); } -CompressedWriteBuffer::CompressedWriteBuffer( - WriteBuffer & out_, - CompressionCodecPtr codec_, - size_t buf_size) +CompressedWriteBuffer::CompressedWriteBuffer(WriteBuffer & out_, CompressionCodecPtr codec_, size_t buf_size) : BufferWithOwnMemory(buf_size), out(out_), codec(std::move(codec_)) { }