Fix couple of warnings reported by MSVC
authorPyry Haulos <phaulos@google.com>
Wed, 18 Mar 2015 21:32:13 +0000 (14:32 -0700)
committerPyry Haulos <phaulos@google.com>
Wed, 18 Mar 2015 21:32:13 +0000 (14:32 -0700)
Change-Id: Icd4e5a545197d052d5705266e24de2bad881bafd

framework/common/tcuMaybe.hpp
modules/gles31/functional/es31fDrawBuffersIndexedTests.cpp

index 29f39f8..e1dd994 100644 (file)
@@ -47,7 +47,7 @@ public:
        const T&        operator*               (void) const { return get(); }
 
        const T*        operator->              (void) const;
-                               operator bool   (void) const { return m_ptr; }
+                               operator bool   (void) const { return !!m_ptr; }
 
 private:
        T*                              m_ptr;
index f851c70..aecbe46 100644 (file)
@@ -413,7 +413,7 @@ void genRenderbuffers (const glw::Functions&                        gl,
                GLU_EXPECT_NO_ERROR(gl.getError(), "Failed to create renderbuffer.");
        }
 
-       gl.drawBuffers(bufs.size(), &(bufs[0]));
+       gl.drawBuffers((glw::GLsizei)bufs.size(), &(bufs[0]));
 
        for (int renderbufferNdx = 0; renderbufferNdx < (int)drawBuffers.size(); renderbufferNdx++)
        {
@@ -995,7 +995,7 @@ void renderQuad (TestLog&                                           log,
 
        setCommonBlendState(gl, postCommonBlendState);
 
-       gl.drawBuffers(bufs.size(), &(bufs[0]));
+       gl.drawBuffers((glw::GLsizei)bufs.size(), &(bufs[0]));
 
        if (requiresBlendBarriers)
                gl.blendBarrierKHR();