| 506 | } |
| 507 | |
| 508 | uint32_t Field::getFixed32() const { |
| 509 | switch (_type) { |
| 510 | case InternalType::Varint: |
| 511 | return static_cast<uint32_t>(_data.varint); |
| 512 | case InternalType::Fixed64: |
| 513 | return static_cast<uint32_t>(_data.fixed64); |
| 514 | case InternalType::Fixed32: |
| 515 | return _data.fixed32; |
| 516 | case InternalType::Unset: |
| 517 | case InternalType::Raw: |
| 518 | case InternalType::Ref: |
| 519 | return 0; |
| 520 | } |
| 521 | } |
| 522 | |
| 523 | void Field::setFixed32(uint32_t v) { |
| 524 | FieldStorage storage; |
no outgoing calls