Simplify switch statement.
`cast` can handle `null`; no need for a ternary operator.
This commit is contained in:
@@ -334,9 +334,7 @@ class AssetLibrary
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
var requestedType = type != null ? cast(type, AssetType) : null;
|
return switch (cast(type, AssetType))
|
||||||
|
|
||||||
return switch (requestedType)
|
|
||||||
{
|
{
|
||||||
case IMAGE:
|
case IMAGE:
|
||||||
cachedImages.exists(id);
|
cachedImages.exists(id);
|
||||||
|
|||||||
Reference in New Issue
Block a user