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

Minor code review #469

Merged
merged 1 commit into from
Aug 28, 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
6 changes: 6 additions & 0 deletions Src/AlphaTestEffect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,12 @@ class AlphaTestEffect::Impl : public EffectBase<AlphaTestEffectTraits>
public:
explicit Impl(_In_ ID3D11Device* device);

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

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

D3D11_COMPARISON_FUNC alphaFunction;
int referenceAlpha;

Expand Down
6 changes: 6 additions & 0 deletions Src/BasicEffect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,12 @@ class BasicEffect::Impl : public EffectBase<BasicEffectTraits>
public:
explicit Impl(_In_ ID3D11Device* device);

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

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

bool lightingEnabled;
bool preferPerPixelLighting;
bool vertexColorEnabled;
Expand Down
6 changes: 6 additions & 0 deletions Src/DGSLEffect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,12 @@ class DGSLEffect::Impl : public AlignedNew<DGSLEffectConstants>
static_assert(MaxDirectionalLights == 4, "Mismatch with DGSL pipline");
}

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

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

void Initialize(_In_ ID3D11Device* device, bool enableSkinning)
{
weightsPerVertex = enableSkinning ? 4 : 0;
Expand Down
6 changes: 6 additions & 0 deletions Src/DebugEffect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,12 @@ class DebugEffect::Impl : public EffectBase<DebugEffectTraits>
public:
explicit Impl(_In_ ID3D11Device* device);

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

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

bool vertexColorEnabled;
bool biasedVertexNormals;
bool instancing;
Expand Down
6 changes: 6 additions & 0 deletions Src/DualTextureEffect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,12 @@ class DualTextureEffect::Impl : public EffectBase<DualTextureEffectTraits>
public:
explicit Impl(_In_ ID3D11Device* device);

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

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

bool vertexColorEnabled;

EffectColor color;
Expand Down
6 changes: 6 additions & 0 deletions Src/EnvironmentMapEffect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,12 @@ class EnvironmentMapEffect::Impl : public EffectBase<EnvironmentMapEffectTraits>
public:
explicit Impl(_In_ ID3D11Device* device);

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

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

bool preferPerPixelLighting;
bool fresnelEnabled;
bool specularEnabled;
Expand Down
6 changes: 6 additions & 0 deletions Src/GeometricPrimitive.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@ class GeometricPrimitive::Impl
public:
Impl() noexcept : mIndexCount(0) {}

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

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

void Initialize(_In_ ID3D11DeviceContext* deviceContext, const VertexCollection& vertices, const IndexCollection& indices);

void XM_CALLCONV Draw(FXMMATRIX world, CXMMATRIX view, CXMMATRIX projection,
Expand Down
6 changes: 6 additions & 0 deletions Src/NormalMapEffect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,12 @@ class NormalMapEffect::Impl : public EffectBase<NormalMapEffectTraits>
public:
explicit Impl(_In_ ID3D11Device* device);

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

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

void Initialize(_In_ ID3D11Device* device, bool enableSkinning);

ComPtr<ID3D11ShaderResourceView> normalTexture;
Expand Down
6 changes: 6 additions & 0 deletions Src/PBREffect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,12 @@ class PBREffect::Impl : public EffectBase<PBREffectTraits>
public:
explicit Impl(_In_ ID3D11Device* device);

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

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

void Initialize(_In_ ID3D11Device* device, bool enableSkinning);

ComPtr<ID3D11ShaderResourceView> albedoTexture;
Expand Down
6 changes: 6 additions & 0 deletions Src/PrimitiveBatch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ class PrimitiveBatchBase::Impl
public:
Impl(_In_ ID3D11DeviceContext* deviceContext, size_t maxIndices, size_t maxVertices, size_t vertexSize);

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

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

void Begin();
void End();

Expand Down
6 changes: 6 additions & 0 deletions Src/SkinnedEffect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,12 @@ class SkinnedEffect::Impl : public EffectBase<SkinnedEffectTraits>
public:
explicit Impl(_In_ ID3D11Device* device);

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

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

bool preferPerPixelLighting;
bool biasedVertexNormals;
int weightsPerVertex;
Expand Down
6 changes: 6 additions & 0 deletions Src/SpriteBatch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,12 @@ XM_ALIGNED_STRUCT(16) SpriteBatch::Impl : public AlignedNew<SpriteBatch::Impl>
public:
explicit Impl(_In_ ID3D11DeviceContext* deviceContext);

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

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

void XM_CALLCONV Begin(SpriteSortMode sortMode,
_In_opt_ ID3D11BlendState* blendState,
_In_opt_ ID3D11SamplerState* samplerState,
Expand Down
6 changes: 6 additions & 0 deletions Src/SpriteFont.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,12 @@ class SpriteFont::Impl
size_t glyphCount,
float lineSpacing) noexcept(false);

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

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

Glyph const* FindGlyph(wchar_t character) const;

void SetDefaultCharacter(wchar_t character);
Expand Down
Loading