diff options
author | 2014-03-11 00:53:11 +0000 | |
---|---|---|
committer | 2014-03-11 00:53:11 +0000 | |
commit | 3ba975e75d1e09142dd6258fb9886d526f5cda69 (patch) | |
tree | 193d4f12199ea4fbd6eb65dad6cf7c37d2f2f736 | |
parent | 5bf28c1ec82afce6cb4ba690091f5072776c18a3 (diff) | |
parent | 7fe5978bf7c4b473d8f6db5a12cfdcd110511331 (diff) |
am 7fe5978b: am 2ba70fd4: Merge "Use reinterpret_cast when an integer is cast to a pointer"
* commit '7fe5978bf7c4b473d8f6db5a12cfdcd110511331':
Use reinterpret_cast when an integer is cast to a pointer
-rw-r--r-- | core/jni/android_opengl_GLES10.cpp | 2 | ||||
-rw-r--r-- | core/jni/android_opengl_GLES10Ext.cpp | 2 | ||||
-rw-r--r-- | core/jni/android_opengl_GLES11.cpp | 12 | ||||
-rw-r--r-- | core/jni/android_opengl_GLES11Ext.cpp | 2 | ||||
-rw-r--r-- | core/jni/android_opengl_GLES20.cpp | 12 | ||||
-rw-r--r-- | core/jni/android_opengl_GLES30.cpp | 14 | ||||
-rw-r--r-- | core/jni/com_google_android_gles_jni_GLImpl.cpp | 16 |
7 files changed, 30 insertions, 30 deletions
diff --git a/core/jni/android_opengl_GLES10.cpp b/core/jni/android_opengl_GLES10.cpp index cc34e9932f9c..21e19e13b34c 100644 --- a/core/jni/android_opengl_GLES10.cpp +++ b/core/jni/android_opengl_GLES10.cpp @@ -111,7 +111,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, diff --git a/core/jni/android_opengl_GLES10Ext.cpp b/core/jni/android_opengl_GLES10Ext.cpp index 9284384ff763..bc832340869e 100644 --- a/core/jni/android_opengl_GLES10Ext.cpp +++ b/core/jni/android_opengl_GLES10Ext.cpp @@ -111,7 +111,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, diff --git a/core/jni/android_opengl_GLES11.cpp b/core/jni/android_opengl_GLES11.cpp index 871e84d19f85..a45f2694d8e4 100644 --- a/core/jni/android_opengl_GLES11.cpp +++ b/core/jni/android_opengl_GLES11.cpp @@ -111,7 +111,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, @@ -578,7 +578,7 @@ android_glColorPointer__IIII (GLint)size, (GLenum)type, (GLsizei)stride, - (GLvoid *)offset + reinterpret_cast<GLvoid *>(offset) ); } @@ -679,7 +679,7 @@ android_glDrawElements__IIII (GLenum)mode, (GLsizei)count, (GLenum)type, - (GLvoid *)offset + reinterpret_cast<GLvoid *>(offset) ); if (_exception) { jniThrowException(_env, _exceptionType, _exceptionMessage); @@ -2302,7 +2302,7 @@ android_glNormalPointer__III glNormalPointer( (GLenum)type, (GLsizei)stride, - (GLvoid *)offset + reinterpret_cast<GLvoid *>(offset) ); } @@ -2529,7 +2529,7 @@ android_glTexCoordPointer__IIII (GLint)size, (GLenum)type, (GLsizei)stride, - (GLvoid *)offset + reinterpret_cast<GLvoid *>(offset) ); } @@ -2937,7 +2937,7 @@ android_glVertexPointer__IIII (GLint)size, (GLenum)type, (GLsizei)stride, - (GLvoid *)offset + reinterpret_cast<GLvoid *>(offset) ); } diff --git a/core/jni/android_opengl_GLES11Ext.cpp b/core/jni/android_opengl_GLES11Ext.cpp index 3e038ad1ff39..05728ef78a3c 100644 --- a/core/jni/android_opengl_GLES11Ext.cpp +++ b/core/jni/android_opengl_GLES11Ext.cpp @@ -111,7 +111,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, diff --git a/core/jni/android_opengl_GLES20.cpp b/core/jni/android_opengl_GLES20.cpp index db03b708414a..d3e50147d461 100644 --- a/core/jni/android_opengl_GLES20.cpp +++ b/core/jni/android_opengl_GLES20.cpp @@ -111,7 +111,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, @@ -1180,7 +1180,7 @@ android_glDrawElements__IIII (GLenum)mode, (GLsizei)count, (GLenum)type, - (GLvoid *)offset + reinterpret_cast<GLvoid *>(offset) ); if (_exception) { jniThrowException(_env, _exceptionType, _exceptionMessage); @@ -1804,7 +1804,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); @@ -2132,7 +2132,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); @@ -3212,7 +3212,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); @@ -5985,7 +5985,7 @@ android_glVertexAttribPointer__IIIZII (GLenum)type, (GLboolean)normalized, (GLsizei)stride, - (GLvoid *)offset + reinterpret_cast<GLvoid *>(offset) ); } diff --git a/core/jni/android_opengl_GLES30.cpp b/core/jni/android_opengl_GLES30.cpp index 4c62a753f4f8..8821352106fb 100644 --- a/core/jni/android_opengl_GLES30.cpp +++ b/core/jni/android_opengl_GLES30.cpp @@ -111,7 +111,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, @@ -370,7 +370,7 @@ android_glDrawRangeElements__IIIIII (GLuint)end, (GLsizei)count, (GLenum)type, - (GLvoid *)offset + reinterpret_cast<GLvoid *>(offset) ); } @@ -419,7 +419,7 @@ android_glTexImage3D__IIIIIIIIII (GLint)border, (GLenum)format, (GLenum)type, - (GLvoid *)offset + reinterpret_cast<GLvoid *>(offset) ); } @@ -470,7 +470,7 @@ android_glTexSubImage3D__IIIIIIIIIII (GLsizei)depth, (GLenum)format, (GLenum)type, - (GLvoid *)offset + reinterpret_cast<GLvoid *>(offset) ); } @@ -534,7 +534,7 @@ android_glCompressedTexImage3D__IIIIIIIII (GLsizei)depth, (GLint)border, (GLsizei)imageSize, - (GLvoid *)offset + reinterpret_cast<GLvoid *>(offset) ); } @@ -585,7 +585,7 @@ android_glCompressedTexSubImage3D__IIIIIIIIIII (GLsizei)depth, (GLenum)format, (GLsizei)imageSize, - (GLvoid *)offset + reinterpret_cast<GLvoid *>(offset) ); } @@ -2134,7 +2134,7 @@ android_glVertexAttribIPointer__IIIII (GLint)size, (GLenum)type, (GLsizei)stride, - (GLvoid *)offset + reinterpret_cast<GLvoid *>(offset) ); } diff --git a/core/jni/com_google_android_gles_jni_GLImpl.cpp b/core/jni/com_google_android_gles_jni_GLImpl.cpp index b3b004970b6f..7975987844de 100644 --- a/core/jni/com_google_android_gles_jni_GLImpl.cpp +++ b/core/jni/com_google_android_gles_jni_GLImpl.cpp @@ -129,7 +129,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, @@ -4359,7 +4359,7 @@ android_glColorPointer__IIII (GLint)size, (GLenum)type, (GLsizei)stride, - (GLvoid *)offset + reinterpret_cast<GLvoid *>(offset) ); } @@ -4460,7 +4460,7 @@ android_glDrawElements__IIII (GLenum)mode, (GLsizei)count, (GLenum)type, - (GLvoid *)offset + reinterpret_cast<GLvoid *>(offset) ); if (_exception) { jniThrowException(_env, _exceptionType, _exceptionMessage); @@ -6099,7 +6099,7 @@ android_glNormalPointer__III glNormalPointer( (GLenum)type, (GLsizei)stride, - (GLvoid *)offset + reinterpret_cast<GLvoid *>(offset) ); } @@ -6326,7 +6326,7 @@ android_glTexCoordPointer__IIII (GLint)size, (GLenum)type, (GLsizei)stride, - (GLvoid *)offset + reinterpret_cast<GLvoid *>(offset) ); } @@ -6756,7 +6756,7 @@ android_glVertexPointer__IIII (GLint)size, (GLenum)type, (GLsizei)stride, - (GLvoid *)offset + reinterpret_cast<GLvoid *>(offset) ); } @@ -7196,7 +7196,7 @@ android_glMatrixIndexPointerOES__IIII (GLint)size, (GLenum)type, (GLsizei)stride, - (GLvoid *)offset + reinterpret_cast<GLvoid *>(offset) ); } @@ -7232,7 +7232,7 @@ android_glWeightPointerOES__IIII (GLint)size, (GLenum)type, (GLsizei)stride, - (GLvoid *)offset + reinterpret_cast<GLvoid *>(offset) ); } |