Skip to content

Commit

Permalink
vea parandamine MacOS-is
Browse files Browse the repository at this point in the history
  • Loading branch information
FLAK-ZOSO committed Aug 7, 2024
1 parent 010f984 commit 22e5313
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions dodas.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -168,10 +168,14 @@ int main(int argc, char** argv) {
music_th = std::thread([&]() {
int n, genre;
#ifdef __APPLE__
std::vector<int> extendedProb;
for (unsigned i=0; i<genresProb.size(); i++) {
for (unsigned j=0; j<genresProb[i]; j++) {
extendedProb.push_back(i+1);
}
}
while (!end) {
do {
genre = genresDistribution(rng);
} while (genre == 0);
genre = extendedProb[rand() % extendedProb.size()];
debug << "Genre: " << genre << std::endl;
n = (rand() % genresSize[genre]) + 1;
debug << "n: " << n << std::endl;
Expand Down

0 comments on commit 22e5313

Please sign in to comment.