mirror of
https://github.com/ValKmjolnir/Nasal-Interpreter.git
synced 2026-07-26 21:08:45 +08:00
optimize codes
This commit is contained in:
+1
-4
@@ -295,12 +295,9 @@ nasal_val::~nasal_val()
|
||||
}
|
||||
type=vm_nil;
|
||||
}
|
||||
|
||||
double nasal_ref::to_number()
|
||||
{
|
||||
if(type==vm_str)
|
||||
return str2num(str()->c_str());
|
||||
return value.num;
|
||||
return type!=vm_str?value.num:str2num(str()->c_str());
|
||||
}
|
||||
std::string nasal_ref::to_string()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user