FIX: fixed counting in the order proto

This commit is contained in:
Henry Winkel
2023-07-06 10:03:15 +02:00
parent 79eec70ccd
commit 4ee7e6068c
3 changed files with 22 additions and 22 deletions

View File

@@ -68,8 +68,8 @@ const char descriptor_table_protodef_Order_2eproto[] PROTOBUF_SECTION_VARIABLE(p
"\n\013Order.proto\022\025messages.entity.order\032\020Id"
"entifier.proto\032\031google/protobuf/any.prot"
"o\"s\n\005Order\022+\n\007OrderID\030\001 \001(\0132\032.messages.t"
"rack.Identifier\022\021\n\tOrderType\030\004 \001(\r\022*\n\014Or"
"derPayload\030\005 \001(\0132\024.google.protobuf.Anyb\006"
"rack.Identifier\022\021\n\tOrderType\030\002 \001(\r\022*\n\014Or"
"derPayload\030\003 \001(\0132\024.google.protobuf.Anyb\006"
"proto3"
;
static const ::_pbi::DescriptorTable* const descriptor_table_Order_2eproto_deps[2] = {
@@ -212,17 +212,17 @@ const char* Order::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
} else
goto handle_unusual;
continue;
// uint32 OrderType = 4;
case 4:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 32)) {
// uint32 OrderType = 2;
case 2:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
_impl_.ordertype_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// .google.protobuf.Any OrderPayload = 5;
case 5:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 42)) {
// .google.protobuf.Any OrderPayload = 3;
case 3:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) {
ptr = ctx->ParseMessage(_internal_mutable_orderpayload(), ptr);
CHK_(ptr);
} else
@@ -264,16 +264,16 @@ uint8_t* Order::_InternalSerialize(
_Internal::orderid(this).GetCachedSize(), target, stream);
}
// uint32 OrderType = 4;
// uint32 OrderType = 2;
if (this->_internal_ordertype() != 0) {
target = stream->EnsureSpace(target);
target = ::_pbi::WireFormatLite::WriteUInt32ToArray(4, this->_internal_ordertype(), target);
target = ::_pbi::WireFormatLite::WriteUInt32ToArray(2, this->_internal_ordertype(), target);
}
// .google.protobuf.Any OrderPayload = 5;
// .google.protobuf.Any OrderPayload = 3;
if (this->_internal_has_orderpayload()) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(5, _Internal::orderpayload(this),
InternalWriteMessage(3, _Internal::orderpayload(this),
_Internal::orderpayload(this).GetCachedSize(), target, stream);
}
@@ -300,14 +300,14 @@ size_t Order::ByteSizeLong() const {
*_impl_.orderid_);
}
// .google.protobuf.Any OrderPayload = 5;
// .google.protobuf.Any OrderPayload = 3;
if (this->_internal_has_orderpayload()) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*_impl_.orderpayload_);
}
// uint32 OrderType = 4;
// uint32 OrderType = 2;
if (this->_internal_ordertype() != 0) {
total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_ordertype());
}