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 <laszlo.agocs@qt.io>
This commit is contained in:
Thiago Macieira 2019-09-30 12:00:43 -07:00
parent 9a14171a10
commit 103d307f2e

View File

@ -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) {