From 24527474293a180a015ea549055852ddd0167dbe Mon Sep 17 00:00:00 2001 From: Lioncash <mathew1800@gmail.com> Date: Thu, 30 May 2019 09:42:05 -0400 Subject: [PATCH] VertexLoader_TextCoord: Tidy up public function definitions We can use u32 instead of unsigned int to shorten up these definitions and make them much nicer to read. While we're at it, change the size array to house u32 elements to match the return value of the function. --- Source/Core/VideoCommon/VertexLoader_TextCoord.cpp | 12 +++++------- Source/Core/VideoCommon/VertexLoader_TextCoord.h | 7 ++----- 2 files changed, 7 insertions(+), 12 deletions(-) diff --git a/Source/Core/VideoCommon/VertexLoader_TextCoord.cpp b/Source/Core/VideoCommon/VertexLoader_TextCoord.cpp index 52723225f9..3a31527b2c 100644 --- a/Source/Core/VideoCommon/VertexLoader_TextCoord.cpp +++ b/Source/Core/VideoCommon/VertexLoader_TextCoord.cpp @@ -179,7 +179,7 @@ constexpr TPipelineFunction s_table_read_tex_coord[4][8][2] = { }, }; -constexpr int s_table_read_tex_coord_vertex_size[4][8][2] = { +constexpr u32 s_table_read_tex_coord_vertex_size[4][8][2] = { { {0, 0}, {0, 0}, @@ -211,16 +211,14 @@ constexpr int s_table_read_tex_coord_vertex_size[4][8][2] = { }; } // Anonymous namespace -unsigned int VertexLoader_TextCoord::GetSize(u64 _type, unsigned int _format, - unsigned int _elements) +u32 VertexLoader_TextCoord::GetSize(u64 type, u32 format, u32 elements) { - return s_table_read_tex_coord_vertex_size[_type][_format][_elements]; + return s_table_read_tex_coord_vertex_size[type][format][elements]; } -TPipelineFunction VertexLoader_TextCoord::GetFunction(u64 _type, unsigned int _format, - unsigned int _elements) +TPipelineFunction VertexLoader_TextCoord::GetFunction(u64 type, u32 format, u32 elements) { - return s_table_read_tex_coord[_type][_format][_elements]; + return s_table_read_tex_coord[type][format][elements]; } TPipelineFunction VertexLoader_TextCoord::GetDummyFunction() diff --git a/Source/Core/VideoCommon/VertexLoader_TextCoord.h b/Source/Core/VideoCommon/VertexLoader_TextCoord.h index 1b135e46d3..48b9a8e136 100644 --- a/Source/Core/VideoCommon/VertexLoader_TextCoord.h +++ b/Source/Core/VideoCommon/VertexLoader_TextCoord.h @@ -10,13 +10,10 @@ class VertexLoader_TextCoord { public: - // GetSize - static unsigned int GetSize(u64 _type, unsigned int _format, unsigned int _elements); + static u32 GetSize(u64 type, u32 format, u32 elements); - // GetFunction - static TPipelineFunction GetFunction(u64 _type, unsigned int _format, unsigned int _elements); + static TPipelineFunction GetFunction(u64 type, u32 format, u32 elements); - // GetDummyFunction // It is important to synchronize tcIndex. static TPipelineFunction GetDummyFunction(); };