Skip to content

Commit

Permalink
Fix warnings and deprecations.
Browse files Browse the repository at this point in the history
  • Loading branch information
plietar committed May 20, 2024
1 parent 254bce2 commit 75a0332
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Random.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ void Random::prop_sample_bucket(

// all probabilities are the same
if (heavy == n) {
for (auto i = 0; i < size; ++i) {
for (size_t i = 0; i < size; ++i) {
*result = (*rng)((uint64_t)n);
++result;
}
Expand Down Expand Up @@ -121,9 +121,9 @@ void Random::prop_sample_bucket(
}

// sample
for (auto i = 0; i < size; ++i) {
for (size_t i = 0; i < size; ++i) {
size_t bucket = (*rng)((uint64_t)n);
double acceptance = dqrng::uniform01((*rng)());
double acceptance = rng->uniform01();
*result = (acceptance < dividing_probs[bucket]) ? bucket :
alternative_index[bucket];
++result;
Expand Down

0 comments on commit 75a0332

Please sign in to comment.