diff options
| author | Lioncash <mathew1800@gmail.com> | 2019-05-30 09:30:50 -0400 |
|---|---|---|
| committer | Lioncash <mathew1800@gmail.com> | 2019-05-30 10:29:50 -0400 |
| commit | 14e544eef8737634f952c85da4ebac22491f813f (patch) | |
| tree | 7d6c675744cba4216b6006810fd1c32ece26dab0 /Source/Core/VideoCommon/VertexLoader_Position.cpp | |
| parent | be9a03b35fbf53e2e7a68d869607d8913dd2a699 (diff) | |
VertexLoader_Position: Make lookup tables immutable
Allows the compiler to place these arrays within the read-only segment.
Diffstat (limited to 'Source/Core/VideoCommon/VertexLoader_Position.cpp')
| -rw-r--r-- | Source/Core/VideoCommon/VertexLoader_Position.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Source/Core/VideoCommon/VertexLoader_Position.cpp b/Source/Core/VideoCommon/VertexLoader_Position.cpp index 1cb38a88c4..d4a816a36c 100644 --- a/Source/Core/VideoCommon/VertexLoader_Position.cpp +++ b/Source/Core/VideoCommon/VertexLoader_Position.cpp @@ -77,7 +77,7 @@ void Pos_ReadIndex(VertexLoader* loader) LOG_VTX(); } -TPipelineFunction tableReadPosition[4][8][2] = { +constexpr TPipelineFunction s_table_read_position[4][8][2] = { { { nullptr, @@ -168,7 +168,7 @@ TPipelineFunction tableReadPosition[4][8][2] = { }, }; -int tableReadPositionVertexSize[4][8][2] = { +constexpr int s_table_read_position_vertex_size[4][8][2] = { { {0, 0}, {0, 0}, @@ -202,11 +202,11 @@ int tableReadPositionVertexSize[4][8][2] = { unsigned int VertexLoader_Position::GetSize(u64 _type, unsigned int _format, unsigned int _elements) { - return tableReadPositionVertexSize[_type][_format][_elements]; + return s_table_read_position_vertex_size[_type][_format][_elements]; } TPipelineFunction VertexLoader_Position::GetFunction(u64 _type, unsigned int _format, unsigned int _elements) { - return tableReadPosition[_type][_format][_elements]; + return s_table_read_position[_type][_format][_elements]; } |
