[ox] Make model system's setTypeInfo return an Error
This commit is contained in:
@@ -145,7 +145,7 @@ constexpr const char *getModelTypeName<FileAddress>() noexcept {
|
||||
|
||||
template<typename T>
|
||||
constexpr Error model(T *io, CommonPtrWith<FileAddress::Data> auto *obj) noexcept {
|
||||
io->template setTypeInfo<FileAddress::Data>();
|
||||
oxReturnError(io->template setTypeInfo<FileAddress::Data>());
|
||||
oxReturnError(io->fieldCString("path", &obj->path));
|
||||
oxReturnError(io->fieldCString("constPath", &obj->path));
|
||||
oxReturnError(io->field("inode", &obj->inode));
|
||||
@@ -154,7 +154,7 @@ constexpr Error model(T *io, CommonPtrWith<FileAddress::Data> auto *obj) noexcep
|
||||
|
||||
template<typename T>
|
||||
constexpr Error model(T *io, CommonPtrWith<FileAddress> auto *fa) noexcept {
|
||||
io->template setTypeInfo<FileAddress>();
|
||||
oxReturnError(io->template setTypeInfo<FileAddress>());
|
||||
if constexpr(T::opType() == OpType::Reflect) {
|
||||
int8_t type = 0;
|
||||
oxReturnError(io->field("type", &type));
|
||||
|
Reference in New Issue
Block a user