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

GXPipelineUid: remove explicit shallow copy where it's the default #10376

Merged
merged 1 commit into from
Feb 18, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
35 changes: 0 additions & 35 deletions Source/Core/VideoCommon/GXPipelineTypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,24 +35,6 @@ struct GXPipelineUid
// and this map lookup can happen every draw call. However, as using memcmp() will also compare
// any padding bytes, we have to ensure these are zeroed out.
GXPipelineUid() { std::memset(static_cast<void*>(this), 0, sizeof(*this)); }
#ifdef _MSC_VER
shuffle2 marked this conversation as resolved.
Show resolved Hide resolved
#pragma warning(push)
// Disable warning for uninitialized member variables, as MSVC doesn't recognise that memcpy
// performs this initialization.
#pragma warning(disable : 26495)
#endif
GXPipelineUid(const GXPipelineUid& rhs)
{
std::memcpy(static_cast<void*>(this), &rhs, sizeof(*this));
}
#ifdef _MSC_VER
#pragma warning(pop)
#endif
GXPipelineUid& operator=(const GXPipelineUid& rhs)
{
std::memcpy(static_cast<void*>(this), &rhs, sizeof(*this));
return *this;
}
bool operator<(const GXPipelineUid& rhs) const
{
return std::memcmp(this, &rhs, sizeof(*this)) < 0;
Expand All @@ -74,23 +56,6 @@ struct GXUberPipelineUid
BlendingState blending_state;

GXUberPipelineUid() { std::memset(static_cast<void*>(this), 0, sizeof(*this)); }
#ifdef _MSC_VER
#pragma warning(push)
// Disable warning for uninitialized member variables
#pragma warning(disable : 26495)
#endif
GXUberPipelineUid(const GXUberPipelineUid& rhs)
{
std::memcpy(static_cast<void*>(this), &rhs, sizeof(*this));
}
#ifdef _MSC_VER
#pragma warning(pop)
#endif
GXUberPipelineUid& operator=(const GXUberPipelineUid& rhs)
{
std::memcpy(static_cast<void*>(this), &rhs, sizeof(*this));
return *this;
}
bool operator<(const GXUberPipelineUid& rhs) const
{
return std::memcmp(this, &rhs, sizeof(*this)) < 0;
Expand Down