diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2013-06-28 15:43:22 -0700 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-07-03 08:46:54 +0200 |
commit | ff6c0915fbbdc83f3b54033b1cde43c402972e6b (patch) | |
tree | 37d3a4d782937aabd998d88608afffc45b30c166 /src/quick/scenegraph/qsgdistancefieldglyphnode_p.cpp | |
parent | 24ab4e7b01bcfbcac23aa6b49d756176c17e46d4 (diff) |
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 <gunnar.sletta@digia.com>
Diffstat (limited to 'src/quick/scenegraph/qsgdistancefieldglyphnode_p.cpp')
-rw-r--r-- | src/quick/scenegraph/qsgdistancefieldglyphnode_p.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
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; } |