From 103d307f2e596e5e7d2eb706117223bf65264e5f Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Mon, 30 Sep 2019 12:00:43 -0700 Subject: Be explicit about QDataStream serialization: explicit casts to int The reader uses int variables, so use the same in the writer. Change-Id: I1496b069cc534f1a838dfffd15c94c7cacd3dd93 Reviewed-by: Laszlo Agocs --- src/gui/rhi/qshader.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/gui/rhi/qshader.cpp b/src/gui/rhi/qshader.cpp index c22b029dc8..9d35d83336 100644 --- a/src/gui/rhi/qshader.cpp +++ b/src/gui/rhi/qshader.cpp @@ -348,10 +348,10 @@ void QShader::removeShader(const QShaderKey &key) static void writeShaderKey(QDataStream *ds, const QShaderKey &k) { - *ds << k.source(); + *ds << int(k.source()); *ds << k.sourceVersion().version(); *ds << k.sourceVersion().flags(); - *ds << k.sourceVariant(); + *ds << int(k.sourceVariant()); } /*! @@ -369,7 +369,7 @@ QByteArray QShader::serialized() const return QByteArray(); ds << QSB_VERSION; - ds << d->stage; + ds << int(d->stage); ds << d->desc.toBinaryJson(); ds << d->shaders.count(); for (auto it = d->shaders.cbegin(), itEnd = d->shaders.cend(); it != itEnd; ++it) { -- cgit v1.2.3