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:
Misa
2020-07-04 16:01:35 -07:00
committed by Ethan Lee
parent d480c1011c
commit e6f3dab2e1
3 changed files with 7 additions and 7 deletions

View File

@@ -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();