From f97501524a273872375310c8795b74c082bf9fa2 Mon Sep 17 00:00:00 2001 From: Volker Hilsheimer Date: Thu, 23 Feb 2023 15:47:07 +0100 Subject: [PATCH] Fix warning from signed/unsigned mismatch Seen (and breaking local build) with VC++2022: qrhid3d12_p_p.h(206): warning C4018: '<': signed/unsigned mismatch QD3D12ObjectHandle::index is a quint32, whereas data is a QVector, with count() returning a signed qsizetype. Pick-to: 6.5 Change-Id: I81946459ea9222dee2cbb2ae4589fb0e4028f5dd Reviewed-by: Kristoffer Skau Reviewed-by: Laszlo Agocs --- src/gui/rhi/qrhid3d12_p_p.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/rhi/qrhid3d12_p_p.h b/src/gui/rhi/qrhid3d12_p_p.h index 9f72055e7c..dec217e771 100644 --- a/src/gui/rhi/qrhid3d12_p_p.h +++ b/src/gui/rhi/qrhid3d12_p_p.h @@ -203,7 +203,7 @@ struct QD3D12ObjectPool bool isValid(const QD3D12ObjectHandle &handle) const { return handle.index > 0 - && handle.index < data.count() + && handle.index < quint32(data.count()) && handle.generation > 0 && handle.generation == data[handle.index].generation && data[handle.index].object.has_value();