Skip to content

Commit

Permalink
Merge pull request #1 from gaborbata/code-cleanup
Browse files Browse the repository at this point in the history
Fix string format issues
  • Loading branch information
gaborbata authored Oct 11, 2023
2 parents 3201b98 + 212879e commit cd113d9
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 14 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ dist/
build.xml
nbproject/
.gradle
gradle/
gradlew
gradlew.bat

# Intellij
*.iml
Expand Down
4 changes: 0 additions & 4 deletions src/g/Signals.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,6 @@
//
import doom.event_t;
import doom.evtype_t;
import static java.awt.event.InputEvent.ALT_DOWN_MASK;
import static java.awt.event.InputEvent.CTRL_DOWN_MASK;
import static java.awt.event.InputEvent.META_DOWN_MASK;
import static java.awt.event.InputEvent.SHIFT_DOWN_MASK;
import java.awt.event.KeyEvent;
import static java.awt.event.KeyEvent.*;

Expand Down
10 changes: 5 additions & 5 deletions src/p/BoomLevelLoader.java
Original file line number Diff line number Diff line change
Expand Up @@ -542,7 +542,7 @@ private void P_LoadSegs(int lump) {
li.frontsector = sides[ldef.sidenum[side]].sector;
} else {
li.frontsector = null;
LOGGER.log(Level.INFO, String.format("P_LoadSegs: front of seg %i has no sidedef", i));
LOGGER.log(Level.INFO, String.format("P_LoadSegs: front of seg %d has no sidedef", i));
}

if (flags(ldef.flags, ML_TWOSIDED) && ldef.sidenum[side ^ 1] != NO_INDEX) {
Expand Down Expand Up @@ -666,7 +666,7 @@ linedef, i, unsigned(ldef.sidenum[side])
li.frontsector = sides[ldef.sidenum[side]].sector;
} else {
li.frontsector = null;
LOGGER.log(Level.WARNING, String.format("P_LoadSegs_V4: front of seg %i has no sidedef", i));
LOGGER.log(Level.WARNING, String.format("P_LoadSegs_V4: front of seg %d has no sidedef", i));
}

if (flags(ldef.flags, ML_TWOSIDED)
Expand Down Expand Up @@ -995,7 +995,7 @@ i, unsigned(linedef)

// e6y: fix wrong side index
if (side != 0 && side != 1) {
LOGGER.log(Level.WARNING, String.format("P_LoadZSegs: seg %d contains wrong side index %d. Replaced with 1.", i, side));
LOGGER.log(Level.WARNING, String.format("P_LoadZSegs: seg %d contains wrong side index %d. Replaced with 1.", i, (int) side));
side = 1;
}

Expand All @@ -1018,7 +1018,7 @@ linedef, i, unsigned(ldef.sidenum[side])
li.frontsector = sides[ldef.sidenum[side]].sector;
} else {
li.frontsector = null;
LOGGER.log(Level.WARNING, String.format("P_LoadZSegs: front of seg %i has no sidedef", i));
LOGGER.log(Level.WARNING, String.format("P_LoadZSegs: front of seg %d has no sidedef", i));
}

if (flags(ldef.flags, ML_TWOSIDED) && (ldef.sidenum[side ^ 1] != NO_INDEX)) {
Expand Down Expand Up @@ -1490,7 +1490,7 @@ private void P_LoadSideDefs2(int lump) {
*/
char sector_num = (char) msd.sector;
if (sector_num >= numsectors) {
LOGGER.log(Level.WARNING, String.format("P_LoadSideDefs2: sidedef %i has out-of-range sector num %u\n", i, sector_num));
LOGGER.log(Level.WARNING, String.format("P_LoadSideDefs2: sidedef %d has out-of-range sector num %d", i, (int) sector_num));
sector_num = 0;
}
sd.sector = sec = sectors[sector_num];
Expand Down
6 changes: 3 additions & 3 deletions src/rr/SimpleTextureManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -1241,7 +1241,7 @@ public column_t GetSmpColumn(int tex, int col, int id) {
// but it doesn't yet exist. Create it.
if (getMaskedComposite(tex) == null) {
LOGGER.log(Level.WARNING, String.format("Forced generation of composite %s",
CheckTextureNameForNum(tex), smp_composite[id], col, ofs));
CheckTextureNameForNum(tex)));
GenerateMaskedComposite(tex);
LOGGER.log(Level.WARNING, String.format("Composite patch %s %d",
getMaskedComposite(tex).name, getMaskedComposite(tex).columns.length));
Expand Down Expand Up @@ -1312,7 +1312,7 @@ public byte[] GetColumn(int tex, int col) {
// but it doesn't yet exist. Create it.
if (getMaskedComposite(tex) == null) {
LOGGER.log(Level.WARNING,
String.format("Forced generation of composite %s", CheckTextureNameForNum(tex), composite, col, ofs));
String.format("Forced generation of composite %s", CheckTextureNameForNum(tex)));
GenerateMaskedComposite(tex);
LOGGER.log(Level.WARNING,
String.format("Composite patch %s %d", getMaskedComposite(tex).name, getMaskedComposite(tex).columns.length));
Expand Down Expand Up @@ -1378,7 +1378,7 @@ public column_t GetColumnStruct(int tex, int col) {
// but it doesn't yet exist. Create it.
if (getMaskedComposite(tex) == null) {
LOGGER.log(Level.WARNING,
String.format("Forced generation of composite %s", CheckTextureNameForNum(tex), composite, col, ofs));
String.format("Forced generation of composite %s", CheckTextureNameForNum(tex)));
GenerateMaskedComposite(tex);
LOGGER.log(Level.WARNING,
String.format("Composite patch %s %d", getMaskedComposite(tex).name, getMaskedComposite(tex).columns.length));
Expand Down
2 changes: 1 addition & 1 deletion src/rr/parallel/MaskedWorker.java
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ protected final void DrawVisSprite(vissprite_t<V> vis) {
column = patch.columns[texturecolumn];

if (column == null) {
LOGGER.log(Level.WARNING, String.format("Null column for texturecolumn %d", texturecolumn, x1, x2));
LOGGER.log(Level.WARNING, String.format("Null column for texturecolumn %d", texturecolumn));
} else {
DrawMaskedColumn(column);
}
Expand Down
2 changes: 1 addition & 1 deletion src/s/QMusToMid.java
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,7 @@ int qmus2mid(InputStream mus, Object mid, boolean nodisplay,
if (division != 89) {
LOGGER.log(Level.FINE, "MID file");
} else {
LOGGER.log(Level.FINE, String.format("Playing time: %dmin %dsec", min, sec));
LOGGER.log(Level.FINE, String.format("Playing time: %dmin %dsec", (int) min, (int) sec));
}
}
if (!nodisplay) {
Expand Down

0 comments on commit cd113d9

Please sign in to comment.