Skip to content

Commit

Permalink
Fixed compiler warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
kcleal committed Jul 26, 2024
1 parent 91c18fe commit fa5fe6b
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/drawing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ namespace Drawing {
float width;
if ((int) mmVector.size() <= opts.snp_threshold) {
float mms = xScaling * mmScaling;
width = (mmVector.size() < opts.snp_threshold) ? ((1. > mms) ? 1. : mms) : xScaling;
width = ((int)mmVector.size() < opts.snp_threshold) ? ((1. > mms) ? 1. : mms) : xScaling;
} else {
width = xScaling;
}
Expand Down
4 changes: 2 additions & 2 deletions src/plot_commands.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ namespace Commands {
Term::printSelectedSam(p->selectedAlign, out);
} else if (parts.size() == 3 && (Utils::endsWith(parts[2], ".sam") || Utils::endsWith(parts[2], ".bam") || Utils::endsWith(parts[2], ".cram"))) {
std::string o_str = parts[2];
if (p->headers.empty() || p->regionSelection >= p->headers.size()) {
if (p->headers.empty() || p->regionSelection >= (int)p->headers.size()) {
return Err::SILENT;
}
sam_hdr_t *hdr = sam_hdr_dup(p->headers[p->regionSelection]);
Expand Down Expand Up @@ -1488,7 +1488,7 @@ namespace Commands {

Err header_command(Plot* p, std::string& command, std::vector<std::string> parts, std::ostream& out) {
p->redraw = true;
if (p->headers.empty() || p->regionSelection >= p->headers.size()) {
if (p->headers.empty() || p->regionSelection >= (int)p->headers.size()) {
return Err::SILENT;
}
sam_hdr_t *hdr = p->headers[p->regionSelection];
Expand Down
2 changes: 1 addition & 1 deletion src/plot_controls.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -548,7 +548,7 @@ namespace Manager {
if (variantTracks.empty()) {
variantFileSelection = -1;
mode = Show::SINGLE;
} else if (variantFileSelection > variantTracks.size()) {
} else if (variantFileSelection > (int)variantTracks.size()) {
variantFileSelection = 0;
}
// for (auto &trk: variantTracks) {
Expand Down
2 changes: 1 addition & 1 deletion src/utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,7 @@ namespace Utils {
}

std::string & Label::current() {
if (labels.empty() || i >= labels.size()) {
if (labels.empty() || i >= (int)labels.size()) {
throw std::runtime_error("Label::current tried to use an invalid label list");
}
return labels[i];
Expand Down

0 comments on commit fa5fe6b

Please sign in to comment.