diff --git a/src/slopBed/slopBed.cpp b/src/slopBed/slopBed.cpp index 8da78f56cd7c70c173873eb8587bf34c99e07f90..a47e1764e31be7939b7af173a6da7430875bce41 100644 --- a/src/slopBed/slopBed.cpp +++ b/src/slopBed/slopBed.cpp @@ -62,20 +62,20 @@ void BedSlop::AddSlop(BED &bed) { if ( (_forceStrand) && (bed.strand == "-") ) { // inspect the start - if ((bed.start - _rightSlop) > 0) bed.start -= _rightSlop; + if ( (static_cast<int>(bed.start) - _rightSlop) > 0 ) bed.start -= _rightSlop; else bed.start = 0; // inspect the start - if ((bed.end + _leftSlop) <= chromSize) bed.end += _leftSlop; + if ( (static_cast<int>(bed.end) + _leftSlop) <= static_cast<int>(chromSize)) bed.end += _leftSlop; else bed.end = chromSize; } else { // inspect the start - if ((bed.start - _leftSlop) > 0) bed.start -= _leftSlop; + if ( (static_cast<int>(bed.start) - _leftSlop) > 0) bed.start -= _leftSlop; else bed.start = 0; // inspect the end - if ((bed.end + _rightSlop) <= chromSize) bed.end += _rightSlop; + if ( (static_cast<int>(bed.end) + _rightSlop) <= static_cast<int>(chromSize)) bed.end += _rightSlop; else bed.end = chromSize; } }