Use const std::string& where possible in function params

If it's at all possible to use `const std::string&` when passing
`std::string`s around, then we use it. This is to limit the amount of
memory usage as a result of the frequent use of `std::string`s, so the
game no longer unnecessarily copies strings when it doesn't need to.
This commit is contained in:
Misa committed 2021-09-06 15:43:59 -07:00
1 parent ff07f9c268
commit 33c5b8b7c0
10 files changed
+49 -49

No files matched your search

+2 -2
View File
@@ -80,7 +80,7 @@ public:
void loadZips(void);
void getDirectoryData(void);
bool getLevelMetaData(std::string& filename, LevelMetaData& _data );
bool getLevelMetaData(const std::string& filename, LevelMetaData& _data );
void reset(void);
const int* loadlevel(int rxi, int ryi);
@@ -117,7 +117,7 @@ public:
bool load(std::string& _path);
#ifndef NO_EDITOR
bool save(std::string& _path);
bool save(const std::string& _path);
#endif
void generatecustomminimap(void);