Fixed compile warnings

This commit is contained in:
Endolf 2018-05-31 19:42:43 +01:00
parent c77ad3226c
commit a623d0c271

View file

@ -1,4 +1,4 @@
/** /*
* Copyright (C) 2006 Jeremy Booth (jeremy@newdawnsoftware.com) * Copyright (C) 2006 Jeremy Booth (jeremy@newdawnsoftware.com)
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@ -47,17 +47,14 @@ public class WinTabContext {
public synchronized void open() { public synchronized void open() {
this.hCTX = nOpen(window.getHwnd()); this.hCTX = nOpen(window.getHwnd());
List devices = new ArrayList(); List<WinTabDevice> devices = new ArrayList<>();
int numSupportedDevices = nGetNumberOfSupportedDevices(); int numSupportedDevices = nGetNumberOfSupportedDevices();
for(int i=0;i<numSupportedDevices;i++) { for(int i=0;i<numSupportedDevices;i++) {
WinTabDevice newDevice = WinTabDevice.createDevice(this,i); devices.add(WinTabDevice.createDevice(this,i));
if(newDevice!=null) {
devices.add(newDevice);
}
} }
controllers = (Controller[])devices.toArray(new Controller[0]); controllers = devices.toArray(new Controller[0]);
} }
public synchronized void close() { public synchronized void close() {