| 394 | } |
| 395 | |
| 396 | bool GetBool(bool* value) { |
| 397 | if (type_ != kBool) { |
| 398 | return false; |
| 399 | } |
| 400 | if (fsize_ == 0) { |
| 401 | return true; |
| 402 | } |
| 403 | if (offset_ + 1 > bsize_) { |
| 404 | return false; |
| 405 | } |
| 406 | |
| 407 | uint8_t bool_value = 0; |
| 408 | memcpy(static_cast<void*>(&bool_value), buffer_, 1); |
| 409 | buffer_ += 1; |
| 410 | offset_ += 1; |
| 411 | if (bool_value == 1) { |
| 412 | *value = true; |
| 413 | } else { |
| 414 | *value = false; |
| 415 | } |
| 416 | return true; |
| 417 | } |
| 418 | |
| 419 | bool GetInt64(int64_t* value) { |
| 420 | if (type_ != kInt64) { |
nothing calls this directly
no outgoing calls
no test coverage detected