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.
This commit is contained in:
Matthew Parlane
2014-03-11 00:30:55 +13:00
parent 4591464486
commit 31cfc73a09
189 changed files with 1250 additions and 1159 deletions

View File

@ -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);
}