This is an automated email from the ASF dual-hosted git repository.

twice pushed a commit to branch unstable
in repository https://gitbox.apache.org/repos/asf/kvrocks.git


The following commit(s) were added to refs/heads/unstable by this push:
     new b12e0b4b7 chore: fix format issue between different clang-format 
versions (#3250)
b12e0b4b7 is described below

commit b12e0b4b70e29c1f2e607b42ed9b4ac66335f916
Author: Twice <[email protected]>
AuthorDate: Sun Nov 9 09:40:04 2025 +0800

    chore: fix format issue between different clang-format versions (#3250)
    
    Previously in
    https://github.com/apache/kvrocks/pull/3237#issuecomment-3449317460
    @git-hulk mentioned that the formated code are different via
    clang-format 18.1.3 and clang-format 18.1.8.
    
    This is introduced by
    
https://github.com/llvm/llvm-project/commit/3ceccbdb19959ae3068710cbcb99c41342c0774c.
    
    Basically we can fix (workaround) it by removing the colon after the
    ctor, and then the format result should be same in both versions.
---
 src/commands/command_parser.h  | 2 +-
 src/common/rdb_stream.h        | 4 ++--
 src/search/ir.h                | 2 +-
 src/storage/rdb/rdb.h          | 2 +-
 src/storage/rdb/rdb_intset.h   | 2 +-
 src/storage/rdb/rdb_listpack.h | 2 +-
 src/storage/rdb/rdb_ziplist.h  | 2 +-
 src/storage/rdb/rdb_zipmap.h   | 2 +-
 src/types/bloom_filter.h       | 2 +-
 src/types/redis_stream_base.h  | 2 +-
 10 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/src/commands/command_parser.h b/src/commands/command_parser.h
index 89ec57519..d34be5ea4 100644
--- a/src/commands/command_parser.h
+++ b/src/commands/command_parser.h
@@ -33,7 +33,7 @@
 
 template <typename Iter>
 struct MoveIterator : Iter {
-  explicit MoveIterator(Iter iter) : Iter(iter){};
+  explicit MoveIterator(Iter iter) : Iter(iter) {}
 
   typename Iter::value_type&& operator*() const { return 
std::move(this->Iter::operator*()); }
 };
diff --git a/src/common/rdb_stream.h b/src/common/rdb_stream.h
index 004b5b897..eb2bc8eca 100644
--- a/src/common/rdb_stream.h
+++ b/src/common/rdb_stream.h
@@ -47,7 +47,7 @@ class RdbStream {
 
 class RdbStringStream : public RdbStream {
  public:
-  explicit RdbStringStream(std::string_view input) : input_(input){};
+  explicit RdbStringStream(std::string_view input) : input_(input) {}
   RdbStringStream(const RdbStringStream &) = delete;
   RdbStringStream &operator=(const RdbStringStream &) = delete;
   ~RdbStringStream() override = default;
@@ -65,7 +65,7 @@ class RdbStringStream : public RdbStream {
 class RdbFileStream : public RdbStream {
  public:
   explicit RdbFileStream(std::string file_name, size_t chunk_size = 1024 * 
1024)
-      : file_name_(std::move(file_name)), check_sum_(0), total_read_bytes_(0), 
max_read_chunk_size_(chunk_size){};
+      : file_name_(std::move(file_name)), check_sum_(0), total_read_bytes_(0), 
max_read_chunk_size_(chunk_size) {}
   RdbFileStream(const RdbFileStream &) = delete;
   RdbFileStream &operator=(const RdbFileStream &) = delete;
   ~RdbFileStream() override = default;
diff --git a/src/search/ir.h b/src/search/ir.h
index c7aec26ba..984dcb30f 100644
--- a/src/search/ir.h
+++ b/src/search/ir.h
@@ -232,7 +232,7 @@ struct NumericCompareExpr : BoolAtomExpr {
 struct VectorLiteral : Literal {
   std::vector<double> values;
 
-  explicit VectorLiteral(std::vector<double> &&values) : 
values(std::move(values)){};
+  explicit VectorLiteral(std::vector<double> &&values) : 
values(std::move(values)) {}
 
   std::string_view Name() const override { return "VectorLiteral"; }
   std::string Dump() const override {
diff --git a/src/storage/rdb/rdb.h b/src/storage/rdb/rdb.h
index 8865c5b8e..1a528540d 100644
--- a/src/storage/rdb/rdb.h
+++ b/src/storage/rdb/rdb.h
@@ -73,7 +73,7 @@ using RedisObjValue =
 class RDB {
  public:
   explicit RDB(engine::Storage *storage, std::string ns, 
std::unique_ptr<RdbStream> stream)
-      : storage_(storage), ns_(std::move(ns)), stream_(std::move(stream)){};
+      : storage_(storage), ns_(std::move(ns)), stream_(std::move(stream)) {}
   ~RDB() = default;
 
   Status VerifyPayloadChecksum(const std::string_view &payload);
diff --git a/src/storage/rdb/rdb_intset.h b/src/storage/rdb/rdb_intset.h
index 627615e55..b25836cac 100644
--- a/src/storage/rdb/rdb_intset.h
+++ b/src/storage/rdb/rdb_intset.h
@@ -26,7 +26,7 @@
 
 class IntSet {
  public:
-  explicit IntSet(std::string_view input) : input_(input){};
+  explicit IntSet(std::string_view input) : input_(input) {}
   ~IntSet() = default;
   StatusOr<std::vector<std::string>> Entries();
 
diff --git a/src/storage/rdb/rdb_listpack.h b/src/storage/rdb/rdb_listpack.h
index 9087769c6..debafd55f 100644
--- a/src/storage/rdb/rdb_listpack.h
+++ b/src/storage/rdb/rdb_listpack.h
@@ -26,7 +26,7 @@
 
 class ListPack {
  public:
-  explicit ListPack(std::string_view input) : input_(input){};
+  explicit ListPack(std::string_view input) : input_(input) {}
   ~ListPack() = default;
 
   StatusOr<uint32_t> Length();
diff --git a/src/storage/rdb/rdb_ziplist.h b/src/storage/rdb/rdb_ziplist.h
index 8f0d99c66..7f21fdc42 100644
--- a/src/storage/rdb/rdb_ziplist.h
+++ b/src/storage/rdb/rdb_ziplist.h
@@ -32,7 +32,7 @@ constexpr const uint8_t zlEnd = 0xFF;
 
 class ZipList {
  public:
-  explicit ZipList(std::string_view input) : input_(input){};
+  explicit ZipList(std::string_view input) : input_(input) {}
   ~ZipList() = default;
 
   StatusOr<std::string> Next();
diff --git a/src/storage/rdb/rdb_zipmap.h b/src/storage/rdb/rdb_zipmap.h
index 84fd09689..1bb5ee13f 100644
--- a/src/storage/rdb/rdb_zipmap.h
+++ b/src/storage/rdb/rdb_zipmap.h
@@ -27,7 +27,7 @@
 
 class ZipMap {
  public:
-  explicit ZipMap(std::string_view input) : input_(input){};
+  explicit ZipMap(std::string_view input) : input_(input) {}
   ~ZipMap() = default;
 
   StatusOr<std::pair<std::string, std::string>> Next();
diff --git a/src/types/bloom_filter.h b/src/types/bloom_filter.h
index 18c972514..76635cea6 100644
--- a/src/types/bloom_filter.h
+++ b/src/types/bloom_filter.h
@@ -92,7 +92,7 @@ StatusOr<BlockSplitBloomFilter> 
CreateBlockSplitBloomFilter(std::string& bitset)
 class BlockSplitBloomFilter {
  public:
   /// The constructor of BlockSplitBloomFilter. It uses XXH64 as hash function.
-  explicit BlockSplitBloomFilter(nonstd::span<char> data) : data_(data){};
+  explicit BlockSplitBloomFilter(nonstd::span<char> data) : data_(data) {}
 
   /// Calculate optimal size according to the number of distinct values and 
false
   /// positive probability.
diff --git a/src/types/redis_stream_base.h b/src/types/redis_stream_base.h
index 8bda122bb..e2d1998dc 100644
--- a/src/types/redis_stream_base.h
+++ b/src/types/redis_stream_base.h
@@ -94,7 +94,7 @@ class AutoGeneratedEntryID : public 
NextStreamEntryIDGenerationStrategy {
 
 class SpecificTimestampWithAnySequenceNumber : public 
NextStreamEntryIDGenerationStrategy {
  public:
-  explicit SpecificTimestampWithAnySequenceNumber(uint64_t ms) : ms_(ms){};
+  explicit SpecificTimestampWithAnySequenceNumber(uint64_t ms) : ms_(ms) {}
   ~SpecificTimestampWithAnySequenceNumber() override = default;
 
   Status GenerateID(const StreamEntryID &last_id, StreamEntryID *next_id) 
override;

Reply via email to