summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorAshok Bhat <ashok.bhat@arm.com>2014-02-24 09:49:07 +0000
committerAshok Bhat <ashok.bhat@arm.com>2014-02-24 14:33:52 +0000
commit01c26ea89d4bbea3cf550e9328742302dd9a2b25 (patch)
tree5fbe1808a3c78504d0b77f84b788e008486c4c93 /core
parentbbfc08b3abc0934f67659f3238eb79dcac838c17 (diff)
downloadframeworks_base-01c26ea89d4bbea3cf550e9328742302dd9a2b25.zip
frameworks_base-01c26ea89d4bbea3cf550e9328742302dd9a2b25.tar.gz
frameworks_base-01c26ea89d4bbea3cf550e9328742302dd9a2b25.tar.bz2
Use reinterpret_cast when an integer is cast to a pointer
Note that files changed in this patch have been generated by running frameworks/native/opengl/tools/glgen/gen script. Change-Id: Iff3ac2e804af41b9a6ec073fd65019c6806fe821 Signed-off-by: Ashok Bhat <ashok.bhat@arm.com>
Diffstat (limited to 'core')
-rw-r--r--core/jni/android_opengl_GLES10.cpp2
-rw-r--r--core/jni/android_opengl_GLES10Ext.cpp2
-rw-r--r--core/jni/android_opengl_GLES11.cpp12
-rw-r--r--core/jni/android_opengl_GLES11Ext.cpp2
-rw-r--r--core/jni/android_opengl_GLES20.cpp12
-rw-r--r--core/jni/android_opengl_GLES30.cpp14
-rw-r--r--core/jni/com_google_android_gles_jni_GLImpl.cpp16
7 files changed, 30 insertions, 30 deletions
diff --git a/core/jni/android_opengl_GLES10.cpp b/core/jni/android_opengl_GLES10.cpp
index cc34e99..21e19e1 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 9284384..bc83234 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 871e84d..a45f269 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 3e038ad..05728ef 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 db03b70..d3e5014 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 4c62a75..8821352 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 b3b0049..7975987 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)
);
}