瀏覽代碼

Merge pull request #1202 from pkasting/main

[jumbo] Add begin()/end() to Slice.
main
Austin Sullivan 3 月之前
committed by GitHub
父節點
當前提交
23e35d792b
沒有發現已知的金鑰在資料庫的簽署中 GPG 金鑰 ID: B5690EEEBB952194
共有 1 個檔案被更改,包括 3 行新增0 行删除
  1. +3
    -0
      include/leveldb/slice.h

+ 3
- 0
include/leveldb/slice.h 查看文件

@ -51,6 +51,9 @@ class LEVELDB_EXPORT Slice {
// Return true iff the length of the referenced data is zero
bool empty() const { return size_ == 0; }
const char* begin() const { return data(); }
const char* end() const { return data() + size(); }
// Return the ith byte in the referenced data.
// REQUIRES: n < size()
char operator[](size_t n) const {

Loading…
取消
儲存