From 4520ee465d3d9cf9c5d2da58d79340f58abd0555 Mon Sep 17 00:00:00 2001 From: Andrei Kortunov Date: Sat, 16 Mar 2024 16:26:26 +0400 Subject: [PATCH] Do not copy vector --- components/lua/yamlloader.cpp | 2 +- components/lua/yamlloader.hpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/components/lua/yamlloader.cpp b/components/lua/yamlloader.cpp index 14553cfac4..41b8fb346f 100644 --- a/components/lua/yamlloader.cpp +++ b/components/lua/yamlloader.cpp @@ -25,7 +25,7 @@ namespace LuaUtil return load(rootNodes, lua); } - sol::object YamlLoader::load(const std::vector rootNodes, const sol::state_view& lua) + sol::object YamlLoader::load(const std::vector& rootNodes, const sol::state_view& lua) { if (rootNodes.empty()) return sol::nil; diff --git a/components/lua/yamlloader.hpp b/components/lua/yamlloader.hpp index 1ca95223cd..2ad9315149 100644 --- a/components/lua/yamlloader.hpp +++ b/components/lua/yamlloader.hpp @@ -30,7 +30,7 @@ namespace LuaUtil String }; - static sol::object load(const std::vector rootNodes, const sol::state_view& lua); + static sol::object load(const std::vector& rootNodes, const sol::state_view& lua); static sol::object getNode(const YAML::Node& node, const sol::state_view& lua, uint64_t depth);