am aaa27fd5
: Merge "Use reinterpret_cast when an integer is cast to a pointer"
* commit 'aaa27fd5a0bb81ac17c25c33beb2656b32100cd6': Use reinterpret_cast when an integer is cast to a pointer
This commit is contained in:
commit
aa01ad91cd
@ -1283,7 +1283,7 @@ public class JniCodeEmitter {
|
||||
for (int i = 0; i < numArgs; i++) {
|
||||
String typecast;
|
||||
if (i == numArgs - 1 && isPointerOffsetFunc) {
|
||||
typecast = "(GLvoid *)";
|
||||
typecast = "reinterpret_cast<GLvoid *>";
|
||||
} else {
|
||||
typecast = "(" + cfunc.getArgType(i).getDeclaration() + ")";
|
||||
}
|
||||
@ -1297,6 +1297,8 @@ public class JniCodeEmitter {
|
||||
if (cfunc.getArgType(i).isEGLHandle() &&
|
||||
!cfunc.getArgType(i).isPointer()){
|
||||
out.print(cfunc.getArgName(i)+"_native");
|
||||
} else if (i == numArgs - 1 && isPointerOffsetFunc){
|
||||
out.print("("+cfunc.getArgName(i)+")");
|
||||
} else {
|
||||
out.print(cfunc.getArgName(i));
|
||||
}
|
||||
|
@ -89,7 +89,7 @@ getPointer(JNIEnv *_env, jobject buffer, jarray *array, jint *remaining, jint *o
|
||||
getBasePointerID, buffer);
|
||||
if (pointer != 0L) {
|
||||
*array = NULL;
|
||||
return (void *) (jint) pointer;
|
||||
return reinterpret_cast<void*>(pointer);
|
||||
}
|
||||
|
||||
*array = (jarray) _env->CallStaticObjectMethod(nioAccessClass,
|
||||
|
@ -157,7 +157,7 @@ android_glGetActiveAttrib__IIILjava_nio_IntBuffer_2Ljava_nio_IntBuffer_2Ljava_ni
|
||||
(GLsizei *)length,
|
||||
(GLint *)size,
|
||||
(GLenum *)type,
|
||||
(char *)name
|
||||
reinterpret_cast<char *>(name)
|
||||
);
|
||||
if (_typeArray) {
|
||||
releasePointer(_env, _typeArray, type, JNI_TRUE);
|
||||
|
@ -157,7 +157,7 @@ android_glGetActiveUniform__IIILjava_nio_IntBuffer_2Ljava_nio_IntBuffer_2Ljava_n
|
||||
(GLsizei *)length,
|
||||
(GLint *)size,
|
||||
(GLenum *)type,
|
||||
(char *)name
|
||||
reinterpret_cast<char *>(name)
|
||||
);
|
||||
if (_typeArray) {
|
||||
releasePointer(_env, _typeArray, type, JNI_TRUE);
|
||||
|
@ -85,7 +85,7 @@ android_glGetShaderSource__IILjava_nio_IntBuffer_2B
|
||||
(GLuint)shader,
|
||||
(GLsizei)bufsize,
|
||||
(GLsizei *)length,
|
||||
(char *)source
|
||||
reinterpret_cast<char *>(source)
|
||||
);
|
||||
if (_array) {
|
||||
releasePointer(_env, _array, length, JNI_TRUE);
|
||||
|
@ -128,7 +128,7 @@ getPointer(JNIEnv *_env, jobject buffer, jarray *array, jint *remaining, jint *o
|
||||
getBasePointerID, buffer);
|
||||
if (pointer != 0L) {
|
||||
*array = NULL;
|
||||
return (void *) (jint) pointer;
|
||||
return reinterpret_cast<void *>(pointer);
|
||||
}
|
||||
|
||||
*array = (jarray) _env->CallStaticObjectMethod(nioAccessClass,
|
||||
|
Loading…
Reference in New Issue
Block a user