From e729d53c8384757b6a5ada2491c7cd4ad07c8bfe Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Fri, 4 Aug 2023 00:07:36 +0200 Subject: JavaCallbackEmitter.emitJavaCallbackBodyPassJavaArguments(): Drop redundant arg 'MethodBinding jcbFuncCMethodBinding', use local 'info.cbFuncBinding' Since emitJavaCallbackBodyPassJavaArguments() is private now, only use case is to handle info.cbFuncBinding and we can drop the redundant argument. Similar to cleanup commit e9a2294b3f18bb4c4f38347ccf347058cb4642b3 --- src/java/com/jogamp/gluegen/JavaCallbackEmitter.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/java') diff --git a/src/java/com/jogamp/gluegen/JavaCallbackEmitter.java b/src/java/com/jogamp/gluegen/JavaCallbackEmitter.java index cb0de42..e9b5c93 100644 --- a/src/java/com/jogamp/gluegen/JavaCallbackEmitter.java +++ b/src/java/com/jogamp/gluegen/JavaCallbackEmitter.java @@ -823,7 +823,7 @@ public final class JavaCallbackEmitter { } unit.emit("(*env)->CallStatic" + CodeGenUtils.capitalizeString( jretType.getName() ) +"Method(env, cbClazz, cbMethod, "); // javaCallback.cbFuncCEmitter.emitBodyPassCArguments(); - emitJavaCallbackBodyPassJavaArguments(unit, jcbFuncCMethodEmitter.binding); + emitJavaCallbackBodyPassJavaArguments(unit); unit.emitln(");"); unit.emitln(" if( (*env)->ExceptionCheck(env) ) {"); unit.emitln(" fprintf(stderr, \"Info: Callback '"+jcbFriendlyBasename+"': Exception in Java Callback caught:\\n\");"); @@ -854,16 +854,16 @@ public final class JavaCallbackEmitter { return count; } - private int emitJavaCallbackBodyPassJavaArguments(final CodeUnit unit, final MethodBinding jcbFuncCMethodBinding) { + private int emitJavaCallbackBodyPassJavaArguments(final CodeUnit unit) { int count = 0; boolean needsComma = false; - for (int i = 0; i < jcbFuncCMethodBinding.getNumArguments(); i++) { + for (int i = 0; i < info.cbFuncBinding.getNumArguments(); i++) { if (needsComma) { unit.emit(", "); needsComma = false; } - final String baseArgName = jcbFuncCMethodBinding.getArgumentName(i); - final JavaType currentJavaType = jcbFuncCMethodBinding.getJavaArgumentType(i); + final String baseArgName = info.cbFuncBinding.getArgumentName(i); + final JavaType currentJavaType = info.cbFuncBinding.getJavaArgumentType(i); if( i != info.cbFuncUserParamIdx && currentJavaType.isCompoundTypeWrapper() ) { final String cBaseArgName = CodeGenUtils.capitalizeString( baseArgName ); unit.emit( "(*env)->CallStaticObjectMethod(env, cbClazzArg" + cBaseArgName + ", cbMethodArg" + cBaseArgName + ", " + baseArgName + "_jni)" ); -- cgit v1.2.3