From 65b88200aae28dcd4b3e48672126bc7556d7bb49 Mon Sep 17 00:00:00 2001 From: Egor Yusov Date: Fri, 19 Jan 2018 09:44:57 -0800 Subject: Fixed some clang compiler warnings --- Common/interface/FixedBlockMemoryAllocator.h | 4 ++-- Common/interface/RefCntAutoPtr.h | 12 ++++++------ Common/interface/RefCountedObjectImpl.h | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) (limited to 'Common/interface') diff --git a/Common/interface/FixedBlockMemoryAllocator.h b/Common/interface/FixedBlockMemoryAllocator.h index 0a1fd294..1affd8b6 100644 --- a/Common/interface/FixedBlockMemoryAllocator.h +++ b/Common/interface/FixedBlockMemoryAllocator.h @@ -78,9 +78,9 @@ private: static constexpr Uint8 InitializedBlockMemPattern = 0xCF; MemoryPage(FixedBlockMemoryAllocator &OwnerAllocator): - m_pOwnerAllocator(&OwnerAllocator), m_NumFreeBlocks(OwnerAllocator.m_NumBlocksInPage), - m_NumInitializedBlocks(0) + m_NumInitializedBlocks(0), + m_pOwnerAllocator(&OwnerAllocator) { auto PageSize = OwnerAllocator.m_BlockSize * OwnerAllocator.m_NumBlocksInPage; m_pPageStart = reinterpret_cast( diff --git a/Common/interface/RefCntAutoPtr.h b/Common/interface/RefCntAutoPtr.h index bd314e6e..55c36cd0 100644 --- a/Common/interface/RefCntAutoPtr.h +++ b/Common/interface/RefCntAutoPtr.h @@ -251,8 +251,8 @@ class RefCntWeakPtr { public: explicit RefCntWeakPtr(T *pObj = nullptr) : - m_pObject(pObj), - m_pRefCounters(nullptr) + m_pRefCounters(nullptr), + m_pObject(pObj) { if( m_pObject ) { @@ -267,16 +267,16 @@ public: } RefCntWeakPtr(const RefCntWeakPtr& WeakPtr) : - m_pObject(WeakPtr.m_pObject), - m_pRefCounters(WeakPtr.m_pRefCounters) + m_pRefCounters(WeakPtr.m_pRefCounters), + m_pObject(WeakPtr.m_pObject) { if( m_pRefCounters ) m_pRefCounters->AddWeakRef(); } RefCntWeakPtr(RefCntWeakPtr&& WeakPtr) : - m_pObject(std::move(WeakPtr.m_pObject)), - m_pRefCounters(std::move(WeakPtr.m_pRefCounters)) + m_pRefCounters(std::move(WeakPtr.m_pRefCounters)), + m_pObject(std::move(WeakPtr.m_pObject)) { WeakPtr.m_pRefCounters = nullptr; WeakPtr.m_pObject = nullptr; diff --git a/Common/interface/RefCountedObjectImpl.h b/Common/interface/RefCountedObjectImpl.h index e0815524..0f4a41c9 100644 --- a/Common/interface/RefCountedObjectImpl.h +++ b/Common/interface/RefCountedObjectImpl.h @@ -37,7 +37,7 @@ namespace Diligent { // This class controls the lifetime of a refcounted object -class RefCountersImpl : public IReferenceCounters +class RefCountersImpl final : public IReferenceCounters { public: inline virtual CounterValueType AddStrongRef()override final -- cgit v1.2.3