[Piglit] [PATCH 08/12] util/piglit-vbo: do not use 'and' in a conditional statement

Matt Turner mattst88 at gmail.com
Tue Aug 12 16:02:37 PDT 2014


On Tue, Aug 12, 2014 at 10:18 AM, Emil Velikov <emil.l.velikov at gmail.com> wrote:
> I'm not entirely sure how piglit build with gcc as is, yet VC compiler
> seems very unhappy about this.
>
> Signed-off-by: Emil Velikov <emil.l.velikov at gmail.com>
> ---
>  tests/util/piglit-vbo.cpp | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tests/util/piglit-vbo.cpp b/tests/util/piglit-vbo.cpp
> index 8a6ef90..19fddde 100644
> --- a/tests/util/piglit-vbo.cpp
> +++ b/tests/util/piglit-vbo.cpp
> @@ -284,7 +284,7 @@ vertex_attrib_description::setup(size_t *offset, size_t stride) const
>                 glVertexAttribPointer(this->index, this->count,
>                                       this->data_type, GL_FALSE, stride,
>                                       (void *) *offset);
> -       } else if (piglit_is_gles() and piglit_get_gl_version() < 30) {
> +       } else if (piglit_is_gles() && piglit_get_gl_version() < 30) {

Regardless of whether 'and' is available in the language or via some
header, I'm in favor of not using it.


More information about the Piglit mailing list