mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-01-29 17:38:16 +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:
@@ -121,7 +121,7 @@ public:
|
||||
|
||||
void resetgameclock(void);
|
||||
|
||||
bool customsavequick(std::string savfile);
|
||||
bool customsavequick(const std::string& savfile);
|
||||
bool savequick(void);
|
||||
|
||||
void gameclock(void);
|
||||
@@ -196,7 +196,7 @@ public:
|
||||
|
||||
void deathsequence(void);
|
||||
|
||||
void customloadquick(std::string savfile);
|
||||
void customloadquick(const std::string& savfile);
|
||||
void loadquick(void);
|
||||
|
||||
void customdeletequick(const std::string& file);
|
||||
|
||||
Reference in New Issue
Block a user