improve code style in utility function

This commit is contained in:
WebFreak001 2023-03-16 15:41:20 +01:00 committed by Jan Jurzitza
parent 810b77fe06
commit a6eead7c81
1 changed files with 3 additions and 6 deletions

View File

@ -264,13 +264,10 @@ private bool willImplicitBeUpcasted(const(DSymbol)* from, const(DSymbol)* to)
}
private bool typeWillBeUpcastedTo(string from, string to) {
string* found = from in INTEGER_PROMOTIONS;
if (found is null)
{
return false;
}
if (auto promotionType = from in INTEGER_PROMOTIONS)
return *promotionType == to;
return INTEGER_PROMOTIONS[from] == to;
return false;
}
private bool matchAliasThis(const(DSymbol)* beforeDotType, const(DSymbol)* incomingSymbol, int recursionDepth)