X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=folly%2FGroupVarint.h;h=9652a4d1ad185967dac209184305841e56b18005;hb=d1af84b686a8eb9a360c28bedac3cee2a0a3f5f0;hp=8160c380b9e08ad24a3751e17c4bc192c1555782;hpb=ed8c80a0e0988e4ce687f51ca832a00e4a6b7930;p=folly.git diff --git a/folly/GroupVarint.h b/folly/GroupVarint.h index 8160c380..9652a4d1 100644 --- a/folly/GroupVarint.h +++ b/folly/GroupVarint.h @@ -549,7 +549,7 @@ class GroupVarintDecoder { bool next(type* val) { if (pos_ == count_) { // refill - size_t rem = end_ - p_; + size_t rem = size_t(end_ - p_); if (rem == 0 || remaining_ == 0) { return false; } @@ -581,7 +581,7 @@ class GroupVarintDecoder { } } else { // Can't decode a full group - count_ = Base::partialCount(p_, end_ - p_); + count_ = Base::partialCount(p_, size_t(end_ - p_)); if (remaining_ >= count_) { remaining_ -= count_; p_ = end_; @@ -604,7 +604,7 @@ class GroupVarintDecoder { CHECK(pos_ == count_ && (p_ == end_ || remaining_ == 0)); // p_ may point to the internal buffer (tmp_), but we want // to return subpiece of the original data - size_t size = end_ - p_; + size_t size = size_t(end_ - p_); return StringPiece(rrest_ - size, rrest_); }