From 6f656b72199ba95398d5a0b08cab7f7a5db9e876 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Thu, 30 May 2019 09:33:43 -0400 Subject: [PATCH] VertexLoader_Position: 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_Position.cpp | 11 +++++------ Source/Core/VideoCommon/VertexLoader_Position.h | 6 ++---- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/Source/Core/VideoCommon/VertexLoader_Position.cpp b/Source/Core/VideoCommon/VertexLoader_Position.cpp index d4a816a36c..9808c76e65 100644 --- a/Source/Core/VideoCommon/VertexLoader_Position.cpp +++ b/Source/Core/VideoCommon/VertexLoader_Position.cpp @@ -168,7 +168,7 @@ constexpr TPipelineFunction s_table_read_position[4][8][2] = { }, }; -constexpr int s_table_read_position_vertex_size[4][8][2] = { +constexpr u32 s_table_read_position_vertex_size[4][8][2] = { { {0, 0}, {0, 0}, @@ -200,13 +200,12 @@ constexpr int s_table_read_position_vertex_size[4][8][2] = { }; } // Anonymous namespace -unsigned int VertexLoader_Position::GetSize(u64 _type, unsigned int _format, unsigned int _elements) +u32 VertexLoader_Position::GetSize(u64 type, u32 format, u32 elements) { - return s_table_read_position_vertex_size[_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) +TPipelineFunction VertexLoader_Position::GetFunction(u64 type, u32 format, u32 elements) { - return s_table_read_position[_type][_format][_elements]; + return s_table_read_position[type][format][elements]; } diff --git a/Source/Core/VideoCommon/VertexLoader_Position.h b/Source/Core/VideoCommon/VertexLoader_Position.h index 1a8a2855e3..a38d277278 100644 --- a/Source/Core/VideoCommon/VertexLoader_Position.h +++ b/Source/Core/VideoCommon/VertexLoader_Position.h @@ -10,9 +10,7 @@ class VertexLoader_Position { 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); };