mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2025-01-04 23:32:55 +08:00
perf: fix redundant addAll
This commit is contained in:
parent
33d5c5238a
commit
1424405c64
@ -29,8 +29,7 @@ public class KillMonsterTimeChallengeFactoryHandler implements ChallengeFactoryH
|
||||
Scene scene,
|
||||
SceneGroup group) {
|
||||
val realGroup = scene.getScriptManager().getGroupById(groupId);
|
||||
val challengeTriggers = new ArrayList<ChallengeTrigger>();
|
||||
challengeTriggers.addAll(List.of(new KillMonsterCountTrigger(), new InTimeTrigger()));
|
||||
val challengeTriggers = new ArrayList<>(List.of(new KillMonsterCountTrigger(), new InTimeTrigger()));
|
||||
|
||||
val challengeData = GameData.getDungeonChallengeConfigDataMap().get(challengeId);
|
||||
val challengeType = challengeData.getChallengeType();
|
||||
|
@ -58,8 +58,7 @@ public class MailHandler extends BasePlayerManager {
|
||||
}
|
||||
|
||||
public void deleteMail(List<Integer> mailList) {
|
||||
List<Integer> sortedMailList = new ArrayList<>();
|
||||
sortedMailList.addAll(mailList);
|
||||
List<Integer> sortedMailList = new ArrayList<>(mailList);
|
||||
sortedMailList.sort(Collections.reverseOrder());
|
||||
|
||||
List<Integer> deleted = new ArrayList<>();
|
||||
|
Loading…
Reference in New Issue
Block a user