Merge commit '511548a2ee54c5ceb2fd858919b278721cf5ba31'
This commit is contained in:
@ -15,7 +15,7 @@ using TypeDescGenerator = ox::Error(*)(ox::TypeStore&);
|
||||
|
||||
template<typename T>
|
||||
ox::Error generateTypeDesc(ox::TypeStore &ts) noexcept {
|
||||
return ox::buildTypeDef<T>(&ts).error;
|
||||
return ox::buildTypeDef<T>(ts).error;
|
||||
}
|
||||
|
||||
class Module {
|
||||
|
@ -131,12 +131,15 @@ class Project {
|
||||
template<typename T>
|
||||
ox::Error Project::writeObj(ox::StringViewCR path, T const&obj, ox::ClawFormat fmt) noexcept {
|
||||
oxRequireM(buff, ox::writeClaw(obj, fmt));
|
||||
if (fmt == ox::ClawFormat::Organic) {
|
||||
buff.pop_back();
|
||||
}
|
||||
// write to FS
|
||||
oxReturnError(mkdir(parentDir(path)));
|
||||
oxReturnError(writeBuff(path, buff));
|
||||
// write type descriptor
|
||||
if (m_typeStore.get<T>().error) {
|
||||
oxReturnError(ox::buildTypeDef(&m_typeStore, &obj));
|
||||
oxReturnError(ox::buildTypeDef(m_typeStore, obj));
|
||||
}
|
||||
oxRequire(desc, m_typeStore.get<T>());
|
||||
auto const descPath = ox::sfmt("{}/{}", m_typeDescPath, buildTypeId(*desc));
|
||||
|
Reference in New Issue
Block a user