From bfc9b076515ab9dda85ece16fb4a8c23ca6e9fa7 Mon Sep 17 00:00:00 2001 From: Anuken Date: Fri, 27 Aug 2021 09:31:09 -0400 Subject: [PATCH] Redundant cast cleanup --- core/src/mindustry/ClientLauncher.java | 2 +- core/src/mindustry/ui/Fonts.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/core/src/mindustry/ClientLauncher.java b/core/src/mindustry/ClientLauncher.java index 5ea23d3555..a7d1791e20 100644 --- a/core/src/mindustry/ClientLauncher.java +++ b/core/src/mindustry/ClientLauncher.java @@ -83,7 +83,7 @@ public abstract class ClientLauncher extends ApplicationCore implements Platform Fonts.loadDefaultFont(); //load fallback atlas if max texture size is below 4096 - assets.load(new AssetDescriptor<>(maxTextureSize >= 4096 ? "sprites/sprites.aatls" : "sprites/fallback/sprites.aatls", TextureAtlas.class)).loaded = t -> atlas = (TextureAtlas)t; + assets.load(new AssetDescriptor<>(maxTextureSize >= 4096 ? "sprites/sprites.aatls" : "sprites/fallback/sprites.aatls", TextureAtlas.class)).loaded = t -> atlas = t; assets.loadRun("maps", Map.class, () -> maps.loadPreviews()); Musics.load(); diff --git a/core/src/mindustry/ui/Fonts.java b/core/src/mindustry/ui/Fonts.java index 2d5b3c4a4d..2596292bfb 100644 --- a/core/src/mindustry/ui/Fonts.java +++ b/core/src/mindustry/ui/Fonts.java @@ -196,12 +196,12 @@ public class Fonts{ size = 18; }}; - Core.assets.load("outline", Font.class, new FreeTypeFontLoaderParameter(mainFont, param)).loaded = t -> Fonts.outline = (Font)t; + Core.assets.load("outline", Font.class, new FreeTypeFontLoaderParameter(mainFont, param)).loaded = t -> Fonts.outline = t; Core.assets.load("tech", Font.class, new FreeTypeFontLoaderParameter("fonts/tech.ttf", new FreeTypeFontParameter(){{ size = 18; }})).loaded = f -> { - Fonts.tech = (Font)f; + Fonts.tech = f; Fonts.tech.getData().down *= 1.5f; }; }