Optimize parameter passing to avoid unnecessary copying

This commit is contained in:
Pugemon
2024-06-07 04:00:38 +03:00
parent 46ca1bb04a
commit f25a425cb9
123 changed files with 578 additions and 522 deletions
+3 -3
View File
@@ -24,14 +24,14 @@ public:
fs::path getUserfiles() const;
fs::path getResources() const;
fs::path getScreenshotFile(std::string ext);
fs::path getScreenshotFile(const std::string& ext);
fs::path getWorldsFolder();
fs::path getWorldFolder();
fs::path getWorldFolder(const std::string& name);
fs::path getControlsFile();
fs::path getControlsFileOld(); // TODO: remove in 0.22
fs::path getSettingsFile();
bool isWorldNameUsed(std::string name);
bool isWorldNameUsed(const std::string& name);
void setUserfiles(fs::path folder);
void setResources(fs::path folder);
@@ -40,7 +40,7 @@ public:
std::vector<fs::path> scanForWorlds();
fs::path resolve(std::string path, bool throwErr=true);
fs::path resolve(const std::string& path, bool throwErr=true);
};
struct PathsRoot {