diff options
author | sfan5 <sfan5@live.de> | 2020-05-26 17:38:31 +0200 |
---|---|---|
committer | sfan5 <sfan5@live.de> | 2020-05-27 21:58:40 +0200 |
commit | 471e567657dfd75a994a1b54d7a23cf4541a6bed (patch) | |
tree | 1b909e24669141f3fba2a6d98c68e22f1288249b /src/content | |
parent | 2fd5f38c45a3b57a9ea2d566aa50f9e5c33794d2 (diff) | |
download | minetest-471e567657dfd75a994a1b54d7a23cf4541a6bed.tar.gz minetest-471e567657dfd75a994a1b54d7a23cf4541a6bed.tar.bz2 minetest-471e567657dfd75a994a1b54d7a23cf4541a6bed.zip |
Value copy / allocation optimizations mostly in server, SAO and serialize code
Diffstat (limited to 'src/content')
-rw-r--r-- | src/content/mods.cpp | 2 | ||||
-rw-r--r-- | src/content/mods.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/content/mods.cpp b/src/content/mods.cpp index 676666f78..95ab0290a 100644 --- a/src/content/mods.cpp +++ b/src/content/mods.cpp @@ -167,7 +167,7 @@ std::map<std::string, ModSpec> getModsInPath( return result; } -std::vector<ModSpec> flattenMods(std::map<std::string, ModSpec> mods) +std::vector<ModSpec> flattenMods(const std::map<std::string, ModSpec> &mods) { std::vector<ModSpec> result; for (const auto &it : mods) { diff --git a/src/content/mods.h b/src/content/mods.h index 6e2506dbf..b3500fbc8 100644 --- a/src/content/mods.h +++ b/src/content/mods.h @@ -68,7 +68,7 @@ std::map<std::string, ModSpec> getModsInPath( const std::string &path, bool part_of_modpack = false); // replaces modpack Modspecs with their content -std::vector<ModSpec> flattenMods(std::map<std::string, ModSpec> mods); +std::vector<ModSpec> flattenMods(const std::map<std::string, ModSpec> &mods); // a ModConfiguration is a subset of installed mods, expected to have // all dependencies fullfilled, so it can be used as a list of mods to |