From ff6c0915fbbdc83f3b54033b1cde43c402972e6b Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Fri, 28 Jun 2013 15:43:22 -0700 Subject: Fix warning about change of sign: glyph_t is unsigned qsgdistancefieldglyphnode_p.cpp(222): warning #68: integer conversion resulted in a change of sign Use the value 0, which is reserved to mean "no texture" Change-Id: I0bb135639c432ab08f6561c1d45f64e2d8f96dd7 Reviewed-by: Gunnar Sletta --- src/quick/scenegraph/qsgdistancefieldglyphnode_p.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/quick/scenegraph/qsgdistancefieldglyphnode_p.cpp') diff --git a/src/quick/scenegraph/qsgdistancefieldglyphnode_p.cpp b/src/quick/scenegraph/qsgdistancefieldglyphnode_p.cpp index bdbce6165b..3556a4ebe5 100644 --- a/src/quick/scenegraph/qsgdistancefieldglyphnode_p.cpp +++ b/src/quick/scenegraph/qsgdistancefieldglyphnode_p.cpp @@ -219,7 +219,7 @@ QSGMaterialShader *QSGDistanceFieldTextMaterial::createShader() const bool QSGDistanceFieldTextMaterial::updateTextureSize() { if (!m_texture) - m_texture = m_glyph_cache->glyphTexture(-1); // invalid texture + m_texture = m_glyph_cache->glyphTexture(0); // invalid texture if (m_texture->size != m_size) { m_size = m_texture->size; @@ -240,8 +240,8 @@ int QSGDistanceFieldTextMaterial::compare(const QSGMaterial *o) const } if (m_color != other->m_color) return &m_color < &other->m_color ? -1 : 1; - int t0 = m_texture ? m_texture->textureId : -1; - int t1 = other->m_texture ? other->m_texture->textureId : -1; + int t0 = m_texture ? m_texture->textureId : 0; + int t1 = other->m_texture ? other->m_texture->textureId : 0; return t0 - t1; } -- cgit v1.2.3