Ver a proveniência

Merge pull request #903 from LazyWolfLin:dev_random

PiperOrigin-RevId: 420532625
main
Victor Costan há 2 anos
ascendente
cometimento
42cf899927
1 ficheiros alterados com 1 adições e 1 eliminações
  1. +1
    -1
      db/skiplist.h

+ 1
- 1
db/skiplist.h Ver ficheiro

@ -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
Guardar