Code simplifications and spelling fixes found by clion

This commit is contained in:
Jason Turner
2015-04-27 08:09:31 -06:00
parent b2b604e2ad
commit 8889324b2d
12 changed files with 83 additions and 116 deletions

View File

@@ -280,8 +280,8 @@ namespace chaiscript
virtual bool operator==(const dispatch::Proxy_Function_Base &rhs) const CHAISCRIPT_OVERRIDE
{
try {
const auto &dispatchfun = dynamic_cast<const Dispatch_Function &>(rhs);
return m_funcs == dispatchfun.m_funcs;
const auto &dispatch_fun = dynamic_cast<const Dispatch_Function &>(rhs);
return m_funcs == dispatch_fun.m_funcs;
} catch (const std::bad_cast &) {
return false;
}
@@ -1138,12 +1138,7 @@ namespace chaiscript
{
if (dynamic_lhs->get_guard())
{
if (dynamic_rhs->get_guard())
{
return false;
} else {
return true;
}
return dynamic_rhs->get_guard() ? false : true;
} else {
return false;
}