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)))); }