mirror of
https://github.com/AngelAuraMC/Amethyst-Android.git
synced 2025-09-15 23:59:21 -04:00
Use HashMap.getOrDefault()
This commit is contained in:
parent
1f1d542ed7
commit
b0af8e43f4
@ -892,11 +892,7 @@ public class GLFW
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static int glfwGetWindowAttrib(@NativeType("GLFWwindow *") long window, int attrib) {
|
public static int glfwGetWindowAttrib(@NativeType("GLFWwindow *") long window, int attrib) {
|
||||||
Object obj = internalGetWindow(window).windowAttribs.get(attrib);
|
return internalGetWindow(window).windowAttribs.getOrDefault(attrib, 0);
|
||||||
if (obj == null) {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
return (int) obj;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void glfwSetWindowAttrib(@NativeType("GLFWwindow *") long window, int attrib, int value) {
|
public static void glfwSetWindowAttrib(@NativeType("GLFWwindow *") long window, int attrib, int value) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user