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

@ -179,7 +179,7 @@ namespace Clipper
if (mask != 0)
{
for(int i = 0; i < 3; i += 3)
for (int i = 0; i < 3; i += 3)
{
int vlist[2][2*6+1];
int *inlist = vlist[0], *outlist = vlist[1];
@ -273,7 +273,7 @@ namespace Clipper
bool backface;
if(!CullTest(v0, v1, v2, backface))
if (!CullTest(v0, v1, v2, backface))
return;
int indices[NUM_INDICES] = { 0, 1, 2, SKIP_FLAG, SKIP_FLAG, SKIP_FLAG, SKIP_FLAG, SKIP_FLAG, SKIP_FLAG,
@ -296,10 +296,10 @@ namespace Clipper
ClipTriangle(indices, numIndices);
for(int i = 0; i+3 <= numIndices; i+=3)
for (int i = 0; i+3 <= numIndices; i+=3)
{
_assert_(i < NUM_INDICES);
if(indices[i] != SKIP_FLAG)
if (indices[i] != SKIP_FLAG)
{
PerspectiveDivide(Vertices[indices[i]]);
PerspectiveDivide(Vertices[indices[i+1]]);
@ -339,7 +339,7 @@ namespace Clipper
ClipLine(indices);
if(indices[0] != SKIP_FLAG)
if (indices[0] != SKIP_FLAG)
{
OutputVertexData *v0 = Vertices[indices[0]];
OutputVertexData *v1 = Vertices[indices[1]];
@ -353,16 +353,16 @@ namespace Clipper
float screenDx = 0;
float screenDy = 0;
if(fabsf(dx) > fabsf(dy))
if (fabsf(dx) > fabsf(dy))
{
if(dx > 0)
if (dx > 0)
screenDy = bpmem.lineptwidth.linesize / -12.0f;
else
screenDy = bpmem.lineptwidth.linesize / 12.0f;
}
else
{
if(dy > 0)
if (dy > 0)
screenDx = bpmem.lineptwidth.linesize / 12.0f;
else
screenDx = bpmem.lineptwidth.linesize / -12.0f;
@ -389,7 +389,7 @@ namespace Clipper
mask &= CalcClipMask(v1);
mask &= CalcClipMask(v2);
if(mask)
if (mask)
{
INCSTAT(swstats.thisFrame.numTrianglesRejected)
return false;