[ox] Make OC and Claw writers take const values

This commit is contained in:
2023-06-08 21:38:02 -05:00
parent 23054c9f6f
commit 5a021043f4
6 changed files with 15 additions and 14 deletions

View File

@@ -24,7 +24,7 @@ namespace ox {
class OrganicClawWriter {
friend Result<Buffer> writeOC(auto &val) noexcept;
friend Result<Buffer> writeOC(const auto &val) noexcept;
protected:
Json::Value m_json;
@@ -248,7 +248,7 @@ Error OrganicClawWriter::field(const char *key, UnionView<U, force> val) noexcep
return OxError(0);
}
Result<Buffer> writeOC(auto &val) noexcept {
Result<Buffer> writeOC(const auto &val) noexcept {
OrganicClawWriter writer;
ModelHandlerInterface handler(&writer);
oxReturnError(model(&handler, &val));