From ac59693be26b4239aaaf380896a1e1b753172546 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Thu, 29 Jan 2009 05:26:12 +0000 Subject: A ton of code formatting fixes; also fixed warnings about single line loops like 'while(cond);' by inserting newlines svn-id: r36127 --- engines/agos/string.cpp | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) (limited to 'engines/agos') diff --git a/engines/agos/string.cpp b/engines/agos/string.cpp index f4762d36ff..ee922299a2 100644 --- a/engines/agos/string.cpp +++ b/engines/agos/string.cpp @@ -80,7 +80,8 @@ byte *AGOSEngine::uncompressToken(byte a, byte *ptr) { } ptr1 = _byteTokenStrings; /* Find it */ while (count1--) { - while (*ptr1++); + while (*ptr1++) + ; } ptr1 = uncompressToken(b, ptr1); /* Try this one as a two byte token */ uncompressText(ptr1); /* Uncompress rest of this token */ @@ -88,7 +89,8 @@ byte *AGOSEngine::uncompressToken(byte a, byte *ptr) { } } while (count1--) { - while (*ptr2++); + while (*ptr2++) + ; } uncompressText(ptr2); } else { @@ -103,7 +105,8 @@ byte *AGOSEngine::uncompressToken(byte a, byte *ptr) { } ptr1 = _byteTokenStrings; while (count1--) { /* Is a byte token so count */ - while (*ptr1++); /* to start of token */ + while (*ptr1++) /* to start of token */ + ; } uncompressText(ptr1); /* and do it */ } @@ -183,7 +186,8 @@ void AGOSEngine::setupStringTable(byte *mem, int num) { _twoByteTokenStrings = mem; ct1 = i; while (*mem++) { - while (*mem++); + while (*mem++) + ; i--; if ((i == 0) && (ct1 != 0)) { _secondTwoByteTokenStrings = mem; @@ -194,10 +198,12 @@ void AGOSEngine::setupStringTable(byte *mem, int num) { _thirdTwoByteTokenStrings = mem; } _byteTokens = mem; - while (*mem++); + while (*mem++) + ; _byteTokenStrings = mem; while (*mem++) { - while(*mem++); + while (*mem++) + ; } i = 0; l1: _stringTabPtr[i++] = mem; @@ -206,14 +212,16 @@ l1: _stringTabPtr[i++] = mem; _stringTabPos = i; return; } - while (*mem++); + while (*mem++) + ; goto l1; } else { for (;;) { _stringTabPtr[i++] = mem; if (--num == 0) break; - for (; *mem; mem++); + for (; *mem; mem++) + ; mem++; } @@ -227,7 +235,8 @@ void AGOSEngine::setupLocalStringTable(byte *mem, int num) { _localStringtable[i++] = mem; if (--num == 0) break; - for (; *mem; mem++); + for (; *mem; mem++) + ; mem++; } } -- cgit v1.2.3