Simplify function call type conversion

This commit is contained in:
Bhargava Shastry 2020-01-04 13:40:30 +01:00
parent a6702425a1
commit c954e18e12

View File

@ -823,19 +823,9 @@ VarRef* YulProtoMutator::varRef(unsigned _seed)
FunctionCall_Returns YulProtoMutator::callType(unsigned _seed) FunctionCall_Returns YulProtoMutator::callType(unsigned _seed)
{ {
switch (_seed % 4) return static_cast<FunctionCall_Returns>(
{ _seed % FunctionCall_Returns_Returns_ARRAYSIZE + FunctionCall_Returns_Returns_MIN
case 0: );
return FunctionCall_Returns_ZERO;
case 1:
return FunctionCall_Returns_SINGLE;
case 2:
return FunctionCall_Returns_MULTIASSIGN;
case 3:
return FunctionCall_Returns_MULTIDECL;
default:
yulAssert(false, "");
}
} }
void YulProtoMutator::configureCall(FunctionCall *_call, unsigned int _seed) void YulProtoMutator::configureCall(FunctionCall *_call, unsigned int _seed)