From 35cbb9859a1891625682e100b38d181c47e1ef6f Mon Sep 17 00:00:00 2001 From: Bryan Bernhart Date: Thu, 1 Sep 2022 14:39:53 -0700 Subject: [PATCH] Remove NonCopyable where unused. --- src/gpgmm/common/Allocator.h | 4 +--- src/gpgmm/common/EventMessage.h | 3 +-- src/gpgmm/common/Memory.h | 3 +-- src/gpgmm/d3d12/IUnknownImplD3D12.h | 3 ++- src/gpgmm/d3d12/ResourceAllocationD3D12.h | 2 -- src/gpgmm/d3d12/ResourceAllocatorD3D12.cpp | 2 +- 6 files changed, 6 insertions(+), 11 deletions(-) diff --git a/src/gpgmm/common/Allocator.h b/src/gpgmm/common/Allocator.h index 0fca56080..418dc04bd 100644 --- a/src/gpgmm/common/Allocator.h +++ b/src/gpgmm/common/Allocator.h @@ -15,11 +15,9 @@ #ifndef GPGMM_COMMON_ALLOCATOR_H_ #define GPGMM_COMMON_ALLOCATOR_H_ -#include "gpgmm/utils/NonCopyable.h" - namespace gpgmm { - class AllocatorBase : public NonCopyable { + class AllocatorBase { public: AllocatorBase() = default; virtual ~AllocatorBase() = default; diff --git a/src/gpgmm/common/EventMessage.h b/src/gpgmm/common/EventMessage.h index 6ed1ed42f..fa1def369 100644 --- a/src/gpgmm/common/EventMessage.h +++ b/src/gpgmm/common/EventMessage.h @@ -17,7 +17,6 @@ #include "gpgmm/common/TraceEvent.h" #include "gpgmm/utils/Log.h" -#include "gpgmm/utils/NonCopyable.h" #include #include @@ -39,7 +38,7 @@ namespace gpgmm { int ID; }; - class EventMessage : public NonCopyable { + class EventMessage { public: EventMessage(const LogSeverity& level, const char* name, diff --git a/src/gpgmm/common/Memory.h b/src/gpgmm/common/Memory.h index 1c3e22ad5..bb6c29368 100644 --- a/src/gpgmm/common/Memory.h +++ b/src/gpgmm/common/Memory.h @@ -15,7 +15,6 @@ #ifndef GPGMM_COMMON_MEMORY_H_ #define GPGMM_COMMON_MEMORY_H_ -#include "gpgmm/utils/NonCopyable.h" #include "gpgmm/utils/RefCount.h" namespace gpgmm { @@ -26,7 +25,7 @@ namespace gpgmm { When memory is sub-allocated, it will have a non-zero refcount. */ - class MemoryBase : public NonCopyable { + class MemoryBase { public: /** \brief Constructs a memory object of the specified size and alignment. diff --git a/src/gpgmm/d3d12/IUnknownImplD3D12.h b/src/gpgmm/d3d12/IUnknownImplD3D12.h index 29f359672..bffc400d5 100644 --- a/src/gpgmm/d3d12/IUnknownImplD3D12.h +++ b/src/gpgmm/d3d12/IUnknownImplD3D12.h @@ -16,12 +16,13 @@ #define GPGMM_D3D12_IUNKNOWNIMPLD3D12_H_ #include "gpgmm/d3d12/d3d12_platform.h" +#include "gpgmm/utils/NonCopyable.h" #include "gpgmm/utils/RefCount.h" #include "include/gpgmm_export.h" namespace gpgmm::d3d12 { - class GPGMM_EXPORT IUnknownImpl : public IUnknown { + class GPGMM_EXPORT IUnknownImpl : public IUnknown, public NonCopyable { public: IUnknownImpl(); virtual ~IUnknownImpl() = default; diff --git a/src/gpgmm/d3d12/ResourceAllocationD3D12.h b/src/gpgmm/d3d12/ResourceAllocationD3D12.h index f4bea1773..e83c55fd9 100644 --- a/src/gpgmm/d3d12/ResourceAllocationD3D12.h +++ b/src/gpgmm/d3d12/ResourceAllocationD3D12.h @@ -20,7 +20,6 @@ #include "gpgmm/d3d12/DebugObjectD3D12.h" #include "gpgmm/d3d12/IUnknownImplD3D12.h" #include "gpgmm/d3d12/d3d12_platform.h" -#include "gpgmm/utils/NonCopyable.h" #include "include/gpgmm_export.h" namespace gpgmm::d3d12 { @@ -91,7 +90,6 @@ namespace gpgmm::d3d12 { operations with it (eg. Map, Unmap, etc). */ class GPGMM_EXPORT ResourceAllocation final : public MemoryAllocation, - public NonCopyable, public DebugObject, public IUnknownImpl { public: diff --git a/src/gpgmm/d3d12/ResourceAllocatorD3D12.cpp b/src/gpgmm/d3d12/ResourceAllocatorD3D12.cpp index 669283945..380851b53 100644 --- a/src/gpgmm/d3d12/ResourceAllocatorD3D12.cpp +++ b/src/gpgmm/d3d12/ResourceAllocatorD3D12.cpp @@ -242,7 +242,7 @@ namespace gpgmm::d3d12 { } // RAII wrapper to lock/unlock heap from the residency cache. - class ScopedResidencyLock final : public NonCopyable { + class ScopedResidencyLock final { public: ScopedResidencyLock(ResidencyManager* const residencyManager, Heap* const heap) : mResidencyManager(residencyManager), mHeap(heap) {