@@ -456,7 +456,7 @@ void MiddleWaveletIterator::skip(size_t pos) {
456456
457457 int numJumps = 0 ;
458458 unsigned int posLeft = pos;
459- while ((numJumps<pos)&&(posZ<maxZ)){
459+ while ((numJumps<0 || static_cast < size_t >(numJumps)< pos)&&(posZ<maxZ)){
460460 if ((posZ+posLeft)>nextZ) {
461461 numJumps += (nextZ-posZ)+1 ; // count current jump
462462 predicateOcurrence++; // jump to the next occurrence
@@ -611,7 +611,7 @@ void IteratorY::updateOutput() {
611611
612612bool IteratorY::hasNext ()
613613{
614- return nextY!=-1 || posZ<=nextZ;
614+ return nextY!=( size_t ) -1 || posZ<=nextZ;
615615}
616616
617617TripleID *IteratorY::next ()
@@ -639,7 +639,7 @@ TripleID *IteratorY::next()
639639
640640bool IteratorY::hasPrevious ()
641641{
642- return prevY!=-1 || posZ>=prevZ;
642+ return prevY!=( size_t ) -1 || posZ>=prevZ;
643643}
644644
645645TripleID *IteratorY::previous ()
@@ -785,7 +785,7 @@ void ObjectIndexIterator::updateOutput() {
785785
786786bool ObjectIndexIterator::hasNext ()
787787{
788- return posIndex <= maxIndex && maxIndex >= 0 ;
788+ return maxIndex >= 0 && posIndex <= static_cast < size_t >(maxIndex) ;
789789}
790790
791791TripleID *ObjectIndexIterator::next ()
@@ -804,7 +804,7 @@ TripleID *ObjectIndexIterator::next()
804804
805805bool ObjectIndexIterator::hasPrevious ()
806806{
807- return posIndex>minIndex;
807+ return minIndex< 0 || posIndex>static_cast < size_t >( minIndex) ;
808808}
809809
810810TripleID *ObjectIndexIterator::previous ()
0 commit comments