summaryrefslogtreecommitdiffstats
path: root/Graphics/GraphicsEngine
diff options
context:
space:
mode:
authorEgor Yusov <egor.yusov@gmail.com>2018-09-09 23:35:21 +0000
committerEgor Yusov <egor.yusov@gmail.com>2018-09-09 23:35:21 +0000
commit1d0ba9953d2bdc7d43a47705b598df97197fb9f5 (patch)
treee9453ce41d43ac549a2a46ba197f3861a2ac6c98 /Graphics/GraphicsEngine
parentAnother attempt to fix gcc/clang builds (diff)
downloadDiligentCore-1d0ba9953d2bdc7d43a47705b598df97197fb9f5.tar.gz
DiligentCore-1d0ba9953d2bdc7d43a47705b598df97197fb9f5.zip
Fixing clang build error and warnings
Diffstat (limited to 'Graphics/GraphicsEngine')
-rw-r--r--Graphics/GraphicsEngine/include/BufferBase.h2
-rw-r--r--Graphics/GraphicsEngine/include/RenderDeviceBase.h4
-rw-r--r--Graphics/GraphicsEngine/interface/GraphicsTypes.h2
-rw-r--r--Graphics/GraphicsEngine/src/ResourceMapping.cpp2
4 files changed, 5 insertions, 5 deletions
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 BufferBase<BaseInterface, RenderDeviceImplType, BufferViewImplType, TBuffVi
if (this->m_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 )