mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-11-25 06:44:19 +03:00
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:
1 parent
ff07f9c268
commit
33c5b8b7c0
10 files changed
+49
-49
No files matched your search
@@ -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);
|
||||
|
||||
|
||||
Reference in new issue
Block a user