Skip to content

Commit

Permalink
Fix conflicts attempt 4
Browse files Browse the repository at this point in the history
the conflict checker is running off black magic and all the spells in it are specifically against pushing Groovy support into this PR
  • Loading branch information
distay0xGit committed Feb 28, 2024
1 parent f1bc5bd commit 210e487
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/main/java/io/github/arrayv/utils/ArrayVList.java
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package io.github.arrayv.utils;

import java.awt.Color; // i beg of you stop rejecting this import

import io.github.arrayv.main.ArrayVisualizer;

import java.util.*;
import java.util.function.Consumer;

import java.awt.Color;

public class ArrayVList extends AbstractList<Integer> implements RandomAccess, java.io.Serializable {
private static final int DEFAULT_CAPACITY = 128;
private static final double DEFAULT_GROW_FACTOR = 2;
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/io/github/arrayv/utils/Highlights.java
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public final class Highlights {
private volatile boolean retainColorMarks = false;

private volatile Map<String, Color> defined;
private static int[] main;
private final int[] main;

private volatile int maxHighlightMarked; // IMPORTANT: This stores the index one past the farthest highlight used, so that a value
// of 0 means no highlights are in use, and iteration is more convenient.
Expand Down Expand Up @@ -94,10 +94,10 @@ public Highlights(ArrayVisualizer arrayVisualizer, int maximumLength) {
this.maxHighlightMarked = 0;
this.markCount = new AtomicInteger();

main = arrayVisualizer.getArray(); // Colorcoding shorthand thing

Arrays.fill(highlights, -1);
Arrays.fill(markCounts, (byte)0);

this.main = arrayVisualizer.getArray(); // I refuse to remove this line of code without putting up a fight
this.registerColorMarks(main);
}

Expand Down Expand Up @@ -299,7 +299,7 @@ public synchronized void clearColor(int[] array, int position) {
}

public synchronized void clearColor(int position) {
clearColor(main, position);
clearColor(this.main, position);
}

public synchronized boolean hasColor(int[] array, int position) {
Expand Down

0 comments on commit 210e487

Please sign in to comment.