[nostalgia] Update developer-handbook non-error return
All checks were successful
Build / build (push) Successful in 2m37s

This commit is contained in:
Gary Talent 2024-06-12 23:39:04 -05:00
parent 7eab2f9278
commit e34df255e0

View File

@ -265,7 +265,7 @@ ox::Error engineCode() noexcept {
auto [val, err] = foo(1);
oxReturnError(err);
doStuff(val);
return OxError(0);
return {};
}
void anyCode() {
@ -288,7 +288,7 @@ ox::Error engineCode() noexcept {
auto valerr = foo(1);
oxReturnError(valerr);
doStuff(valerr.value);
return OxError(0);
return {};
}
```
@ -426,7 +426,7 @@ constexpr ox::Error model(T *h, ox::CommonPtrWith<NostalgiaPalette> auto *pal) n
// it is also possible to provide the type name and type version as function arguments
//h->setTypeInfo("net.drinkingtea.nostalgia.core.NostalgiaPalette", 1);
oxReturnError(h->field("colors", &pal->colors));
return OxError(0);
return {};
}
template<typename T>
@ -438,7 +438,7 @@ constexpr ox::Error model(T *h, ox::CommonPtrWith<NostalgiaGraphic> auto *ng) no
oxReturnError(h->field("defaultPalette", &ng->defaultPalette));
oxReturnError(h->field("pal", &ng->pal));
oxReturnError(h->field("pixels", &ng->pixels));
return OxError(0);
return {};
}
```
@ -475,7 +475,7 @@ constexpr Error model(T *h, ox::CommonPtrWith<FileAddress::Data> auto *obj) noex
oxReturnError(h->fieldCString("path", &obj->path));
oxReturnError(h->fieldCString("constPath", &obj->path));
oxReturnError(h->field("inode", &obj->inode));
return OxError(0);
return {};
}
template<typename T>
@ -492,7 +492,7 @@ constexpr Error model(T *io, ox::CommonPtrWith<FileAddress> auto *fa) noexcept {
fa->m_type = static_cast<FileAddressType>(type);
oxReturnError(io->field("data", UnionView(&fa->m_data, static_cast<int>(fa->m_type))));
}
return OxError(0);
return {};
}
```