Compare commits

...

2 Commits

Author SHA1 Message Date
3aac345637 Merge commit 'b67b95767b7bfcd5f618ebc8e14ddbc83edcbe36'
All checks were successful
Build / build (push) Successful in 1m30s
2025-07-31 00:41:06 -05:00
b67b95767b Squashed 'deps/nostalgia/' changes from f7c3c02c..e38b85b4
e38b85b4 [studio] Eliminate redundant serialization and deserialization

git-subtree-dir: deps/nostalgia
git-subtree-split: e38b85b4f4134af04b9b71caddcd2268f425f5df
2025-07-31 00:41:06 -05:00

View File

@@ -185,14 +185,13 @@ ox::Error Project::writeObj(ox::StringViewCR path, T const &obj) noexcept {
template<typename T>
ox::Result<T> Project::loadObj(ox::StringViewCR path) const noexcept {
OX_REQUIRE_M(buff, loadBuff(path));
OX_REQUIRE(buff, loadBuff(path));
if constexpr(ox::is_same_v<T, ox::ModelObject>) {
return keel::readAsset(m_typeStore, buff);
} else {
OX_REQUIRE(typeId, keel::readAssetTypeId(buff));
if (typeId != ox::ModelTypeId_v<T>) {
OX_REQUIRE(ah, keel::readAssetHeader(buff));
OX_RETURN_ERROR(keel::convertBuffToBuff<T>(m_kctx, buff, ah.clawHdr.fmt).moveTo(buff));
return keel::convert<T>(m_kctx, buff);
}
return keel::readAsset<T>(buff);
}