diff options
| author | Markus Wick <degasus@users.noreply.github.com> | 2016-12-11 13:53:28 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-12-11 13:53:28 +0100 |
| commit | 863aeb383a8b2aedc31f5aac79a72df6a80f3b33 (patch) | |
| tree | 2a4f5612a7e25ed77f68d3691682dddb8d744047 /Source/Core | |
| parent | 6ed462a05902e9e987025dedae2bfdd58c556b70 (diff) | |
| parent | 8dcb05802b8f16e84169e4e3b64789707a939787 (diff) | |
Merge pull request #4509 from lioncash/assign
ShaderManagers: Use aggregate initialization for some variables.
Diffstat (limited to 'Source/Core')
| -rw-r--r-- | Source/Core/VideoCommon/GeometryShaderManager.cpp | 2 | ||||
| -rw-r--r-- | Source/Core/VideoCommon/PixelShaderManager.cpp | 2 | ||||
| -rw-r--r-- | Source/Core/VideoCommon/VertexShaderManager.cpp | 4 |
3 files changed, 4 insertions, 4 deletions
diff --git a/Source/Core/VideoCommon/GeometryShaderManager.cpp b/Source/Core/VideoCommon/GeometryShaderManager.cpp index 1bb841459d..8a687d70d0 100644 --- a/Source/Core/VideoCommon/GeometryShaderManager.cpp +++ b/Source/Core/VideoCommon/GeometryShaderManager.cpp @@ -21,7 +21,7 @@ static bool s_viewport_changed; void GeometryShaderManager::Init() { - memset(&constants, 0, sizeof(constants)); + constants = {}; // Init any intial constants which aren't zero when bpmem is zero. SetViewportChanged(); diff --git a/Source/Core/VideoCommon/PixelShaderManager.cpp b/Source/Core/VideoCommon/PixelShaderManager.cpp index 0560ecc60a..f029751363 100644 --- a/Source/Core/VideoCommon/PixelShaderManager.cpp +++ b/Source/Core/VideoCommon/PixelShaderManager.cpp @@ -21,7 +21,7 @@ bool PixelShaderManager::dirty; void PixelShaderManager::Init() { - memset(&constants, 0, sizeof(constants)); + constants = {}; // Init any intial constants which aren't zero when bpmem is zero. s_bFogRangeAdjustChanged = true; diff --git a/Source/Core/VideoCommon/VertexShaderManager.cpp b/Source/Core/VideoCommon/VertexShaderManager.cpp index aa7ea1c2a6..c7331fe446 100644 --- a/Source/Core/VideoCommon/VertexShaderManager.cpp +++ b/Source/Core/VideoCommon/VertexShaderManager.cpp @@ -203,8 +203,8 @@ void VertexShaderManager::Init() bProjectionChanged = true; bViewportChanged = false; - memset(&xfmem, 0, sizeof(xfmem)); - memset(&constants, 0, sizeof(constants)); + xfmem = {}; + constants = {}; ResetView(); // TODO: should these go inside ResetView()? |
