mirror of
https://github.com/ChaiScript/ChaiScript.git
synced 2025-12-07 01:06:54 +08:00
Fix build warnings from unused enums in switch; unused function arg
This commit is contained in:
parent
12f034b424
commit
259f130a60
@ -185,7 +185,9 @@ namespace chaiscript
|
||||
return const_var(c_lhs * c_rhs);
|
||||
case Operators::Opers::difference:
|
||||
return const_var(c_lhs - c_rhs);
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
if constexpr (!std::is_floating_point<LHS>::value && !std::is_floating_point<RHS>::value) {
|
||||
@ -203,7 +205,9 @@ namespace chaiscript
|
||||
return const_var(c_lhs | c_rhs);
|
||||
case Operators::Opers::bitwise_xor:
|
||||
return const_var(c_lhs ^ c_rhs);
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (t_lhs) {
|
||||
@ -224,7 +228,9 @@ namespace chaiscript
|
||||
case Operators::Opers::assign_difference:
|
||||
*t_lhs -= c_rhs;
|
||||
return t_bv;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if constexpr (!std::is_floating_point<LHS>::value && !std::is_floating_point<RHS>::value) {
|
||||
switch (t_oper) {
|
||||
@ -247,7 +253,9 @@ namespace chaiscript
|
||||
case Operators::Opers::assign_bitwise_xor:
|
||||
*t_lhs ^= c_rhs;
|
||||
return t_bv;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -299,7 +307,9 @@ namespace chaiscript
|
||||
case Operators::Opers::pre_decrement:
|
||||
--(*lhs);
|
||||
return t_lhs;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
switch (t_oper) {
|
||||
@ -307,13 +317,17 @@ namespace chaiscript
|
||||
return const_var(-c_lhs);
|
||||
case Operators::Opers::unary_plus:
|
||||
return const_var(+c_lhs);
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if constexpr (!std::is_floating_point_v<std::decay_t<decltype(c_lhs)>>) {
|
||||
switch (t_oper) {
|
||||
case Operators::Opers::bitwise_complement:
|
||||
return const_var(~c_lhs);
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
throw chaiscript::detail::exception::bad_any_cast();
|
||||
|
||||
@ -76,7 +76,7 @@ namespace chaiscript {
|
||||
|
||||
// Constructor specialization for array of size 0
|
||||
template<>
|
||||
constexpr Function_Params::Function_Params(const std::array<Boxed_Value, size_t{0}> &a)
|
||||
constexpr Function_Params::Function_Params(const std::array<Boxed_Value, size_t{0}> & /* a */)
|
||||
: m_begin(nullptr), m_end(nullptr)
|
||||
{
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user