diff options
Diffstat (limited to 'Common/interface')
| -rw-r--r-- | Common/interface/FixedBlockMemoryAllocator.h | 4 | ||||
| -rw-r--r-- | Common/interface/RefCntAutoPtr.h | 12 | ||||
| -rw-r--r-- | Common/interface/RefCountedObjectImpl.h | 2 |
3 files changed, 9 insertions, 9 deletions
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<Uint8*>( 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 |
