Simplify switch statement.

`cast` can handle `null`; no need for a ternary operator.
This commit is contained in:
Joseph Cloutier
2022-06-06 23:00:01 -04:00
parent 238428c7ea
commit 6652a6f7ab

View File

@@ -334,9 +334,7 @@ class AssetLibrary
return true;
}
var requestedType = type != null ? cast(type, AssetType) : null;
return switch (requestedType)
return switch (cast(type, AssetType))
{
case IMAGE:
cachedImages.exists(id);