Revision: 2789
http://svn.sourceforge.net/java-game-lib/?rev=2789&view=rev
Author: matzon
Date: 2007-04-19 15:49:49 -0700 (Thu, 19 Apr 2007)
Log Message:
-----------
removed some null checks
Modified Paths:
--------------
trunk/LWJGL/src/native/common/org_lwjgl_openal_ALC10.c
Modified: trunk/LWJGL/src/native/common/org_lwjgl_openal_ALC10.c
===================================================================
--- trunk/LWJGL/src/native/common/org_lwjgl_openal_ALC10.c 2007-04-19 22:44:07 UTC (rev 2788)
+++ trunk/LWJGL/src/native/common/org_lwjgl_openal_ALC10.c 2007-04-19 22:49:49 UTC (rev 2789)
@@ -179,11 +179,6 @@
}
context = alcCreateContext((ALCdevice*)((intptr_t)deviceaddress), address);
- /* if error - get out */
- if(context == NULL) {
- return (jlong) NULL;
- }
-
return (jlong)((intptr_t)context);
}
@@ -196,12 +191,7 @@
static jint JNICALL Java_org_lwjgl_openal_ALC10_nalcMakeContextCurrent (JNIEnv *env, jclass clazz, jlong contextaddress) {
ALCcontext* context = (ALCcontext*)((intptr_t)contextaddress);
ALCenum result;
- if(context == NULL) {
- result = alcMakeContextCurrent(NULL);
- } else {
- result = alcMakeContextCurrent(context);
- }
- return result;
+ return alcMakeContextCurrent(context);
}
/**
@@ -222,10 +212,6 @@
*/
static jlong JNICALL Java_org_lwjgl_openal_ALC10_nalcGetCurrentContext (JNIEnv *env, jclass clazz) {
ALCcontext* context = alcGetCurrentContext();
-
- if(context == NULL) {
- return (jlong) NULL;
- }
return (jlong)((intptr_t)context);
}
@@ -237,11 +223,6 @@
*/
static jlong JNICALL Java_org_lwjgl_openal_ALC10_nalcGetContextsDevice (JNIEnv *env, jclass clazz, jlong contextaddress) {
ALCdevice* device = alcGetContextsDevice((ALCcontext*)((intptr_t)contextaddress));
-
- if(device == NULL) {
- return (jlong) NULL;
- }
-
return (jlong)((intptr_t)device);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|