aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/scenegraph
diff options
context:
space:
mode:
authorFabian Kosmale <fabian.kosmale@qt.io>2020-04-16 12:54:59 +0200
committerFabian Kosmale <fabian.kosmale@qt.io>2020-04-16 14:47:55 +0200
commitc3fcbe73189b26e49ad8fa824b2b8e6b7db0a8f4 (patch)
treeb603742c87fcb512c13a5eb2a02a3ff59c34d543 /src/quick/scenegraph
parent3768ec496cb8be1b8bedafd08c19732a405dfeea (diff)
Change qHash return value to size_t
Else on Windows there's a warning: conversion from 'size_t' to 'uint', possible loss of data Change-Id: Ifed4899409a13fed31c206ae1e0f195280ee2925 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src/quick/scenegraph')
-rw-r--r--src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp4
-rw-r--r--src/quick/scenegraph/coreapi/qsgbatchrenderer_p.h4
-rw-r--r--src/quick/scenegraph/coreapi/qsgtexture.cpp2
-rw-r--r--src/quick/scenegraph/coreapi/qsgtexture_p.h2
-rw-r--r--src/quick/scenegraph/qsgrhishadereffectnode.cpp2
-rw-r--r--src/quick/scenegraph/util/qsgdepthstencilbuffer.cpp2
-rw-r--r--src/quick/scenegraph/util/qsgdepthstencilbuffer_p.h2
7 files changed, 9 insertions, 9 deletions
diff --git a/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp b/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp
index 5dac796f2a..ee96085c69 100644
--- a/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp
+++ b/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp
@@ -4637,7 +4637,7 @@ bool operator!=(const GraphicsState &a, const GraphicsState &b) Q_DECL_NOTHROW
return !(a == b);
}
-uint qHash(const GraphicsState &s, uint seed) Q_DECL_NOTHROW
+size_t qHash(const GraphicsState &s, uint seed) Q_DECL_NOTHROW
{
// do not bother with all fields
return seed
@@ -4665,7 +4665,7 @@ bool operator!=(const GraphicsPipelineStateKey &a, const GraphicsPipelineStateKe
return !(a == b);
}
-uint qHash(const GraphicsPipelineStateKey &k, uint seed) Q_DECL_NOTHROW
+size_t qHash(const GraphicsPipelineStateKey &k, uint seed) Q_DECL_NOTHROW
{
// no srb and rp included due to their special comparison semantics and lack of hash keys
return qHash(k.state, seed) + qHash(k.sms->programRhi.program, seed);
diff --git a/src/quick/scenegraph/coreapi/qsgbatchrenderer_p.h b/src/quick/scenegraph/coreapi/qsgbatchrenderer_p.h
index b48220fb8c..da58b98a72 100644
--- a/src/quick/scenegraph/coreapi/qsgbatchrenderer_p.h
+++ b/src/quick/scenegraph/coreapi/qsgbatchrenderer_p.h
@@ -645,7 +645,7 @@ struct GraphicsState
bool operator==(const GraphicsState &a, const GraphicsState &b) Q_DECL_NOTHROW;
bool operator!=(const GraphicsState &a, const GraphicsState &b) Q_DECL_NOTHROW;
-uint qHash(const GraphicsState &s, uint seed = 0) Q_DECL_NOTHROW;
+size_t qHash(const GraphicsState &s, uint seed = 0) Q_DECL_NOTHROW;
struct ShaderManagerShader;
@@ -659,7 +659,7 @@ struct GraphicsPipelineStateKey
bool operator==(const GraphicsPipelineStateKey &a, const GraphicsPipelineStateKey &b) Q_DECL_NOTHROW;
bool operator!=(const GraphicsPipelineStateKey &a, const GraphicsPipelineStateKey &b) Q_DECL_NOTHROW;
-uint qHash(const GraphicsPipelineStateKey &k, uint seed = 0) Q_DECL_NOTHROW;
+size_t qHash(const GraphicsPipelineStateKey &k, uint seed = 0) Q_DECL_NOTHROW;
struct ShaderManagerShader
{
diff --git a/src/quick/scenegraph/coreapi/qsgtexture.cpp b/src/quick/scenegraph/coreapi/qsgtexture.cpp
index 277b422d7c..00ba58d868 100644
--- a/src/quick/scenegraph/coreapi/qsgtexture.cpp
+++ b/src/quick/scenegraph/coreapi/qsgtexture.cpp
@@ -83,7 +83,7 @@ bool operator!=(const QSGSamplerDescription &a, const QSGSamplerDescription &b)
return !(a == b);
}
-uint qHash(const QSGSamplerDescription &s, uint seed) Q_DECL_NOTHROW
+size_t qHash(const QSGSamplerDescription &s, uint seed) Q_DECL_NOTHROW
{
const int f = s.filtering;
const int m = s.mipmapFiltering;
diff --git a/src/quick/scenegraph/coreapi/qsgtexture_p.h b/src/quick/scenegraph/coreapi/qsgtexture_p.h
index cd6eced3d7..091cf43d8f 100644
--- a/src/quick/scenegraph/coreapi/qsgtexture_p.h
+++ b/src/quick/scenegraph/coreapi/qsgtexture_p.h
@@ -72,7 +72,7 @@ Q_DECLARE_TYPEINFO(QSGSamplerDescription, Q_MOVABLE_TYPE);
bool operator==(const QSGSamplerDescription &a, const QSGSamplerDescription &b) Q_DECL_NOTHROW;
bool operator!=(const QSGSamplerDescription &a, const QSGSamplerDescription &b) Q_DECL_NOTHROW;
-uint qHash(const QSGSamplerDescription &s, uint seed = 0) Q_DECL_NOTHROW;
+size_t qHash(const QSGSamplerDescription &s, uint seed = 0) Q_DECL_NOTHROW;
class Q_QUICK_PRIVATE_EXPORT QSGTexturePrivate : public QObjectPrivate
{
diff --git a/src/quick/scenegraph/qsgrhishadereffectnode.cpp b/src/quick/scenegraph/qsgrhishadereffectnode.cpp
index e804dc96b7..bafd6beaa9 100644
--- a/src/quick/scenegraph/qsgrhishadereffectnode.cpp
+++ b/src/quick/scenegraph/qsgrhishadereffectnode.cpp
@@ -185,7 +185,7 @@ struct QSGRhiShaderMaterialTypeCache
QHash<Key, QSGMaterialType *> m_types;
};
-uint qHash(const QSGRhiShaderMaterialTypeCache::Key &key, uint seed = 0)
+size_t qHash(const QSGRhiShaderMaterialTypeCache::Key &key, uint seed = 0)
{
uint hash = seed;
for (int i = 0; i < 2; ++i)
diff --git a/src/quick/scenegraph/util/qsgdepthstencilbuffer.cpp b/src/quick/scenegraph/util/qsgdepthstencilbuffer.cpp
index 1154c06d7c..c6091758bb 100644
--- a/src/quick/scenegraph/util/qsgdepthstencilbuffer.cpp
+++ b/src/quick/scenegraph/util/qsgdepthstencilbuffer.cpp
@@ -207,7 +207,7 @@ void QSGDepthStencilBufferManager::insertBuffer(const QSharedPointer<QSGDepthSte
m_buffers.insert(buffer->m_format, buffer.toWeakRef());
}
-uint qHash(const QSGDepthStencilBuffer::Format &format)
+size_t qHash(const QSGDepthStencilBuffer::Format &format)
{
return qHash(qMakePair(format.size.width(), format.size.height()))
^ (uint(format.samples) << 12) ^ (uint(format.attachments) << 28);
diff --git a/src/quick/scenegraph/util/qsgdepthstencilbuffer_p.h b/src/quick/scenegraph/util/qsgdepthstencilbuffer_p.h
index 10c94a5954..dfcd854fc2 100644
--- a/src/quick/scenegraph/util/qsgdepthstencilbuffer_p.h
+++ b/src/quick/scenegraph/util/qsgdepthstencilbuffer_p.h
@@ -140,7 +140,7 @@ private:
friend class QSGDepthStencilBuffer;
};
-extern uint qHash(const QSGDepthStencilBuffer::Format &format);
+extern size_t qHash(const QSGDepthStencilBuffer::Format &format);
QT_END_NAMESPACE