mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-01-29 17:38:16 +03:00
Make std::string-using script funcs pass around const references
This makes it so that whenever a string is passed into these functions, it's no longer needlessly copied.
This commit is contained in:
@@ -22,18 +22,18 @@ public:
|
||||
|
||||
scriptclass();
|
||||
|
||||
void load(std::string name);
|
||||
void load(const std::string& name);
|
||||
void loadother(const char* t);
|
||||
void loadcustom(std::string t);
|
||||
void loadcustom(const std::string& t);
|
||||
|
||||
void inline add(std::string t)
|
||||
void inline add(const std::string& t)
|
||||
{
|
||||
commands.push_back(t);
|
||||
}
|
||||
|
||||
void clearcustom();
|
||||
|
||||
void tokenize(std::string t);
|
||||
void tokenize(const std::string& t);
|
||||
|
||||
void run();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user