[Coverity] Fix some enum-enum casting, by going via int.

This commit is contained in:
baldurk
2016-07-20 17:49:14 +02:00
parent 95b18e25f5
commit b1d917b52b
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -4447,7 +4447,7 @@ void D3D11DebugManager::InitPostVSBuffers(uint32_t eventID)
if(decl.declaration == DXBC::OPCODE_DCL_GS_OUTPUT_PRIMITIVE_TOPOLOGY)
{
topo = (D3D11_PRIMITIVE_TOPOLOGY)decl.outTopology; // enums match
topo = (D3D11_PRIMITIVE_TOPOLOGY) int(decl.outTopology); // enums match
break;
}
}
@@ -1172,7 +1172,7 @@ void DXBCFile::GuessResources()
desc.bindPoint = idx;
desc.bindCount = 1;
desc.flags = 0;
desc.retType = (ShaderInputBind::RetType)dcl.resType[0];
desc.retType = (ShaderInputBind::RetType) int(dcl.resType[0]); // enums match
desc.dimension =
dcl.dim == RESOURCE_DIMENSION_TEXTURE1D
? ShaderInputBind::DIM_TEXTURE1D
+1 -1
View File
@@ -1842,7 +1842,7 @@ VulkanDebugManager::VulkanDebugManager(WrappedVulkan *driver, VkDevice dev)
NULL,
0,
m_TexDisplayDummyImages[index],
VkImageViewType(types[type]), // image/view type enums overlap for 1D/2D/3D
VkImageViewType(int(types[type])), // image/view type enums overlap for 1D/2D/3D
formats[fmt],
{VK_COMPONENT_SWIZZLE_IDENTITY, VK_COMPONENT_SWIZZLE_IDENTITY,
VK_COMPONENT_SWIZZLE_IDENTITY, VK_COMPONENT_SWIZZLE_IDENTITY},