Skip to content

Commit

Permalink
resolved prevent compiler freak out
Browse files Browse the repository at this point in the history
  • Loading branch information
84ds84d8s authored Apr 18, 2024
1 parent 4766e35 commit 3b40860
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions random_price.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,10 @@ float percentage_change_price(Stock & stock) {
while (true) {
float x = distribution(gen);
if (x < upper_limit and x > lower_limit) {
return x;
break;
}
}
// prevent compiler freak out
return distribution(gen);
return x;
}

unsigned int random_integer(unsigned int max_integer) {
Expand Down

0 comments on commit 3b40860

Please sign in to comment.