minimize extra dv::value copies

This commit is contained in:
MihailRis
2024-09-19 13:45:32 +03:00
parent bd176f24e1
commit 3953583605
14 changed files with 29 additions and 26 deletions
+1 -1
View File
@@ -167,7 +167,7 @@ std::unique_ptr<SkeletonConfig> SkeletonConfig::parse(
std::string_view src, std::string_view file, std::string_view name
) {
auto root = json::parse(file, src);
auto rootNodeMap = root["root"];
const auto& rootNodeMap = root["root"];
auto [count, rootNode] = read_node(rootNodeMap, 0);
return std::make_unique<SkeletonConfig>(
std::string(name), std::move(rootNode), count