This commit is contained in:
Claudius Holeksa 2021-12-18 14:25:02 +01:00
parent 7238863776
commit 8d5a54a37d
5 changed files with 15 additions and 21 deletions

View File

@ -835,9 +835,7 @@ Error JsonCodec::decodeValue(Own<DynamicMessage> &message, Buffer &buffer,
decodeNull(buffer);
message = std::move(msg_null);
} break;
default: {
return criticalError("Cannot identify next JSON value");
}
default: { return criticalError("Cannot identify next JSON value"); }
}
skipWhitespace(buffer);

View File

@ -122,13 +122,9 @@ public:
}
};
Builder build(){
return Builder{*this};
}
Builder build() { return Builder{*this}; }
Reader read(){
return Reader{*this};
}
Reader read() { return Reader{*this}; }
};
/*
@ -379,6 +375,7 @@ template<class Schema, class Container = MessageContainer<Schema>>
class HeapMessageRoot {
private:
Own<Message<Schema, Container>> root;
public:
HeapMessageRoot(Own<Message<Schema, Container>> r) : root{std::move(r)} {}
@ -400,6 +397,5 @@ template<class Schema, class Container = MessageContainer<Schema>>
inline HeapMessageRoot heapMessageRoot() {
Own<Message<Schema, Container>> root = heap<Message<Schema, Container>>();
return HeapMessageRoot<Schema, Container>{std::move(root)};
}
} // namespace gin