Skip to content

Commit

Permalink
Fix -Wdefaulted-function-deleted warning (#468)
Browse files Browse the repository at this point in the history
  • Loading branch information
walbourn authored Aug 27, 2024
1 parent 086426d commit 3c45ee7
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 14 deletions.
10 changes: 8 additions & 2 deletions Src/BasicPostProcess.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,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;

// Gets or lazily creates the vertex shader.
ID3D11VertexShader* GetVertexShader()
Expand Down Expand Up @@ -158,6 +158,12 @@ class BasicPostProcess::Impl : public AlignedNew<PostProcessConstants>
public:
explicit Impl(_In_ ID3D11Device* device);

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

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

void Process(_In_ ID3D11DeviceContext* deviceContext, const std::function<void __cdecl()>& setCustomState);

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

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

HRESULT CreateBlendState(D3D11_BLEND srcBlend, D3D11_BLEND destBlend, _Outptr_ ID3D11BlendState** pResult);
HRESULT CreateDepthStencilState(bool enable, bool writeEnable, bool reverseZ, _Outptr_ ID3D11DepthStencilState** pResult);
Expand Down
4 changes: 2 additions & 2 deletions Src/DGSLEffectFactory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ class DGSLEffectFactory::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(_In_ DGSLEffectFactory* factory, _In_ const IEffectFactory::EffectInfo& info, _In_opt_ ID3D11DeviceContext* deviceContext);
std::shared_ptr<IEffect> CreateDGSLEffect(_In_ DGSLEffectFactory* factory, _In_ const DGSLEffectInfo& info, _In_opt_ ID3D11DeviceContext* deviceContext);
Expand Down
10 changes: 8 additions & 2 deletions Src/DualPostProcess.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,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;

// Gets or lazily creates the vertex shader.
ID3D11VertexShader* GetVertexShader()
Expand Down Expand Up @@ -135,6 +135,12 @@ class DualPostProcess::Impl : public AlignedNew<PostProcessConstants>
public:
explicit Impl(_In_ ID3D11Device* device);

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

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

void Process(_In_ ID3D11DeviceContext* deviceContext, const std::function<void __cdecl()>& setCustomState);

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 @@ -77,8 +77,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(_In_ IEffectFactory* factory, _In_ const IEffectFactory::EffectInfo& info, _In_opt_ ID3D11DeviceContext* deviceContext);
void CreateTexture(_In_z_ const wchar_t* texture, _In_opt_ ID3D11DeviceContext* deviceContext, _Outptr_ ID3D11ShaderResourceView** textureView);
Expand Down
4 changes: 2 additions & 2 deletions Src/PBREffectFactory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,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(
_In_ IEffectFactory* factory,
Expand Down
10 changes: 8 additions & 2 deletions Src/ToneMapPostProcess.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -198,8 +198,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;

// Gets or lazily creates the vertex shader.
ID3D11VertexShader* GetVertexShader()
Expand Down Expand Up @@ -252,6 +252,12 @@ class ToneMapPostProcess::Impl : public AlignedNew<ToneMapConstants>
public:
explicit Impl(_In_ ID3D11Device* device);

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

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

void Process(_In_ ID3D11DeviceContext* deviceContext, const std::function<void __cdecl()>& setCustomState);

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

0 comments on commit 3c45ee7

Please sign in to comment.