From 1d6425bd5e580c396cc8f25f14207a4e97e92572 Mon Sep 17 00:00:00 2001 From: degasus Date: Thu, 16 Jan 2014 13:56:20 +0100 Subject: [PATCH] IndexGenerator: drop unused variable --- Source/Core/VideoCommon/IndexGenerator.cpp | 11 ----------- Source/Core/VideoCommon/IndexGenerator.h | 15 +-------------- 2 files changed, 1 insertion(+), 25 deletions(-) diff --git a/Source/Core/VideoCommon/IndexGenerator.cpp b/Source/Core/VideoCommon/IndexGenerator.cpp index f77af16a97..884db29aee 100644 --- a/Source/Core/VideoCommon/IndexGenerator.cpp +++ b/Source/Core/VideoCommon/IndexGenerator.cpp @@ -11,7 +11,6 @@ //Init u16 *IndexGenerator::Iptr; u16 *IndexGenerator::BASEIptr; -u32 IndexGenerator::numI; u32 IndexGenerator::index; static const u16 s_primitive_restart = -1; @@ -45,7 +44,6 @@ void IndexGenerator::Start(u16* Indexptr) Iptr = Indexptr; BASEIptr = Indexptr; index = 0; - numI = 0; } void IndexGenerator::AddIndices(int primitive, u32 numVerts) @@ -62,8 +60,6 @@ template __forceinline void IndexGenerator::WriteTriangle(u32 index1, *Iptr++ = index3; if(pr) *Iptr++ = s_primitive_restart; - - ++numI; } template void IndexGenerator::AddList(u32 const numVerts) @@ -83,7 +79,6 @@ template void IndexGenerator::AddStrip(u32 const numVerts) *Iptr++ = index + i; } *Iptr++ = s_primitive_restart; - numI += numVerts - 2; } else @@ -134,7 +129,6 @@ template void IndexGenerator::AddFan(u32 numVerts) *Iptr++ = index + i + 1; *Iptr++ = index + i + 2; *Iptr++ = s_primitive_restart; - numI += 3; } for(; i+2<=numVerts; i+=2) @@ -144,7 +138,6 @@ template void IndexGenerator::AddFan(u32 numVerts) *Iptr++ = index; *Iptr++ = index + i + 1; *Iptr++ = s_primitive_restart; - numI += 2; } } @@ -183,7 +176,6 @@ template void IndexGenerator::AddQuads(u32 numVerts) *Iptr++ = index + i - 3; *Iptr++ = index + i - 0; *Iptr++ = s_primitive_restart; - numI += 2; } else { @@ -206,7 +198,6 @@ void IndexGenerator::AddLineList(u32 numVerts) { *Iptr++ = index + i - 1; *Iptr++ = index + i; - ++numI; } } @@ -219,7 +210,6 @@ void IndexGenerator::AddLineStrip(u32 numVerts) { *Iptr++ = index + i - 1; *Iptr++ = index + i; - ++numI; } } @@ -229,7 +219,6 @@ void IndexGenerator::AddPoints(u32 numVerts) for (u32 i = 0; i != numVerts; ++i) { *Iptr++ = index + i; - ++numI; } } diff --git a/Source/Core/VideoCommon/IndexGenerator.h b/Source/Core/VideoCommon/IndexGenerator.h index c36d5f41f3..e6d1a0ba97 100644 --- a/Source/Core/VideoCommon/IndexGenerator.h +++ b/Source/Core/VideoCommon/IndexGenerator.h @@ -18,24 +18,13 @@ public: static void AddIndices(int primitive, u32 numVertices); - // Interface - static u32 GetNumIndices() {return numI;} - // returns numprimitives static u32 GetNumVerts() {return index;} static u32 GetIndexLen() {return (u32)(Iptr - BASEIptr);} static u32 GetRemainingIndices(); -/* - enum IndexPrimitiveType - { - Prim_None = 0, - Prim_List, - Prim_Strip, - Prim_Fan - }; -*/ + private: // Triangles template static void AddList(u32 numVerts); @@ -54,8 +43,6 @@ private: static u16 *Iptr; static u16 *BASEIptr; - // TODO: redundant variables - static u32 numI; static u32 index; };