// cout << "recursion to leftchild at l = " << l << ", symbol = " << (uchar)symbol << ", rank0 = " << bitmap->rank0(pos) << ", rank1 = " << bitmap->rank1(pos) << endl;
// check left child for symbols <= givenSymbol
- if (result != -1 || left_child == NULL)
+ if (result != (uint)-1 || left_child == NULL)
return result;
return left_child->rankLessThan(symbol, bitmap->rank0(pos)-1);
}
using std::endl;
// cout << "pos = " << pos << ", symbol = " << (uchar)symbol << endl;
- if (pos == -1)
- return -1;
+ if (pos == (uint)-1)
+ return (uint)-1;
if(right_child!=NULL)
result = right_child->rankLessThan(symbol, bitmap->rank1(pos)-1);
- if(result == -1 && left_child!=NULL)
+ if(result == (uint)-1 && left_child!=NULL)
return left_child->rankLessThan(symbol, bitmap->rank0(pos)-1);
return result;
}