/*
- * Copyright 2016 Facebook, Inc.
+ * Copyright 2017 Facebook, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
*p++ = 0x80 | (val & 0x7f);
val >>= 7;
}
- *p++ = val;
- return p - buf;
+ *p++ = uint8_t(val);
+ return size_t(p - buf);
}
template <class T>
val |= static_cast<uint64_t>(*p++) << shift;
}
- data.advance(p - begin);
+ data.uncheckedAdvance(p - begin);
return val;
}