summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/XFStructs.cpp
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2017-03-26 20:38:19 -0400
committerLioncash <mathew1800@gmail.com>2017-03-26 23:08:33 -0400
commit62db55dee280b41d7a0484a98a1a1dbd3190595f (patch)
tree492b5b8ee0f30f7e9455da784131d206525df4c1 /Source/Core/VideoCommon/XFStructs.cpp
parent76cece815744855a3dd32f3e64f4c77380246c6c (diff)
Fifo: const correctness
PushFifoAuxBuffer only memcpys data using ptr as the source pointer, so it can be a pointer to const data because of that.
Diffstat (limited to 'Source/Core/VideoCommon/XFStructs.cpp')
-rw-r--r--Source/Core/VideoCommon/XFStructs.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/Source/Core/VideoCommon/XFStructs.cpp b/Source/Core/VideoCommon/XFStructs.cpp
index 9a2db74459..9581209419 100644
--- a/Source/Core/VideoCommon/XFStructs.cpp
+++ b/Source/Core/VideoCommon/XFStructs.cpp
@@ -288,12 +288,13 @@ void LoadIndexedXF(u32 val, int refarray)
void PreprocessIndexedXF(u32 val, int refarray)
{
- int index = val >> 16;
- int size = ((val >> 12) & 0xF) + 1;
+ const int index = val >> 16;
+ const int size = ((val >> 12) & 0xF) + 1;
- u32* new_data = (u32*)Memory::GetPointer(g_preprocess_cp_state.array_bases[refarray] +
- g_preprocess_cp_state.array_strides[refarray] * index);
+ const u32* new_data =
+ (u32*)Memory::GetPointer(g_preprocess_cp_state.array_bases[refarray] +
+ g_preprocess_cp_state.array_strides[refarray] * index);
- size_t buf_size = size * sizeof(u32);
+ const size_t buf_size = size * sizeof(u32);
Fifo::PushFifoAuxBuffer(new_data, buf_size);
}