summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBen Culkin <15405@DESKTOP-JT5100E>2020-03-23 17:56:34 -0400
committerBen Culkin <15405@DESKTOP-JT5100E>2020-03-23 17:56:34 -0400
commit01ee6b9ad844db04902db4d2ae25af588fffba06 (patch)
tree43cd1bc80804664f4da6d338917a97748aa07298 /src
parentc832171d0b0a82cf58a8d9c0dd9ac2ef60b8585f (diff)
General cleanup
Just doing some general cleanup around the code base
Diffstat (limited to 'src')
-rw-r--r--src/main/java/tlIItools/AffixLister.java8
-rw-r--r--src/main/java/tlIItools/NameFileReader.java6
2 files changed, 2 insertions, 12 deletions
diff --git a/src/main/java/tlIItools/AffixLister.java b/src/main/java/tlIItools/AffixLister.java
index 76e93996..b241caf5 100644
--- a/src/main/java/tlIItools/AffixLister.java
+++ b/src/main/java/tlIItools/AffixLister.java
@@ -5,13 +5,10 @@ import java.io.FileReader;
import java.io.PrintStream;
import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Scanner;
-import java.util.Set;
/**
* Lists randomly generated affixes for Torchlight II gear.
@@ -80,7 +77,6 @@ public class AffixLister {
boolean omitZeros = false;
boolean listZeros = false;
- boolean guessGroups = false;
NameMode nameMode = NameMode.ALL;
@@ -93,8 +89,6 @@ public class AffixLister {
List<Affix> nonGroupContents = afst.ungroupedAffixes;
- int argCount = 0;
-
NameFileReader nfr = new NameFileReader(false);
nfr.groupRx = ".*/mods/([^/]+)/*";
@@ -231,8 +225,6 @@ public class AffixLister {
}
if (isArg) {
- argCount += 1;
-
continue;
}
diff --git a/src/main/java/tlIItools/NameFileReader.java b/src/main/java/tlIItools/NameFileReader.java
index ad2a83b4..c63ac417 100644
--- a/src/main/java/tlIItools/NameFileReader.java
+++ b/src/main/java/tlIItools/NameFileReader.java
@@ -111,8 +111,6 @@ public class NameFileReader {
* @return The number of files read.
*/
public void readFrom(String from) {
- int ret;
-
try (FileReader fr = new FileReader(from)) {
readFrom(fr);
} catch (IOException ioex) {
@@ -131,8 +129,6 @@ public class NameFileReader {
* @return The number of files read.
*/
public void readFrom(Reader r) {
- int numFiles = 0;
-
Scanner scn = new Scanner(r);
while (scn.hasNextLine()) {
@@ -156,6 +152,8 @@ public class NameFileReader {
skipAdd = false;
}
+
+ scn.close();
}
/**