From f01da54eaa700ace6238cc292578dc87c7598746 Mon Sep 17 00:00:00 2001 From: "Breno A." Date: Sun, 9 Jun 2024 09:57:41 -0300 Subject: [PATCH] perf: size cannot be negative --- .../emu/grasscutter/game/managers/forging/ForgingManager.java | 2 +- src/main/java/emu/grasscutter/game/player/TeamManager.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/emu/grasscutter/game/managers/forging/ForgingManager.java b/src/main/java/emu/grasscutter/game/managers/forging/ForgingManager.java index deca11dda..e8edc63b7 100644 --- a/src/main/java/emu/grasscutter/game/managers/forging/ForgingManager.java +++ b/src/main/java/emu/grasscutter/game/managers/forging/ForgingManager.java @@ -299,7 +299,7 @@ public final class ForgingManager extends BasePlayerManager { // Determine if sending an update is necessary. // We only send an update if there are forges in the forge queue // that have changed since the last notification. - if (this.player.getActiveForges().size() <= 0) { + if (this.player.getActiveForges().size() == 0) { return; } diff --git a/src/main/java/emu/grasscutter/game/player/TeamManager.java b/src/main/java/emu/grasscutter/game/player/TeamManager.java index f79cb422d..a29d4f082 100644 --- a/src/main/java/emu/grasscutter/game/player/TeamManager.java +++ b/src/main/java/emu/grasscutter/game/player/TeamManager.java @@ -363,7 +363,7 @@ public final class TeamManager extends BasePlayerDataManager { public void updateTeamEntities(BasePacket responsePacket) { // Sanity check - Should never happen - if (this.getCurrentTeamInfo().getAvatars().size() <= 0) { + if (this.getCurrentTeamInfo().getAvatars().size() == 0) { return; }