Pass yaml by value. It has internal shared pointers to root document.

This commit is contained in:
lzwdgc 2020-12-08 18:41:22 +03:00
parent c61cb0117e
commit d16180dce7
2 changed files with 4 additions and 4 deletions

View file

@ -699,7 +699,7 @@ bool block::canPrint() const
return false;
}
block::block_info block::save(yaml &root) const
block::block_info block::save(yaml root) const
{
aim_vector4 min{ 1e6, 1e6, 1e6, 1e6 }, max{ -1e6, -1e6, -1e6, -1e6 };
for (auto &v : md.vertices)
@ -796,7 +796,7 @@ void model::print(const std::string &fn, AxisSystem as) const
print_obj(fn + ".obj");
}
void model::save(yaml &root) const
void model::save(yaml root) const
{
aim_vector4 min{ 1e6, 1e6, 1e6, 1e6 }, max{ -1e6, -1e6, -1e6, -1e6 };

View file

@ -347,7 +347,7 @@ struct block
std::string printMtl() const;
std::string printObj(int v_offset, int n_offset, int uv_offset, AxisSystem as) const;
block_info save(yaml &root) const;
block_info save(yaml root) const;
bool canPrint() const;
bool isEngineFx() const;
@ -365,7 +365,7 @@ struct model
void print(const std::string &fn, AxisSystem) const;
void printFbx(const std::string &fn, AxisSystem) const;
void save(yaml &root) const;
void save(yaml root) const;
};
float scale_mult();