summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/IndexGenerator.cpp
diff options
context:
space:
mode:
authorMatthew Parlane <parlane@gmail.com>2014-03-11 00:30:55 +1300
committerMatthew Parlane <parlane@gmail.com>2014-03-11 00:35:07 +1300
commit31cfc73a09a8685cbab20502b4bc132e98e2feb5 (patch)
treec7eb3a0906bab0eb711bd7c79166c96fe97ec488 /Source/Core/VideoCommon/IndexGenerator.cpp
parent4591464486d696a300cc914f6c2a3cce8af2d666 (diff)
Fixes spacing for "for", "while", "switch" and "if"
Also moved && and || to ends of lines instead of start. Fixed misc vertical alignments and some { needed newlining.
Diffstat (limited to 'Source/Core/VideoCommon/IndexGenerator.cpp')
-rw-r--r--Source/Core/VideoCommon/IndexGenerator.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/Source/Core/VideoCommon/IndexGenerator.cpp b/Source/Core/VideoCommon/IndexGenerator.cpp
index 0989b65283..949ee342b1 100644
--- a/Source/Core/VideoCommon/IndexGenerator.cpp
+++ b/Source/Core/VideoCommon/IndexGenerator.cpp
@@ -19,7 +19,7 @@ static u16* (*primitive_table[8])(u16*, u32, u32);
void IndexGenerator::Init()
{
- if(g_Config.backend_info.bSupportsPrimitiveRestart)
+ if (g_Config.backend_info.bSupportsPrimitiveRestart)
{
primitive_table[0] = IndexGenerator::AddQuads<true>;
primitive_table[2] = IndexGenerator::AddList<true>;
@@ -58,7 +58,7 @@ template <bool pr> __forceinline u16* IndexGenerator::WriteTriangle(u16 *Iptr, u
*Iptr++ = index1;
*Iptr++ = index2;
*Iptr++ = index3;
- if(pr)
+ if (pr)
*Iptr++ = s_primitive_restart;
return Iptr;
}
@@ -74,7 +74,7 @@ template <bool pr> u16* IndexGenerator::AddList(u16 *Iptr, u32 const numVerts, u
template <bool pr> u16* IndexGenerator::AddStrip(u16 *Iptr, u32 const numVerts, u32 index)
{
- if(pr)
+ if (pr)
{
for (u32 i = 0; i < numVerts; ++i)
{
@@ -122,9 +122,9 @@ template <bool pr> u16* IndexGenerator::AddFan(u16 *Iptr, u32 numVerts, u32 inde
{
u32 i = 2;
- if(pr)
+ if (pr)
{
- for(; i+3<=numVerts; i+=3)
+ for (; i+3<=numVerts; i+=3)
{
*Iptr++ = index + i - 1;
*Iptr++ = index + i + 0;
@@ -134,7 +134,7 @@ template <bool pr> u16* IndexGenerator::AddFan(u16 *Iptr, u32 numVerts, u32 inde
*Iptr++ = s_primitive_restart;
}
- for(; i+2<=numVerts; i+=2)
+ for (; i+2<=numVerts; i+=2)
{
*Iptr++ = index + i - 1;
*Iptr++ = index + i + 0;
@@ -173,7 +173,7 @@ template <bool pr> u16* IndexGenerator::AddQuads(u16 *Iptr, u32 numVerts, u32 in
u32 i = 3;
for (; i < numVerts; i+=4)
{
- if(pr)
+ if (pr)
{
*Iptr++ = index + i - 2;
*Iptr++ = index + i - 1;
@@ -189,7 +189,7 @@ template <bool pr> u16* IndexGenerator::AddQuads(u16 *Iptr, u32 numVerts, u32 in
}
// three vertices remaining, so render a triangle
- if(i == numVerts)
+ if (i == numVerts)
{
Iptr = WriteTriangle<pr>(Iptr, index+numVerts-3, index+numVerts-2, index+numVerts-1);
}