Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix -Wdefaulted-function-deleted warning #468

Merged
merged 1 commit into from
Aug 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading