Skips a single value in the input stream. Dispatches to the appropriately typed field skipper based on the schema type tag. This is not as permissive as just handling the wire type.
| 414 | // typed field skipper based on the schema type tag. This is not as permissive |
| 415 | // as just handling the wire type. |
| 416 | static bool SkipValue(CodedInputStream* input, const FieldInfo& field) { |
| 417 | uint32 tmp32; |
| 418 | protobuf_uint64 tmp64; |
| 419 | switch (field.type) { |
| 420 | case WireFormatLite::TYPE_DOUBLE: |
| 421 | return input->ReadLittleEndian64(&tmp64); |
| 422 | case WireFormatLite::TYPE_FLOAT: |
| 423 | return input->ReadLittleEndian32(&tmp32); |
| 424 | case WireFormatLite::TYPE_INT64: |
| 425 | return input->ReadVarint64(&tmp64); |
| 426 | case WireFormatLite::TYPE_UINT64: |
| 427 | return input->ReadVarint64(&tmp64); |
| 428 | case WireFormatLite::TYPE_INT32: |
| 429 | return input->ReadVarint32(&tmp32); |
| 430 | case WireFormatLite::TYPE_FIXED64: |
| 431 | return input->ReadLittleEndian64(&tmp64); |
| 432 | case WireFormatLite::TYPE_FIXED32: |
| 433 | return input->ReadLittleEndian32(&tmp32); |
| 434 | case WireFormatLite::TYPE_BOOL: |
| 435 | return input->ReadVarint32(&tmp32); |
| 436 | case WireFormatLite::TYPE_STRING: |
| 437 | return SkipBytes(input); |
| 438 | case WireFormatLite::TYPE_GROUP: |
| 439 | return WireFormatLite::SkipField( |
| 440 | input, WireFormatLite::MakeTag( |
| 441 | field.number, WireFormatLite::WIRETYPE_START_GROUP)); |
| 442 | case WireFormatLite::TYPE_MESSAGE: |
| 443 | return SkipBytes(input); |
| 444 | case WireFormatLite::TYPE_BYTES: |
| 445 | return SkipBytes(input); |
| 446 | case WireFormatLite::TYPE_UINT32: |
| 447 | return input->ReadVarint32(&tmp32); |
| 448 | case WireFormatLite::TYPE_ENUM: |
| 449 | return input->ReadVarint32(&tmp32); |
| 450 | case WireFormatLite::TYPE_SFIXED32: |
| 451 | return input->ReadLittleEndian32(&tmp32); |
| 452 | case WireFormatLite::TYPE_SFIXED64: |
| 453 | return input->ReadLittleEndian64(&tmp64); |
| 454 | case WireFormatLite::TYPE_SINT32: |
| 455 | return input->ReadVarint32(&tmp32); |
| 456 | case WireFormatLite::TYPE_SINT64: |
| 457 | return input->ReadVarint64(&tmp64); |
| 458 | // default: intentionally omitted in order to enable static checking. |
| 459 | } |
| 460 | } |
| 461 | |
| 462 | int32* count_ptr_ = nullptr; |
| 463 | }; |
nothing calls this directly
no test coverage detected