# HG changeset patch # User František Kučera # Date 1622972786 -7200 # Node ID cae9eedf41802cbf60633eb0e4ab2924b5532802 # Parent c97810ccfdef1b51fecbd984c671f940059ba4d8 null values: cborType=null, no additional flag needed diff -r c97810ccfdef -r cae9eedf4180 src/XMLDocumentConstructor.h --- a/src/XMLDocumentConstructor.h Sun Jun 06 11:43:18 2021 +0200 +++ b/src/XMLDocumentConstructor.h Sun Jun 06 11:46:26 2021 +0200 @@ -82,8 +82,7 @@ } } - void appendScalarValue(Glib::ustring value, Glib::ustring cborType, bool isNull = false) { - // TODO: null + void appendScalarValue(Glib::ustring value, Glib::ustring cborType) { if (mode.back() == Mode::ARRAY) { xmlpp::Element* element = current->add_child(nameCodec.encode(itemName)); element->add_child_text(value); @@ -225,7 +224,7 @@ callbacks.null = [](void* context) { CBOR_CALLBACK_START - instance->appendScalarValue("", "null", true); + instance->appendScalarValue("", "null"); CBOR_CALLBACK_END }; @@ -257,7 +256,7 @@ callbacks.undefined = [](void* context) { CBOR_CALLBACK_START - instance->appendScalarValue("undefined", "undefined", true); // FIXME: throw exception? + instance->appendScalarValue("", "undefined"); // TODO: throw exception? CBOR_CALLBACK_END };