Skip to content

Commit

Permalink
style: do not use trail return type
Browse files Browse the repository at this point in the history
  • Loading branch information
longfar-ncy committed Apr 24, 2024
1 parent 7403c97 commit 4fb1e51
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/storage/src/batch.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ class Batch {

virtual void Put(ColumnFamilyIndex cf_idx, const Slice& key, const Slice& val) = 0;
virtual void Delete(ColumnFamilyIndex cf_idx, const Slice& key) = 0;
virtual auto Commit() -> Status = 0;
auto Count() const -> int32_t { return cnt_; }
virtual Status Commit() = 0;
int32_t Count() const { return cnt_; }

static auto CreateBatch(Redis* redis) -> std::unique_ptr<Batch>;

Expand All @@ -50,7 +50,7 @@ class RocksBatch : public Batch {
batch_.Delete(handles_[cf_idx], key);
cnt_++;
}
auto Commit() -> Status override { return db_->Write(options_, &batch_); }
Status Commit() override { return db_->Write(options_, &batch_); }

private:
rocksdb::WriteBatch batch_;
Expand Down

0 comments on commit 4fb1e51

Please sign in to comment.