Ver código fonte

Small fix.

Use function instead of original expression.
pull/1/head
LazyWolfLin 3 anos atrás
pai
commit
3806fbc23c
1 arquivos alterados com 1 adições e 1 exclusões
  1. +1
    -1
      db/skiplist.h

+ 1
- 1
db/skiplist.h Ver arquivo

@ -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);

Carregando…
Cancelar
Salvar