jpeg pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=f6e73c79039f1cb0a8b334dad299eaec607f4b82
commit f6e73c79039f1cb0a8b334dad299eaec607f4b82 Author: Jean-Philippe Andre <jp.an...@samsung.com> Date: Mon Nov 24 18:46:49 2014 +0900 Evas GL common: Cosmetic change Don't cast "ext" a hundred times when you can do it once. --- .../evas/engines/gl_common/evas_gl_context.c | 38 +++++++++++----------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/src/modules/evas/engines/gl_common/evas_gl_context.c b/src/modules/evas/engines/gl_common/evas_gl_context.c index 7d774d9..19c1a2e 100644 --- a/src/modules/evas/engines/gl_common/evas_gl_context.c +++ b/src/modules/evas/engines/gl_common/evas_gl_context.c @@ -565,49 +565,49 @@ evas_gl_common_context_new(void) if (!shared) { - const GLubyte *ext; + const char *ext; shared = calloc(1, sizeof(Evas_GL_Shared)); - ext = glGetString(GL_EXTENSIONS); + ext = (const char *) glGetString(GL_EXTENSIONS); if (ext) { if (getenv("EVAS_GL_INFO")) fprintf(stderr, "EXT:\n%s\n", ext); - if ((strstr((char *)ext, "GL_ARB_texture_non_power_of_two")) || - (strstr((char *)ext, "OES_texture_npot")) || - (strstr((char *)ext, "GL_IMG_texture_npot"))) + if ((strstr(ext, "GL_ARB_texture_non_power_of_two")) || + (strstr(ext, "OES_texture_npot")) || + (strstr(ext, "GL_IMG_texture_npot"))) shared->info.tex_npo2 = 1; - if ((strstr((char *)ext, "GL_NV_texture_rectangle")) || - (strstr((char *)ext, "GL_EXT_texture_rectangle")) || - (strstr((char *)ext, "GL_ARB_texture_rectangle"))) + if ((strstr(ext, "GL_NV_texture_rectangle")) || + (strstr(ext, "GL_EXT_texture_rectangle")) || + (strstr(ext, "GL_ARB_texture_rectangle"))) shared->info.tex_rect = 1; - if ((strstr((char *)ext, "GL_ARB_get_program_binary")) || - (strstr((char *)ext, "GL_OES_get_program_binary"))) + if ((strstr(ext, "GL_ARB_get_program_binary")) || + (strstr(ext, "GL_OES_get_program_binary"))) shared->info.bin_program = 1; else glsym_glGetProgramBinary = NULL; #ifdef GL_UNPACK_ROW_LENGTH shared->info.unpack_row_length = 1; # ifdef GL_GLES - if (!strstr((char *)ext, "_unpack_subimage")) + if (!strstr(ext, "_unpack_subimage")) shared->info.unpack_row_length = 0; # endif #endif #ifdef GL_TEXTURE_MAX_ANISOTROPY_EXT - if ((strstr((char *)ext, "GL_EXT_texture_filter_anisotropic"))) + if ((strstr(ext, "GL_EXT_texture_filter_anisotropic"))) glGetFloatv(GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT, &(shared->info.anisotropic)); #endif #ifdef GL_BGRA - if ((strstr((char *)ext, "GL_EXT_bgra")) || - (strstr((char *)ext, "GL_EXT_texture_format_BGRA8888"))) + if ((strstr(ext, "GL_EXT_bgra")) || + (strstr(ext, "GL_EXT_texture_format_BGRA8888"))) shared->info.bgra = 1; #endif - if (strstr((char *)ext, "OES_compressed_ETC1_RGB8_texture")) + if (strstr(ext, "OES_compressed_ETC1_RGB8_texture")) shared->info.etc1 = 1; - if (strstr((char *)ext, "GL_EXT_texture_compression_s3tc") || - strstr((char *)ext, "GL_S3_s3tc")) + if (strstr(ext, "GL_EXT_texture_compression_s3tc") || + strstr(ext, "GL_S3_s3tc")) shared->info.s3tc = 1; #ifdef GL_GLES // FIXME: there should be an extension name/string to check for @@ -628,7 +628,7 @@ evas_gl_common_context_new(void) shared->info.sec_image_map = 1; } #endif - if (!strstr((char *)ext, "GL_QCOM_tiled_rendering")) + if (!strstr(ext, "GL_QCOM_tiled_rendering")) { glsym_glStartTiling = NULL; glsym_glEndTiling = NULL; @@ -725,7 +725,7 @@ evas_gl_common_context_new(void) // Note: If we support ETC2 we'll try to always use ETC2 even when the // image has colorspace ETC1 (backwards compatibility). - if (ext && strstr((char *)ext, "GL_EXT_compressed_ETC1_RGB8_sub_texture")) + if (ext && strstr(ext, "GL_EXT_compressed_ETC1_RGB8_sub_texture")) shared->info.etc1_subimage = 1; else shared->info.etc1_subimage = shared->info.etc2; --