Explorar el Código

Small fix.

Use function instead of original expression.
main
LazyWolfLin hace 3 años
padre
commit
3806fbc23c
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. +1
    -1
      db/skiplist.h

+ 1
- 1
db/skiplist.h Ver fichero

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

Cargando…
Cancelar
Guardar