mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-07-13 11:07:08 +00:00
Fix conditional branches on 'constant' values
* Reported by Coverity Scan
This commit is contained in:
@@ -1476,7 +1476,6 @@ void VulkanPipelineStateViewer::setState()
|
||||
int i = 0;
|
||||
for(const VKPipe::VertexAttribute &a : state.VI.attrs)
|
||||
{
|
||||
bool filledSlot = true;
|
||||
bool usedSlot = false;
|
||||
|
||||
QString name = tr("Attribute %1").arg(i);
|
||||
@@ -1494,7 +1493,7 @@ void VulkanPipelineStateViewer::setState()
|
||||
}
|
||||
}
|
||||
|
||||
if(showNode(usedSlot, filledSlot))
|
||||
if(showNode(usedSlot, /*filledSlot*/ true))
|
||||
{
|
||||
RDTreeWidgetItem *node = new RDTreeWidgetItem(
|
||||
{i, name, a.location, a.binding, a.format.Name(), a.byteoffset, QString()});
|
||||
@@ -1886,10 +1885,9 @@ void VulkanPipelineStateViewer::setState()
|
||||
int i = 0;
|
||||
for(const VKPipe::Blend &blend : state.CB.attachments)
|
||||
{
|
||||
bool filledSlot = true;
|
||||
bool usedSlot = (targets[i]);
|
||||
|
||||
if(showNode(usedSlot, filledSlot))
|
||||
if(showNode(usedSlot, /*filledSlot*/ true))
|
||||
{
|
||||
RDTreeWidgetItem *node = new RDTreeWidgetItem(
|
||||
{i, blend.blendEnable ? tr("True") : tr("False"),
|
||||
@@ -1906,9 +1904,6 @@ void VulkanPipelineStateViewer::setState()
|
||||
.arg((blend.writeMask & 0x4) == 0 ? lit("_") : lit("B"))
|
||||
.arg((blend.writeMask & 0x8) == 0 ? lit("_") : lit("A"))});
|
||||
|
||||
if(!filledSlot)
|
||||
setEmptyRow(node);
|
||||
|
||||
if(!usedSlot)
|
||||
setInactiveRow(node);
|
||||
|
||||
|
||||
@@ -299,11 +299,13 @@ public:
|
||||
m_StructureStack.pop_back();
|
||||
}
|
||||
|
||||
#if !defined(__COVERITY__)
|
||||
if(tempAlloc)
|
||||
{
|
||||
FreeAlignedBuffer(tempAlloc);
|
||||
el = NULL;
|
||||
}
|
||||
#endif
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user