Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Primitive class wrappers are not unwrapped #84

Open
ichttt opened this issue Sep 6, 2020 · 0 comments
Open

Primitive class wrappers are not unwrapped #84

ichttt opened this issue Sep 6, 2020 · 0 comments

Comments

@ichttt
Copy link
Member

ichttt commented Sep 6, 2020

(Originally opened as MinecraftForge/ForgeGradle#713 on the wrong repo)
This is a very minor enchancement, but it should be pretty easy to implement

See InputMapping clinit:

      MethodType methodtype = MethodType.methodType(Boolean.TYPE);
      MethodHandle methodhandle = null;
      int i = 0;

      try {
         methodhandle = lookup.findStatic(GLFW.class, "glfwRawMouseMotionSupported", methodtype);
         MethodHandle methodhandle1 = lookup.findStaticGetter(GLFW.class, "GLFW_RAW_MOUSE_MOTION", Integer.TYPE);

Integer.TYPE and Boolean.TYPE should be replaced with int.class and boolean.class respectively, as that's more easy to understand (the compiler converts any primitive .class call to the respective wrapper class .TYPE)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant