From e34df255e084f565cca3f77cb19079e4cb1b2092 Mon Sep 17 00:00:00 2001 From: Gary Talent Date: Wed, 12 Jun 2024 23:39:04 -0500 Subject: [PATCH] [nostalgia] Update developer-handbook non-error return --- developer-handbook.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/developer-handbook.md b/developer-handbook.md index 1bb1097c..e73858e0 100644 --- a/developer-handbook.md +++ b/developer-handbook.md @@ -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 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 @@ -438,7 +438,7 @@ constexpr ox::Error model(T *h, ox::CommonPtrWith 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 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 @@ -492,7 +492,7 @@ constexpr Error model(T *io, ox::CommonPtrWith auto *fa) noexcept { fa->m_type = static_cast(type); oxReturnError(io->field("data", UnionView(&fa->m_data, static_cast(fa->m_type)))); } - return OxError(0); + return {}; } ```