From d16180dce744f3d7e7d0ff08ac8fc0835921441f Mon Sep 17 00:00:00 2001 From: lzwdgc Date: Tue, 8 Dec 2020 18:41:22 +0300 Subject: [PATCH] Pass yaml by value. It has internal shared pointers to root document. --- src/model/model.cpp | 4 ++-- src/model/model.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/model/model.cpp b/src/model/model.cpp index b61ab60..b37e8f7 100644 --- a/src/model/model.cpp +++ b/src/model/model.cpp @@ -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 }; diff --git a/src/model/model.h b/src/model/model.h index 0989c20..4cccfc1 100644 --- a/src/model/model.h +++ b/src/model/model.h @@ -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();