Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: remove humlib compiler warnings #3944

Merged
merged 1 commit into from
Feb 7, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/hum/humlib.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5823,7 +5823,7 @@ string Convert::generateRandomId(int length) {
const string characters = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
std::random_device rd; // Non-deterministic generator
std::mt19937 gen(rd()); // Seed the generator
std::uniform_int_distribution<> distr(0, characters.size() - 1);
std::uniform_int_distribution<> distr(0, (int)characters.size() - 1);
string randomId;
std::generate_n(std::back_inserter(randomId), length, [&]() {
return characters[distr(gen)];
Expand Down Expand Up @@ -27840,7 +27840,7 @@ int HumdrumFileStream::getFile(HumdrumFile& infile) {
break;
}

int len = templine.length();
int len = (int)templine.length();
if ((len > 4) && (templine.compare(0, 4, "!!!!") == 0) &&
(templine[4] != '!') &&
(dataFoundQ == 0) &&
Expand Down Expand Up @@ -120426,7 +120426,7 @@ void Tool_prange::assignHorizontalPosition(vector<_VoiceInfo>& voiceInfo, int mi

if (hpos.size() > 2) {
for (int i=1; i<(int)hpos.size()-1; i++) {
int ii = hpos.size() - i - 1;
int ii = (int)hpos.size() - i - 1;
hpos[i] = (double)ii / (hpos.size()-1) * (maxval - minval) + minval;
}
}
Expand Down Expand Up @@ -120939,7 +120939,7 @@ int Tool_prange::getTopQuartile(vector<double>& midibins) {

double cumsum = 0.0;
int i;
for (i=midibins.size()-1; i>=0; i--) {
for (i=(int)midibins.size()-1; i>=0; i--) {
if (midibins[i] <= 0.0) {
continue;
}
Expand Down Expand Up @@ -121037,7 +121037,7 @@ int Tool_prange::getStaffBase7(int base7) {
//

int Tool_prange::getMaxDiatonicIndex(vector<vector<double>>& diatonic) {
for (int i=diatonic.size()-1; i>=0; i--) {
for (int i=(int)diatonic.size()-1; i>=0; i--) {
if (diatonic.at(i).at(0) != 0.0) {
return i;
}
Expand Down