update vcm::parse semantics

This commit is contained in:
MihailRis 2026-01-15 22:57:04 +03:00
parent c34cb57fb8
commit 6760d16052
4 changed files with 55 additions and 51 deletions

View file

@ -381,8 +381,8 @@ assetload::postfunc assetload::model(
auto text = io::read_string(path);
try {
auto model = vcm::parse(path.string(), text, path.extension() == ".xml")
.release();
auto vcmModel = vcm::parse(path.string(), text, path.extension() == ".xml");
auto model = std::make_unique<model::Model>(std::move(vcmModel.squash())).release();
return [=](Assets* assets) {
request_textures(loader, *model);
assets->store(std::unique_ptr<model::Model>(model), name);