Avoid placeholder lookup cost

This commit is contained in:
Jason Turner
2015-06-20 07:13:54 -06:00
parent 2870874d91
commit c4633436ba
2 changed files with 6 additions and 16 deletions

View File

@@ -170,15 +170,14 @@ namespace chaiscript
{
if (t_text == "true") {
return const_var(true);
}
else if (t_text == "false") {
} else if (t_text == "false") {
return const_var(false);
}
else if (t_text == "Infinity") {
} else if (t_text == "Infinity") {
return const_var(std::numeric_limits<double>::infinity());
}
else if (t_text == "NaN") {
} else if (t_text == "NaN") {
return const_var(std::numeric_limits<double>::quiet_NaN());
} else if (t_text == "_") {
return Boxed_Value(std::make_shared<dispatch::Placeholder_Object>());
} else {
return Boxed_Value();
}