Skip to content

Commit

Permalink
Minor fixes in the writer
Browse files Browse the repository at this point in the history
  • Loading branch information
liuzicheng1987 committed Jan 20, 2024
1 parent 51a3013 commit e56acb7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/rfl/cbor/Writer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ class Writer {
template <class T>
OutputVarType add_value_to_object(const std::string& _name, const T& _var,
OutputObjectType* _parent) const noexcept {
cbor_encode_text_string(_parent, _name.c_str(), _name.size());
cbor_encode_text_string(_parent->encoder_, _name.c_str(), _name.size());
return new_value(_var, _parent->encoder_);
}

Expand All @@ -105,7 +105,7 @@ class Writer {

OutputVarType add_null_to_object(const std::string& _name,
OutputObjectType* _parent) const noexcept {
cbor_encode_text_string(_parent, _name.c_str(), _name.size());
cbor_encode_text_string(_parent->encoder_, _name.c_str(), _name.size());
cbor_encode_null(_parent->encoder_);
return OutputVarType{};
}
Expand Down

0 comments on commit e56acb7

Please sign in to comment.