Skip to content

Commit e56acb7

Browse files
Minor fixes in the writer
1 parent 51a3013 commit e56acb7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

include/rfl/cbor/Writer.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ class Writer {
9494
template <class T>
9595
OutputVarType add_value_to_object(const std::string& _name, const T& _var,
9696
OutputObjectType* _parent) const noexcept {
97-
cbor_encode_text_string(_parent, _name.c_str(), _name.size());
97+
cbor_encode_text_string(_parent->encoder_, _name.c_str(), _name.size());
9898
return new_value(_var, _parent->encoder_);
9999
}
100100

@@ -105,7 +105,7 @@ class Writer {
105105

106106
OutputVarType add_null_to_object(const std::string& _name,
107107
OutputObjectType* _parent) const noexcept {
108-
cbor_encode_text_string(_parent, _name.c_str(), _name.size());
108+
cbor_encode_text_string(_parent->encoder_, _name.c_str(), _name.size());
109109
cbor_encode_null(_parent->encoder_);
110110
return OutputVarType{};
111111
}

0 commit comments

Comments
 (0)