From 1d0ba9953d2bdc7d43a47705b598df97197fb9f5 Mon Sep 17 00:00:00 2001 From: Egor Yusov Date: Sun, 9 Sep 2018 16:35:21 -0700 Subject: Fixing clang build error and warnings --- Graphics/GraphicsEngine/include/BufferBase.h | 2 +- Graphics/GraphicsEngine/include/RenderDeviceBase.h | 4 ++-- Graphics/GraphicsEngine/interface/GraphicsTypes.h | 2 +- Graphics/GraphicsEngine/src/ResourceMapping.cpp | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) (limited to 'Graphics/GraphicsEngine') diff --git a/Graphics/GraphicsEngine/include/BufferBase.h b/Graphics/GraphicsEngine/include/BufferBase.h index c676190c..f602027e 100644 --- a/Graphics/GraphicsEngine/include/BufferBase.h +++ b/Graphics/GraphicsEngine/include/BufferBase.h @@ -258,7 +258,7 @@ void BufferBasem_Desc.Mode == BUFFER_MODE_FORMATTED && ViewDesc.Format.ValueType == VT_UNDEFINED) LOG_ERROR_AND_THROW("Format must be specified when creating a view of a formatted buffer"); - if (this->m_Desc.Mode == BUFFER_MODE_FORMATTED || this->m_Desc.Mode == BUFFER_MODE_RAW && ViewDesc.Format.ValueType != VT_UNDEFINED) + if (this->m_Desc.Mode == BUFFER_MODE_FORMATTED || (this->m_Desc.Mode == BUFFER_MODE_RAW && ViewDesc.Format.ValueType != VT_UNDEFINED)) { if (ViewDesc.Format.NumComponents <= 0 || ViewDesc.Format.NumComponents > 4) LOG_ERROR_AND_THROW("Incorrect number of components (", Uint32{ViewDesc.Format.NumComponents}, "). 1, 2, 3, or 4 are allowed values"); diff --git a/Graphics/GraphicsEngine/include/RenderDeviceBase.h b/Graphics/GraphicsEngine/include/RenderDeviceBase.h index db7234e4..fcc3f4d6 100644 --- a/Graphics/GraphicsEngine/include/RenderDeviceBase.h +++ b/Graphics/GraphicsEngine/include/RenderDeviceBase.h @@ -223,8 +223,8 @@ public: m_SamplerObjAllocator (RawMemAllocator, SamplerObjSize, 32), m_PSOAllocator (RawMemAllocator, PSOSize, 128), m_SRBAllocator (RawMemAllocator, SRBSize, 1024), - m_FenceAllocator (RawMemAllocator, FenceSize, 16), - m_ResMappingAllocator (RawMemAllocator, sizeof(ResourceMappingImpl), 16) + m_ResMappingAllocator (RawMemAllocator, sizeof(ResourceMappingImpl), 16), + m_FenceAllocator (RawMemAllocator, FenceSize, 16) { // Initialize texture format info for( Uint32 Fmt = TEX_FORMAT_UNKNOWN; Fmt < TEX_FORMAT_NUM_FORMATS; ++Fmt ) diff --git a/Graphics/GraphicsEngine/interface/GraphicsTypes.h b/Graphics/GraphicsEngine/interface/GraphicsTypes.h index 838c817b..641e3272 100644 --- a/Graphics/GraphicsEngine/interface/GraphicsTypes.h +++ b/Graphics/GraphicsEngine/interface/GraphicsTypes.h @@ -1511,8 +1511,8 @@ namespace Diligent } TextureFormatAttribs() : - Format(TEX_FORMAT_UNKNOWN), Name("TEX_FORMAT_UNKNOWN"), + Format(TEX_FORMAT_UNKNOWN), ComponentSize(0), NumComponents(0), ComponentType(COMPONENT_TYPE_UNDEFINED), diff --git a/Graphics/GraphicsEngine/src/ResourceMapping.cpp b/Graphics/GraphicsEngine/src/ResourceMapping.cpp index 04cd575c..57c45774 100644 --- a/Graphics/GraphicsEngine/src/ResourceMapping.cpp +++ b/Graphics/GraphicsEngine/src/ResourceMapping.cpp @@ -37,7 +37,7 @@ namespace Diligent ThreadingTools::LockHelper ResourceMappingImpl::Lock() { - return std::move( ThreadingTools::LockHelper( m_LockFlag ) ); + return ThreadingTools::LockHelper( m_LockFlag ); } void ResourceMappingImpl::AddResourceArray( const Char *Name, Uint32 StartIndex, IDeviceObject * const* ppObjects, Uint32 NumElements, bool bIsUnique ) -- cgit v1.2.3