mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-01-30 18:04:09 +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:
@@ -32,7 +32,7 @@ void scriptclass::clearcustom(){
|
||||
customscripts.clear();
|
||||
}
|
||||
|
||||
void scriptclass::tokenize( std::string t )
|
||||
void scriptclass::tokenize( const std::string& t )
|
||||
{
|
||||
j = 0;
|
||||
std::string tempword;
|
||||
@@ -3725,7 +3725,7 @@ void scriptclass::hardreset()
|
||||
running = false;
|
||||
}
|
||||
|
||||
void scriptclass::loadcustom(std::string t)
|
||||
void scriptclass::loadcustom(const std::string& t)
|
||||
{
|
||||
//this magic function breaks down the custom script and turns into real scripting!
|
||||
std::string cscriptname="";
|
||||
|
||||
Reference in New Issue
Block a user