| 479 | } |
| 480 | |
| 481 | uint32_t Field::getUInt32() const { |
| 482 | switch (_type) { |
| 483 | case InternalType::Varint: |
| 484 | return static_cast<uint32_t>(_data.varint); |
| 485 | case InternalType::Fixed64: |
| 486 | return static_cast<uint32_t>(_data.fixed64); |
| 487 | case InternalType::Fixed32: |
| 488 | return _data.fixed32; |
| 489 | case InternalType::Unset: |
| 490 | case InternalType::Raw: |
| 491 | case InternalType::Ref: |
| 492 | return 0; |
| 493 | } |
| 494 | } |
| 495 | |
| 496 | void Field::setUInt32(uint32_t v) { |
| 497 | setVarint(v); |
no outgoing calls