瀏覽代碼

Small fix.

Use function instead of original expression.
master
LazyWolfLin 3 年之前
父節點
當前提交
3806fbc23c
共有 1 個檔案被更改,包括 1 行新增1 行删除
  1. +1
    -1
      db/skiplist.h

+ 1
- 1
db/skiplist.h 查看文件

@ -243,7 +243,7 @@ int SkipList::RandomHeight() {
// Increase height with probability 1 in kBranching
static const unsigned int kBranching = 4;
int height = 1;
while (height < kMaxHeight && ((rnd_.Next() % kBranching) == 0)) {
while (height < kMaxHeight && rnd_.OneIn(kBranching)) {
height++;
}
assert(height > 0);

Loading…
取消
儲存