diff options
Diffstat (limited to 'src/gui/doc/snippets')
| -rw-r--r-- | src/gui/doc/snippets/rhioffscreen/main.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/gui/doc/snippets/rhioffscreen/main.cpp b/src/gui/doc/snippets/rhioffscreen/main.cpp index b3fac4b5201..217b07dcdad 100644 --- a/src/gui/doc/snippets/rhioffscreen/main.cpp +++ b/src/gui/doc/snippets/rhioffscreen/main.cpp @@ -82,9 +82,7 @@ int main(int argc, char **argv) ps->setTargetBlends({ premulAlphaBlend }); static auto getShader = [](const QString &name) { QFile f(name); - if (f.open(QIODevice::ReadOnly)) - return QShader::fromSerialized(f.readAll()); - return QShader(); + return f.open(QIODevice::ReadOnly) ? QShader::fromSerialized(f.readAll()) : QShader(); }; ps->setShaderStages({ { QRhiShaderStage::Vertex, getShader(QLatin1String("color.vert.qsb")) }, |
