Skip to content

Commit 99e0daa

Browse files
change where const length is set
1 parent f200129 commit 99e0daa

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

src/mfast/coder/decoder_v2/fast_decoder_core.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ void fast_decoder_base::decode_field(const T &ext_ref, constant_operator_tag,
313313
// A field will not occupy any bit in the presence map if it is mandatory
314314
// and has the
315315
// constant operator.
316-
// mref.to_initial_value();
316+
mref.to_initial_value();
317317
}
318318
if (ext_ref.previous_value_shared())
319319
save_previous_value(mref);

src/mfast/ext_ref.h

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -310,12 +310,8 @@ class ext_mref<sequence_mref, LengthExtRef, ElementExtRef> {
310310
cref_type get() const { return base_; }
311311
is_optional_type optional() const { return is_optional_type(); }
312312
length_type set_length(value_storage &storage) const {
313-
auto* length_inst = base_.instruction()->length_instruction();
314313
field_mref_base length_mref(nullptr, &storage,
315-
length_inst);
316-
// a temporary storage is used for sequence length field
317-
// and we must initialize it properly to support constant operators
318-
length_inst->construct_value(storage, nullptr);
314+
base_.instruction()->length_instruction());
319315
return length_type(length_mref);
320316
}
321317

0 commit comments

Comments
 (0)