From bccae1c613651c385a2fac8fabe7267e14a6a849 Mon Sep 17 00:00:00 2001 From: Gary Talent Date: Wed, 28 Apr 2021 22:35:53 -0500 Subject: [PATCH] [ox/std] Update TraceMsg model --- deps/ox/src/ox/std/trace.hpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/deps/ox/src/ox/std/trace.hpp b/deps/ox/src/ox/std/trace.hpp index 68e479b8..4c50502e 100644 --- a/deps/ox/src/ox/std/trace.hpp +++ b/deps/ox/src/ox/std/trace.hpp @@ -27,6 +27,9 @@ void oxTraceHook(const char *file, int line, const char *ch, const char *msg); namespace ox::trace { struct TraceMsg { + static constexpr auto TypeName = "net.drinkingtea.ox.trace.TraceMsg"; + static constexpr auto Fields = 5; + static constexpr auto TypeVersion = 1; const char *file = ""; int line = 0; uint64_t time = 0; @@ -36,14 +39,13 @@ struct TraceMsg { template constexpr Error model(T *io, ox::trace::TraceMsg *obj) { - auto err = OxError(0); - io->setTypeInfo("ox::trace::TraceMsg", 5); + io->template setTypeInfo(); oxReturnError(io->field("ch", &obj->ch)); oxReturnError(io->field("file", &obj->file)); oxReturnError(io->field("line", &obj->line)); oxReturnError(io->field("time", &obj->time)); oxReturnError(io->field("msg", &obj->msg)); - return err; + return OxError(0); } class OutStream {