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:
@@ -149,14 +149,14 @@ public:
|
||||
int pagey;
|
||||
|
||||
//Functions for interfacing with the script:
|
||||
void addhook(std::string t);
|
||||
void removehook(std::string t);
|
||||
void addhooktoscript(std::string t);
|
||||
void removehookfromscript(std::string t);
|
||||
void loadhookineditor(std::string t);
|
||||
void addhook(const std::string& t);
|
||||
void removehook(const std::string& t);
|
||||
void addhooktoscript(const std::string& t);
|
||||
void removehookfromscript(const std::string& t);
|
||||
void loadhookineditor(const std::string& t);
|
||||
void clearscriptbuffer(void);
|
||||
void gethooks(void);
|
||||
bool checkhook(std::string t);
|
||||
bool checkhook(const std::string& t);
|
||||
std::vector<std::string> hooklist;
|
||||
|
||||
int hookmenupage, hookmenu;
|
||||
|
||||
Reference in New Issue
Block a user