mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 19:58:00 +00:00
Cleanup - addAll -> constructor parameter
This commit is contained in:
@@ -147,9 +147,8 @@ public final class SResizingUtil {
|
||||
|
||||
double roughVal = 0;
|
||||
int smoothVal = 0;
|
||||
|
||||
Set<Component> existingComponents = new HashSet<>();
|
||||
existingComponents.addAll(Arrays.asList(pnlContent.getComponents()));
|
||||
|
||||
Set<Component> existingComponents = new HashSet<>(Arrays.asList(pnlContent.getComponents()));
|
||||
|
||||
// This is the core of the pixel-perfect layout. To avoid ±1 px errors on borders
|
||||
// from rounding individual panels, the intermediate values (exactly accurate, in %)
|
||||
|
||||
@@ -45,8 +45,7 @@ public class ContestGauntletLister extends JPanel {
|
||||
public void setGauntlets(final List<GauntletData> gd0) {
|
||||
this.removeAll();
|
||||
final List<RowPanel> tempRows = new ArrayList<>();
|
||||
final List<GauntletData> sorted = new ArrayList<>();
|
||||
sorted.addAll(gd0);
|
||||
final List<GauntletData> sorted = new ArrayList<>(gd0);
|
||||
Collections.sort(sorted, Comparator.comparing(GauntletData::getName));
|
||||
|
||||
// Title row
|
||||
|
||||
@@ -64,8 +64,7 @@ public class QuickGauntletLister extends JPanel {
|
||||
public void refresh() {
|
||||
this.removeAll();
|
||||
final List<RowPanel> tempRows = new ArrayList<>();
|
||||
final List<GauntletData> sorted = new ArrayList<>();
|
||||
sorted.addAll(gauntlets);
|
||||
final List<GauntletData> sorted = new ArrayList<>(gauntlets);
|
||||
Collections.sort(sorted, Comparator.comparing(x -> x.getName().toLowerCase()));
|
||||
|
||||
// Title row
|
||||
|
||||
@@ -76,8 +76,7 @@ public class QuestFileLister extends JPanel {
|
||||
public void setQuests(List<QuestData> qd0) {
|
||||
this.removeAll();
|
||||
List<RowPanel> tempRows = new ArrayList<>();
|
||||
List<QuestData> sorted = new ArrayList<>();
|
||||
sorted.addAll(qd0);
|
||||
List<QuestData> sorted = new ArrayList<>(qd0);
|
||||
Collections.sort(sorted, Comparator.comparing(x -> x.getName().toLowerCase()));
|
||||
|
||||
// Title row
|
||||
|
||||
Reference in New Issue
Block a user