diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2019-09-30 12:00:43 -0700 |
---|---|---|
committer | Thiago Macieira <thiago.macieira@intel.com> | 2019-11-14 01:09:21 -0800 |
commit | 103d307f2e596e5e7d2eb706117223bf65264e5f (patch) | |
tree | eac8ad0b81cd66f8a9edc8f354831f7bb480e0f8 /src | |
parent | 9a14171a10c8f92c30a50b9e89aa50a06dbfeeb3 (diff) |
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>
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/rhi/qshader.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
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) { |