no need to cast

This commit is contained in:
Anton Keks 2022-01-01 20:14:24 +02:00
parent 307c8f3ffc
commit 839dfedde6
2 changed files with 3 additions and 3 deletions

View File

@ -19,10 +19,10 @@ public interface WinIpHlpDll extends Library {
class Loader {
public static WinIpHlpDll load() {
try {
return (WinIpHlpDll) Native.loadLibrary("iphlpapi", WinIpHlpDll.class);
return Native.loadLibrary("iphlpapi", WinIpHlpDll.class);
}
catch (UnsatisfiedLinkError e) {
return (WinIpHlpDll) Native.loadLibrary("icmp", WinIpHlpDll.class);
return Native.loadLibrary("icmp", WinIpHlpDll.class);
}
}
}

View File

@ -7,7 +7,7 @@ public interface WinKernel32 extends Library {
WinKernel32 dll = Loader.load();
class Loader {
public static WinKernel32 load() {
return (WinKernel32) Native.loadLibrary("kernel32", WinKernel32.class);
return Native.loadLibrary("kernel32", WinKernel32.class);
}
}