aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/scenegraph/util/qsgflatcolormaterial.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/quick/scenegraph/util/qsgflatcolormaterial.cpp')
-rw-r--r--src/quick/scenegraph/util/qsgflatcolormaterial.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/quick/scenegraph/util/qsgflatcolormaterial.cpp b/src/quick/scenegraph/util/qsgflatcolormaterial.cpp
index a0c71b5340..28f6113a60 100644
--- a/src/quick/scenegraph/util/qsgflatcolormaterial.cpp
+++ b/src/quick/scenegraph/util/qsgflatcolormaterial.cpp
@@ -77,13 +77,13 @@ FlatColorMaterialShader::FlatColorMaterialShader()
void FlatColorMaterialShader::updateState(const RenderState &state, QSGMaterial *newEffect, QSGMaterial *oldEffect)
{
#if QT_CONFIG(opengl)
- Q_ASSERT(oldEffect == 0 || newEffect->type() == oldEffect->type());
+ Q_ASSERT(oldEffect == nullptr || newEffect->type() == oldEffect->type());
QSGFlatColorMaterial *oldMaterial = static_cast<QSGFlatColorMaterial *>(oldEffect);
QSGFlatColorMaterial *newMaterial = static_cast<QSGFlatColorMaterial *>(newEffect);
const QColor &c = newMaterial->color();
- if (oldMaterial == 0 || c != oldMaterial->color() || state.isOpacityDirty()) {
+ if (oldMaterial == nullptr || c != oldMaterial->color() || state.isOpacityDirty()) {
float opacity = state.opacity() * c.alphaF();
QVector4D v(c.redF() * opacity,
c.greenF() * opacity,
@@ -103,7 +103,7 @@ void FlatColorMaterialShader::updateState(const RenderState &state, QSGMaterial
char const *const *FlatColorMaterialShader::attributeNames() const
{
- static char const *const attr[] = { "vCoord", 0 };
+ static char const *const attr[] = { "vCoord", nullptr };
return attr;
}