MCPcopy Create free account
hub / github.com/apache/brpc / add_empty_array_internal

Function add_empty_array_internal

src/mcpack2pb/serializer.cpp:579–593  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

577
578
579inline void add_empty_array_internal(OutputStream* stream,
580 Serializer::GroupInfo& group_info) {
581 if (!stream->good()) {
582 return;
583 }
584 if (!array_add_item(stream, group_info, FIELD_ARRAY, 1)) {
585 return stream->set_bad();
586 }
587 ArrayHead arrhead;
588 arrhead.head.set_type(FIELD_ARRAY);
589 arrhead.head.set_name_size(0);
590 arrhead.head.set_value_size(sizeof(ItemsHead));
591 arrhead.items_head.item_count = 0;
592 stream->append_packed_pod(arrhead);
593}
594
595inline void add_empty_array_internal(OutputStream* stream,
596 Serializer::GroupInfo & group_info,

Callers 1

add_empty_arrayMethod · 0.85

Calls 12

array_add_itemFunction · 0.85
object_add_itemFunction · 0.85
append_packed_podMethod · 0.80
goodMethod · 0.45
set_badMethod · 0.45
set_typeMethod · 0.45
set_name_sizeMethod · 0.45
set_value_sizeMethod · 0.45
emptyMethod · 0.45
sizeMethod · 0.45
appendMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected