Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- bool qt_resolve_glsl_extensions(QGLContext *ctx)
- {
- ...
- return glCreateShader &&
- glShaderSource &&
- glCompileShader &&
- glDeleteProgram && <<<---
- glCreateProgram &&
- glAttachShader &&
- glDetachShader &&
- glLinkProgram &&
- glUseProgram &&
- glDeleteProgram && <<<---
- glGetShaderInfoLog &&
- glGetShaderiv &&
- glGetShaderSource &&
- glGetProgramiv &&
- glGetProgramInfoLog &&
- glGetUniformLocation &&
- glUniform1fv &&
- glUniform2fv &&
- glUniform3fv &&
- glUniform4fv &&
- glUniform1i &&
- glUniform1iv &&
- glUniformMatrix2fv &&
- glUniformMatrix3fv &&
- glUniformMatrix4fv &&
- glBindAttribLocation &&
- glGetAttribLocation &&
- glVertexAttrib1fv &&
- glVertexAttrib2fv &&
- glVertexAttrib3fv &&
- glVertexAttrib4fv &&
- glVertexAttribPointer &&
- glDisableVertexAttribArray &&
- glEnableVertexAttribArray;
- ...
- }
- There's no error. It's just an unnecessary line. It is still useful to find and fix such code fragments: your code will become a bit shorter.
- This suspicious code was found in QT project by PVS-Studio static code analyzer.
- Warning message is:
- V501 There are identical sub-expressions to the left and to the right of the '&&' operator. QtOpenGL qglextensions.cpp 367
- PVS-Studio is a static analyzer for detecting bugs in the source code of applications written in C, C++, C++11, C++/CX. Site: http://www.viva64.com/en/pvs-studio/
Advertisement
Add Comment
Please, Sign In to add comment