From 50e8806f73a47df0b88412a6a3d3ca5c64643abc Mon Sep 17 00:00:00 2001 From: archibate <1931127624@qq.com> Date: Mon, 8 Aug 2022 14:52:47 +0800 Subject: [PATCH] [release] fuckzxxcache --- zeno/src/core/Session.cpp | 7 +++---- zeno/src/extra/GlobalComm.cpp | 4 ++-- zeno/src/nodes/InputParams.cpp | 4 ++-- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/zeno/src/core/Session.cpp b/zeno/src/core/Session.cpp index 569fb2701b..949741871d 100644 --- a/zeno/src/core/Session.cpp +++ b/zeno/src/core/Session.cpp @@ -14,11 +14,10 @@ namespace zeno { namespace { -template struct ImplNodeClass : INodeClass { - F ctor; + std::unique_ptr(*ctor)(); - ImplNodeClass(F const &ctor, Descriptor const &desc) + ImplNodeClass(std::unique_ptr(*ctor)(), Descriptor const &desc) : INodeClass(desc), ctor(ctor) {} virtual std::unique_ptr new_instance() const override { @@ -42,7 +41,7 @@ ZENO_API void Session::defNodeClass(std::unique_ptr(*ctor)(), std::string if (nodeClasses.find(id) != nodeClasses.end()) { log_error("node class redefined: `{}`\n", id); } - auto cls = std::make_unique(*)()>>(ctor, desc); + auto cls = std::make_unique(ctor, desc); nodeClasses.emplace(id, std::move(cls)); } diff --git a/zeno/src/extra/GlobalComm.cpp b/zeno/src/extra/GlobalComm.cpp index fa90a1018e..6f8a3fcffa 100644 --- a/zeno/src/extra/GlobalComm.cpp +++ b/zeno/src/extra/GlobalComm.cpp @@ -24,7 +24,7 @@ static void toDisk(std::string cachedir, int frameid, GlobalComm::ViewObjects &o keys.push_back('\a'); auto path = std::filesystem::path(cachedir) / (std::to_string(1000000 + frameid).substr(1) + ".zencache"); - log_debug("dump cache to disk {}", path); + log_critical("dump cache to disk {}", path); std::ofstream ofs(path); std::ostreambuf_iterator oit(ofs); std::copy(keys.begin(), keys.end(), oit); @@ -37,7 +37,7 @@ static void fromDisk(std::string cachedir, int frameid, GlobalComm::ViewObjects if (cachedir.empty()) return; objs.clear(); auto path = std::filesystem::path(cachedir) / (std::to_string(1000000 + frameid).substr(1) + ".zencache"); - log_debug("load cache from disk {}", path); + log_critical("load cache from disk {}", path); std::ifstream ifs(path); std::istreambuf_iterator iit(ifs), iite; std::vector dat; diff --git a/zeno/src/nodes/InputParams.cpp b/zeno/src/nodes/InputParams.cpp index b3da03b7c5..829ee5bc69 100644 --- a/zeno/src/nodes/InputParams.cpp +++ b/zeno/src/nodes/InputParams.cpp @@ -101,7 +101,7 @@ ZENDEFNODE(ParamFormat, { }, {"format"}, {}, - {"layout"}, + {"string"}, }); struct ParamFileParser : zeno::INode { @@ -256,7 +256,7 @@ ZENDEFNODE(ParamFileParser, { {"DictObject", "params"}, }, {}, - {"layout"}, + {"string"}, }); }