InputCommon/FunctionExpression: Remove unnecessary 'else' in MakeFunctionExpression()

Given all conditional bodies only contain a return, the use of else here
isn't necessary.

This has the benefit of consistently vertically aligning the names.
This commit is contained in:
Lioncash 2019-11-22 14:55:33 -05:00
parent 10fea99d80
commit 1f6077922b
1 changed files with 13 additions and 13 deletions

View File

@ -451,30 +451,30 @@ std::unique_ptr<FunctionExpression> MakeFunctionExpression(std::string_view name
{ {
if ("not" == name) if ("not" == name)
return std::make_unique<NotExpression>(); return std::make_unique<NotExpression>();
else if ("if" == name) if ("if" == name)
return std::make_unique<IfExpression>(); return std::make_unique<IfExpression>();
else if ("sin" == name) if ("sin" == name)
return std::make_unique<SinExpression>(); return std::make_unique<SinExpression>();
else if ("timer" == name) if ("timer" == name)
return std::make_unique<TimerExpression>(); return std::make_unique<TimerExpression>();
else if ("toggle" == name) if ("toggle" == name)
return std::make_unique<ToggleExpression>(); return std::make_unique<ToggleExpression>();
else if ("minus" == name) if ("minus" == name)
return std::make_unique<UnaryMinusExpression>(); return std::make_unique<UnaryMinusExpression>();
else if ("deadzone" == name) if ("deadzone" == name)
return std::make_unique<DeadzoneExpression>(); return std::make_unique<DeadzoneExpression>();
else if ("smooth" == name) if ("smooth" == name)
return std::make_unique<SmoothExpression>(); return std::make_unique<SmoothExpression>();
else if ("hold" == name) if ("hold" == name)
return std::make_unique<HoldExpression>(); return std::make_unique<HoldExpression>();
else if ("tap" == name) if ("tap" == name)
return std::make_unique<TapExpression>(); return std::make_unique<TapExpression>();
else if ("relative" == name) if ("relative" == name)
return std::make_unique<RelativeExpression>(); return std::make_unique<RelativeExpression>();
else if ("pulse" == name) if ("pulse" == name)
return std::make_unique<PulseExpression>(); return std::make_unique<PulseExpression>();
else
return nullptr; return nullptr;
} }
int FunctionExpression::CountNumControls() const int FunctionExpression::CountNumControls() const