From 2d3237ef72a0ce908f1ca61e4f151e01dc8e27f3 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Mon, 10 Jul 2023 16:42:36 +0200 Subject: AL_SOFT_events: Define 'ALCcontext` as `UserParam` type for more clarity --- src/java/com/jogamp/openal/ALContextKey.java | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'src/java/com/jogamp/openal/ALContextKey.java') diff --git a/src/java/com/jogamp/openal/ALContextKey.java b/src/java/com/jogamp/openal/ALContextKey.java index 2e85a05..450c42b 100644 --- a/src/java/com/jogamp/openal/ALContextKey.java +++ b/src/java/com/jogamp/openal/ALContextKey.java @@ -43,15 +43,12 @@ public class ALContextKey { private final int hashCodeValue; /** Creates an instance using the current context as key. */ - public ALContextKey( final Object userParam ) { - if( null == userParam ) { - throw new IllegalArgumentException("userParam null"); - } - if( !(userParam instanceof ALCcontext) ) { - throw new IllegalArgumentException("userParam not ALCcontext but "+userParam.getClass()); + public ALContextKey( final ALCcontext context ) { + if( null == context ) { + throw new IllegalArgumentException("null context"); } // alCtx = alc.alcGetCurrentContext(); - alCtx = (ALCcontext) userParam; + alCtx = context; if( null != alCtx ) { nativeAddress = alCtx.getDirectBufferAddress(); hashCodeValue = HashUtil.getAddrHash32_EqualDist(nativeAddress); -- cgit v1.2.3