| 232 | } |
| 233 | |
| 234 | inline int32_t AppendInt32(int8_t* buf_ptr, uint32_t buf_size, int32_t val, |
| 235 | uint32_t field_offset) { |
| 236 | if (field_offset + 4 > buf_size) { |
| 237 | return -1; |
| 238 | } |
| 239 | *(reinterpret_cast<int32_t*>(buf_ptr + field_offset)) = val; |
| 240 | return 4; |
| 241 | } |
| 242 | |
| 243 | inline int32_t AppendInt64(int8_t* buf_ptr, uint32_t buf_size, int64_t val, |
| 244 | uint32_t field_offset) { |
no outgoing calls
no test coverage detected