浏览代码

Small fix.

Use function instead of original expression.
main
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);

正在加载...
取消
保存