cleanup: remove unnecessary boxing

This commit is contained in:
P0nk
2021-04-08 07:39:02 +02:00
parent 5c6f515d18
commit 7ff8190977
14 changed files with 150 additions and 151 deletions

View File

@@ -465,7 +465,7 @@ public class MapleMap {
public void removeMapObject(int num) {
objectWLock.lock();
try {
this.mapobjects.remove(Integer.valueOf(num));
this.mapobjects.remove(num);
} finally {
objectWLock.unlock();
}
@@ -611,7 +611,7 @@ public class MapleMap {
}
distn = Math.sqrt(distn);
return new Pair<>(getRoundedCoordinate(angle), Integer.valueOf((int)distn));
return new Pair<>(getRoundedCoordinate(angle), (int) distn);
}
private static void sortDropEntries(List<MonsterDropEntry> from, List<MonsterDropEntry> item, List<MonsterDropEntry> visibleQuest, List<MonsterDropEntry> otherQuest, MapleCharacter chr) {
@@ -1730,7 +1730,7 @@ public class MapleMap {
broadcastMessage(MaplePacketCreator.removeNPCController(obj.getObjectId()));
broadcastMessage(MaplePacketCreator.removeNPC(obj.getObjectId()));
this.mapobjects.remove(Integer.valueOf(obj.getObjectId()));
this.mapobjects.remove(obj.getObjectId());
}
}
} finally {
@@ -2520,7 +2520,7 @@ public class MapleMap {
}
objectWLock.lock();
try {
this.mapobjects.put(Integer.valueOf(chr.getObjectId()), chr);
this.mapobjects.put(chr.getObjectId(), chr);
} finally {
objectWLock.unlock();
}