mirror of
https://github.com/ChaiScript/ChaiScript.git
synced 2025-12-06 16:57:04 +08:00
Fix build warnings from unused enums in switch; unused function arg
This commit is contained in:
parent
12f034b424
commit
259f130a60
@ -185,6 +185,8 @@ namespace chaiscript
|
||||
return const_var(c_lhs * c_rhs);
|
||||
case Operators::Opers::difference:
|
||||
return const_var(c_lhs - c_rhs);
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@ -203,6 +205,8 @@ namespace chaiscript
|
||||
return const_var(c_lhs | c_rhs);
|
||||
case Operators::Opers::bitwise_xor:
|
||||
return const_var(c_lhs ^ c_rhs);
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@ -224,6 +228,8 @@ 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) {
|
||||
@ -247,6 +253,8 @@ namespace chaiscript
|
||||
case Operators::Opers::assign_bitwise_xor:
|
||||
*t_lhs ^= c_rhs;
|
||||
return t_bv;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -299,6 +307,8 @@ namespace chaiscript
|
||||
case Operators::Opers::pre_decrement:
|
||||
--(*lhs);
|
||||
return t_lhs;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@ -307,12 +317,16 @@ 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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -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