Skip to content

Commit

Permalink
Fix -Wdefaulted-function-deleted warning (#244)
Browse files Browse the repository at this point in the history
  • Loading branch information
walbourn authored Aug 27, 2024
1 parent 33a957e commit 2087943
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 12 deletions.
10 changes: 8 additions & 2 deletions Src/BasicPostProcess.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,8 @@ namespace
DeviceResources(const DeviceResources&) = delete;
DeviceResources& operator=(const DeviceResources&) = delete;

DeviceResources(DeviceResources&&) = default;
DeviceResources& operator=(DeviceResources&&) = default;
DeviceResources(DeviceResources&&) = delete;
DeviceResources& operator=(DeviceResources&&) = delete;

ID3D12RootSignature* GetRootSignature(int slot, const D3D12_ROOT_SIGNATURE_DESC& desc)
{
Expand Down Expand Up @@ -172,6 +172,12 @@ class BasicPostProcess::Impl : public AlignedNew<PostProcessConstants>
public:
Impl(_In_ ID3D12Device* device, const RenderTargetState& rtState, Effect ifx);

Impl(const Impl&) = delete;
Impl& operator=(const Impl&) = delete;

Impl(Impl&&) = default;
Impl& operator=(Impl&&) = default;

void Process(_In_ ID3D12GraphicsCommandList* commandList);

void SetDirtyFlag() noexcept { mDirtyFlags = INT_MAX; }
Expand Down
10 changes: 8 additions & 2 deletions Src/DualPostProcess.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ namespace
DeviceResources(const DeviceResources&) = delete;
DeviceResources& operator=(const DeviceResources&) = delete;

DeviceResources(DeviceResources&&) = default;
DeviceResources& operator=(DeviceResources&&) = default;
DeviceResources(DeviceResources&&) = delete;
DeviceResources& operator=(DeviceResources&&) = delete;

ID3D12RootSignature* GetRootSignature(const D3D12_ROOT_SIGNATURE_DESC& desc)
{
Expand Down Expand Up @@ -123,6 +123,12 @@ class DualPostProcess::Impl : public AlignedNew<PostProcessConstants>
public:
Impl(_In_ ID3D12Device* device, const RenderTargetState& rtState, Effect ifx);

Impl(const Impl&) = delete;
Impl& operator=(const Impl&) = delete;

Impl(Impl&&) = default;
Impl& operator=(Impl&&) = default;

void Process(_In_ ID3D12GraphicsCommandList* commandList);

void SetDirtyFlag() noexcept { mDirtyFlags = INT_MAX; }
Expand Down
4 changes: 2 additions & 2 deletions Src/EffectFactory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ class EffectFactory::Impl
Impl(const Impl&) = delete;
Impl& operator=(const Impl&) = delete;

Impl(Impl&&) = default;
Impl& operator=(Impl&&) = default;
Impl(Impl&&) = delete;
Impl& operator=(Impl&&) = delete;

std::shared_ptr<IEffect> CreateEffect(
const EffectInfo& info,
Expand Down
4 changes: 2 additions & 2 deletions Src/EffectTextureFactory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ class EffectTextureFactory::Impl
Impl(const Impl&) = delete;
Impl& operator=(const Impl&) = delete;

Impl(Impl&&) = default;
Impl& operator=(Impl&&) = default;
Impl(Impl&&) = delete;
Impl& operator=(Impl&&) = delete;

size_t CreateTexture(_In_z_ const wchar_t* name, int descriptorSlot);

Expand Down
4 changes: 2 additions & 2 deletions Src/PBREffectFactory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,8 @@ class PBREffectFactory::Impl
Impl(const Impl&) = delete;
Impl& operator=(const Impl&) = delete;

Impl(Impl&&) = default;
Impl& operator=(Impl&&) = default;
Impl(Impl&&) = delete;
Impl& operator=(Impl&&) = delete;

std::shared_ptr<IEffect> CreateEffect(
const EffectInfo& info,
Expand Down
10 changes: 8 additions & 2 deletions Src/ToneMapPostProcess.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -230,8 +230,8 @@ namespace
DeviceResources(const DeviceResources&) = delete;
DeviceResources& operator=(const DeviceResources&) = delete;

DeviceResources(DeviceResources&&) = default;
DeviceResources& operator=(DeviceResources&&) = default;
DeviceResources(DeviceResources&&) = delete;
DeviceResources& operator=(DeviceResources&&) = delete;

ID3D12RootSignature* GetRootSignature(const D3D12_ROOT_SIGNATURE_DESC& desc)
{
Expand Down Expand Up @@ -261,6 +261,12 @@ class ToneMapPostProcess::Impl : public AlignedNew<ToneMapConstants>
public:
Impl(_In_ ID3D12Device* device, const RenderTargetState& rtState, Operator op, TransferFunction func, bool mrt = false);

Impl(const Impl&) = delete;
Impl& operator=(const Impl&) = delete;

Impl(Impl&&) = default;
Impl& operator=(Impl&&) = default;

void Process(_In_ ID3D12GraphicsCommandList* commandList);

void SetDirtyFlag() noexcept { mDirtyFlags = INT_MAX; }
Expand Down

0 comments on commit 2087943

Please sign in to comment.