| 223 | } |
| 224 | |
| 225 | inline int32_t AppendFloat(int8_t* buf_ptr, uint32_t buf_size, float val, |
| 226 | uint32_t field_offset) { |
| 227 | if (field_offset + 4 > buf_size) { |
| 228 | return -1; |
| 229 | } |
| 230 | *(reinterpret_cast<float*>(buf_ptr + field_offset)) = val; |
| 231 | return 4; |
| 232 | } |
| 233 | |
| 234 | inline int32_t AppendInt32(int8_t* buf_ptr, uint32_t buf_size, int32_t val, |
| 235 | uint32_t field_offset) { |
no outgoing calls
no test coverage detected