Sfoglia il codice sorgente

Small fix.

Use function instead of original expression.
main
LazyWolfLin 3 anni fa
parent
commit
3806fbc23c
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. +1
    -1
      db/skiplist.h

+ 1
- 1
db/skiplist.h Vedi File

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

Caricamento…
Annulla
Salva