Skip to content

Commit

Permalink
Fix...
Browse files Browse the repository at this point in the history
  • Loading branch information
LinZhihao-723 committed Nov 8, 2024
1 parent 7aeec08 commit 9353ee6
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions components/core/src/clp/ffi/ir_stream/Deserializer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

#include "../../ReaderInterface.hpp"
#include "../../time_types.hpp"
#include "../KeyValuePairLogEvent.hpp"
#include "../SchemaTree.hpp"
#include "decoding_methods.hpp"
#include "ir_unit_deserialization_methods.hpp"
Expand Down Expand Up @@ -66,8 +65,8 @@ class Deserializer {
/**
* Deserializes the stream from the given reader up to and including the next log event IR unit.
* @param reader
* @return std::errc::result_out_of_range if no tag bytes can be read to determine the next IR
* unit type.
* @return Forwards `deserialize_tag`s return values if no tag bytes can be read to determine
* the next IR unit type.
* @return std::errc::protocol_not_supported if the IR unit type is not supported.
* @return std::errc::operation_not_permitted if the deserializer already reached the end of
* stream by deserializing an end-of-stream IR unit in the previous calls.
Expand Down Expand Up @@ -172,8 +171,8 @@ auto Deserializer<IrUnitHandler>::deserialize_next_ir_unit(ReaderInterface& read
}

encoded_tag_t tag{};
if (IRErrorCode::IRErrorCode_Success != deserialize_tag(reader, tag)) {
return std::errc::result_out_of_range;
if (auto const err{deserialize_tag(reader, tag)}; IRErrorCode::IRErrorCode_Success != err) {
return ir_error_code_to_errc(err);
}

auto const optional_ir_unit_type{get_ir_unit_type_from_tag(tag)};
Expand Down

0 comments on commit 9353ee6

Please sign in to comment.