Skip to content

Commit

Permalink
fix warning
Browse files Browse the repository at this point in the history
  • Loading branch information
hendrikmuhs committed Jun 16, 2024
1 parent c0f246f commit 9f4229c
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions keyvi/include/keyvi/util/vint.h
Original file line number Diff line number Diff line change
Expand Up @@ -145,13 +145,11 @@ void encodeVarInt(int_t value, buffer_t* output, size_t* written_bytes) {
*/
template <typename int_t = uint64_t, typename buffer_t>
void encodeVarInt(int_t value, buffer_t* output) {
size_t length = 0;
while (value > 127) {
// |128: Set the next byte flag
output->push_back(((uint8_t)(value & 127)) | 128);
// Remove the seven bits we just wrote
value >>= 7;
++length;
}
output->push_back(((uint8_t)value) & 127);
}
Expand Down

0 comments on commit 9f4229c

Please sign in to comment.