Skip to content

Commit

Permalink
Adapted XML and flexbuffers to the new writer
Browse files Browse the repository at this point in the history
  • Loading branch information
liuzicheng1987 committed Dec 31, 2023
1 parent ef47113 commit 09e8f86
Show file tree
Hide file tree
Showing 21 changed files with 293 additions and 548 deletions.
59 changes: 0 additions & 59 deletions include/rfl/flexbuf/OutputArray.hpp

This file was deleted.

38 changes: 0 additions & 38 deletions include/rfl/flexbuf/OutputNull.hpp

This file was deleted.

61 changes: 0 additions & 61 deletions include/rfl/flexbuf/OutputObject.hpp

This file was deleted.

67 changes: 0 additions & 67 deletions include/rfl/flexbuf/OutputValue.hpp

This file was deleted.

27 changes: 0 additions & 27 deletions include/rfl/flexbuf/OutputVar.hpp

This file was deleted.

2 changes: 1 addition & 1 deletion include/rfl/flexbuf/Parser.hpp
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#ifndef FLEXBUF_PARSER_HPP_
#define FLEXBUF_PARSER_HPP_

#include "../parsing/Parser.hpp"
#include "Reader.hpp"
#include "Writer.hpp"
#include "../parsing/Parser.hpp"

namespace rfl {
namespace flexbuf {
Expand Down
8 changes: 0 additions & 8 deletions include/rfl/flexbuf/Reader.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,6 @@ struct Reader {

rfl::Result<InputArrayType> to_array(
const InputVarType& _var) const noexcept {
// Necessary, because we write empty vectors as null.
if (_var.IsNull()) {
return flexbuffers::Vector::EmptyVector();
}
if (!_var.IsVector()) {
return rfl::Error("Could not cast to Vector.");
}
Expand All @@ -133,10 +129,6 @@ struct Reader {

rfl::Result<InputObjectType> to_object(
const InputVarType& _var) const noexcept {
// Necessary, because we write empty maps as null.
if (_var.IsNull()) {
return flexbuffers::Map::EmptyMap();
}
if (!_var.IsMap()) {
return rfl::Error("Could not cast to Map!");
}
Expand Down
Loading

0 comments on commit 09e8f86

Please sign in to comment.