Skip to content
Permalink
Browse files

InputCommon/FunctionExpression: Remove unnecessary 'else' in MakeFunc…

…tionExpression()

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.
  • Loading branch information
lioncash committed Nov 22, 2019
1 parent 10fea99 commit 1f6077922bc4f21803be7dd4435819ce19bddd54
Showing with 13 additions and 13 deletions.
  1. +13 −13 Source/Core/InputCommon/ControlReference/FunctionExpression.cpp
@@ -451,30 +451,30 @@ std::unique_ptr<FunctionExpression> MakeFunctionExpression(std::string_view name
{
if ("not" == name)
return std::make_unique<NotExpression>();
else if ("if" == name)
if ("if" == name)
return std::make_unique<IfExpression>();
else if ("sin" == name)
if ("sin" == name)
return std::make_unique<SinExpression>();
else if ("timer" == name)
if ("timer" == name)
return std::make_unique<TimerExpression>();
else if ("toggle" == name)
if ("toggle" == name)
return std::make_unique<ToggleExpression>();
else if ("minus" == name)
if ("minus" == name)
return std::make_unique<UnaryMinusExpression>();
else if ("deadzone" == name)
if ("deadzone" == name)
return std::make_unique<DeadzoneExpression>();
else if ("smooth" == name)
if ("smooth" == name)
return std::make_unique<SmoothExpression>();
else if ("hold" == name)
if ("hold" == name)
return std::make_unique<HoldExpression>();
else if ("tap" == name)
if ("tap" == name)
return std::make_unique<TapExpression>();
else if ("relative" == name)
if ("relative" == name)
return std::make_unique<RelativeExpression>();
else if ("pulse" == name)
if ("pulse" == name)
return std::make_unique<PulseExpression>();
else
return nullptr;

return nullptr;
}

int FunctionExpression::CountNumControls() const

0 comments on commit 1f60779

Please sign in to comment.
You can’t perform that action at this time.