Skip to content

Commit a28d831

Browse files
committed
Some minor improvements
1 parent 0cab940 commit a28d831

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

Diff for: src/info/ata4/bsplib/BspFileReader.java

+6-6
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ public void loadStaticProps() {
271271
}
272272

273273
// StaticPropLeafLump_t
274-
int propleaves = in.readInt();
274+
final int propleaves = in.readInt();
275275

276276
L.log(Level.FINE, "Static prop leaves: {0}", propleaves);
277277

@@ -359,7 +359,6 @@ public void loadStaticProps() {
359359

360360
// get structure class for the static prop lump version if it's not
361361
// a special case
362-
int numFillBytes = 0;
363362
if (structClass == null) {
364363
try {
365364
String className = DStaticProp.class.getName();
@@ -380,8 +379,9 @@ public void loadStaticProps() {
380379
}
381380
}
382381

383-
// fall back to a very basic version that should hopefully work in
384-
// all situations
382+
// if the correct class is still unknown at this point, fall back to
383+
// a very basic version that should hopefully work in all situations
384+
int numFillBytes = 0;
385385
if (structClass == null) {
386386
L.log(Level.WARNING, "Falling back to static prop v4");
387387

@@ -791,14 +791,14 @@ public void loadPrimVerts() {
791791
private <E extends DStruct> List<E> loadLump(LumpType lumpType, Class<E> struct) {
792792
// don't try to read lumps that aren't supported
793793
if (!bspFile.canReadLump(lumpType)) {
794-
return Collections.EMPTY_LIST;
794+
return Collections.emptyList();
795795
}
796796

797797
Lump lump = getLump(lumpType);
798798

799799
// don't try to read empty lumps
800800
if (lump.getLength() == 0) {
801-
return Collections.EMPTY_LIST;
801+
return Collections.emptyList();
802802
}
803803

804804
L.log(Level.FINE, "Loading {0}", lumpType);

0 commit comments

Comments
 (0)