improve code style in utility function

This commit is contained in:
WebFreak001 2023-03-16 15:41:20 +01:00
parent d59b8efbf0
commit 34369422cd
No known key found for this signature in database
GPG Key ID: AEFC88D11109D1AA
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) { private bool typeWillBeUpcastedTo(string from, string to) {
string* found = from in INTEGER_PROMOTIONS; if (auto promotionType = from in INTEGER_PROMOTIONS)
if (found is null) return *promotionType == to;
{
return false;
}
return INTEGER_PROMOTIONS[from] == to; return false;
} }
private bool matchAliasThis(const(DSymbol)* beforeDotType, const(DSymbol)* incomingSymbol, int recursionDepth) private bool matchAliasThis(const(DSymbol)* beforeDotType, const(DSymbol)* incomingSymbol, int recursionDepth)