X-Git-Url: http://git.nguyen.vg/gitweb/?a=blobdiff_plain;f=libcds%2Fsrc%2Fstatic_sequence%2Fwt_node_internal.cpp;h=16dc441715ad4f0a0ed8743e38f9065d1623b03b;hb=bbeeb03980ddf51c0f32fd3c42321dc9ef708c27;hp=6f67501ecc6e96357870f479e08ba9cfc887796e;hpb=6a9117a97674437c9fe00b099c40ccb61d45d704;p=SXSI%2FXMLTree.git diff --git a/libcds/src/static_sequence/wt_node_internal.cpp b/libcds/src/static_sequence/wt_node_internal.cpp index 6f67501..16dc441 100644 --- a/libcds/src/static_sequence/wt_node_internal.cpp +++ b/libcds/src/static_sequence/wt_node_internal.cpp @@ -183,7 +183,7 @@ uint wt_node_internal::rankLessThan(uint &symbol, uint pos, uint l, wt_coder * c // 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); } @@ -195,11 +195,11 @@ uint wt_node_internal::rankLessThan(uint &symbol, uint pos) 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; }