| 214 | } |
| 215 | } |
| 216 | inline int32_t AppendInt16(int8_t* buf_ptr, uint32_t buf_size, int16_t val, |
| 217 | uint32_t field_offset) { |
| 218 | if (field_offset + 2 > buf_size) { |
| 219 | return -1; |
| 220 | } |
| 221 | *(reinterpret_cast<int16_t*>(buf_ptr + field_offset)) = val; |
| 222 | return 4; |
| 223 | } |
| 224 | |
| 225 | inline int32_t AppendFloat(int8_t* buf_ptr, uint32_t buf_size, float val, |
| 226 | uint32_t field_offset) { |
no outgoing calls
no test coverage detected