From 80d0df2f46e12ad6d917098bb95a9aa60ebc7a80 Mon Sep 17 00:00:00 2001 From: Gary Talent Date: Fri, 22 Dec 2023 19:40:30 -0600 Subject: [PATCH] [ox/fs] Cleanup FileAddress model --- deps/ox/src/ox/fs/filesystem/filelocation.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/deps/ox/src/ox/fs/filesystem/filelocation.hpp b/deps/ox/src/ox/fs/filesystem/filelocation.hpp index b2376384..587fb9bd 100644 --- a/deps/ox/src/ox/fs/filesystem/filelocation.hpp +++ b/deps/ox/src/ox/fs/filesystem/filelocation.hpp @@ -161,16 +161,16 @@ template constexpr Error model(T *h, CommonPtrWith auto *fa) noexcept { oxReturnError(h->template setTypeInfo()); if constexpr(T::opType() == OpType::Reflect) { - int8_t type = 0; + int8_t type = -1; oxReturnError(h->field("type", &type)); - oxReturnError(h->field("data", UnionView(&fa->m_data, 0))); + oxReturnError(h->field("data", UnionView(&fa->m_data, type))); } else if constexpr(T::opType() == OpType::Read) { auto type = static_cast(fa->m_type); oxReturnError(h->field("type", &type)); fa->m_type = static_cast(type); oxReturnError(h->field("data", UnionView(&fa->m_data, static_cast(fa->m_type)))); } else if constexpr(T::opType() == OpType::Write) { - auto type = static_cast(fa->m_type); + auto const type = static_cast(fa->m_type); oxReturnError(h->field("type", &type)); oxReturnError(h->field("data", UnionView(&fa->m_data, static_cast(fa->m_type)))); }