mirror of
https://github.com/sam-astro/Z-Sharp.git
synced 2025-12-11 16:22:12 +00:00
Changed to const references
This commit is contained in:
parent
f61fa77952
commit
40bb09d7c8
@ -22,9 +22,9 @@ unordered_map<string, any>& builtinVarVals;
|
||||
Parser mainWindow;
|
||||
|
||||
// Initial script processing, which loads variables and functions from builtin
|
||||
int GetBuiltins(string script)
|
||||
int GetBuiltins(const string& s)
|
||||
{
|
||||
script = replace(script, " ", "\t");
|
||||
script = replace(s, " ", "\t");
|
||||
|
||||
vector<string> lines = split(script, '\n');
|
||||
vector<vector<string>> words;
|
||||
@ -90,7 +90,7 @@ int GetBuiltins(string script)
|
||||
}
|
||||
|
||||
// Executes
|
||||
any CPPFunction(string name, vector<any> args)
|
||||
any CPPFunction(const string& name, const vector<any>& args)
|
||||
{
|
||||
if (name == "CPP.Math.Sin")
|
||||
return sin(AnyAsFloat(args[0]));
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user