From a17bc04ee7f9bf4861522d2dc8609b2428bcb231 Mon Sep 17 00:00:00 2001 From: Gary Talent Date: Wed, 12 May 2021 22:13:12 -0500 Subject: [PATCH] [nostalgia/studio] Cleanup error handling --- src/nostalgia/studio/lib/project.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/nostalgia/studio/lib/project.hpp b/src/nostalgia/studio/lib/project.hpp index 5ea1c681..8f91bd77 100644 --- a/src/nostalgia/studio/lib/project.hpp +++ b/src/nostalgia/studio/lib/project.hpp @@ -99,13 +99,13 @@ void Project::writeObj(QString path, T *obj) const { writeBuff(path, ox::bit_cast(buff.data()), buff.size()); // write type descriptor - const auto type = ox::buildTypeDef(obj); - oxRequireMT(typeOut, ox::writeClaw(type.value, ox::ClawFormat::Organic)); + oxRequireT(type, ox::buildTypeDef(obj)); + oxRequireMT(typeOut, ox::writeClaw(type.get(), ox::ClawFormat::Organic)); // replace garbage last character with new line typeOut.back().value = '\n'; // write to FS QString descPath = "/.nostalgia/type_descriptors/"; - const auto typePath = descPath + type.value->typeName.c_str(); + const auto typePath = descPath + type->typeName.c_str(); mkdir(descPath); writeBuff(typePath, ox::bit_cast(typeOut.data()), typeOut.size()); emit fileUpdated(path);