Skip to content

Commit fa5fe6b

Browse files
committed
Fixed compiler warnings
1 parent 91c18fe commit fa5fe6b

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

src/drawing.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ namespace Drawing {
213213
float width;
214214
if ((int) mmVector.size() <= opts.snp_threshold) {
215215
float mms = xScaling * mmScaling;
216-
width = (mmVector.size() < opts.snp_threshold) ? ((1. > mms) ? 1. : mms) : xScaling;
216+
width = ((int)mmVector.size() < opts.snp_threshold) ? ((1. > mms) ? 1. : mms) : xScaling;
217217
} else {
218218
width = xScaling;
219219
}

src/plot_commands.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ namespace Commands {
135135
Term::printSelectedSam(p->selectedAlign, out);
136136
} else if (parts.size() == 3 && (Utils::endsWith(parts[2], ".sam") || Utils::endsWith(parts[2], ".bam") || Utils::endsWith(parts[2], ".cram"))) {
137137
std::string o_str = parts[2];
138-
if (p->headers.empty() || p->regionSelection >= p->headers.size()) {
138+
if (p->headers.empty() || p->regionSelection >= (int)p->headers.size()) {
139139
return Err::SILENT;
140140
}
141141
sam_hdr_t *hdr = sam_hdr_dup(p->headers[p->regionSelection]);
@@ -1488,7 +1488,7 @@ namespace Commands {
14881488

14891489
Err header_command(Plot* p, std::string& command, std::vector<std::string> parts, std::ostream& out) {
14901490
p->redraw = true;
1491-
if (p->headers.empty() || p->regionSelection >= p->headers.size()) {
1491+
if (p->headers.empty() || p->regionSelection >= (int)p->headers.size()) {
14921492
return Err::SILENT;
14931493
}
14941494
sam_hdr_t *hdr = p->headers[p->regionSelection];

src/plot_controls.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -548,7 +548,7 @@ namespace Manager {
548548
if (variantTracks.empty()) {
549549
variantFileSelection = -1;
550550
mode = Show::SINGLE;
551-
} else if (variantFileSelection > variantTracks.size()) {
551+
} else if (variantFileSelection > (int)variantTracks.size()) {
552552
variantFileSelection = 0;
553553
}
554554
// for (auto &trk: variantTracks) {

src/utils.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -480,7 +480,7 @@ namespace Utils {
480480
}
481481

482482
std::string & Label::current() {
483-
if (labels.empty() || i >= labels.size()) {
483+
if (labels.empty() || i >= (int)labels.size()) {
484484
throw std::runtime_error("Label::current tried to use an invalid label list");
485485
}
486486
return labels[i];

0 commit comments

Comments
 (0)