diff options
| author | Spp <spp@jorge.gr> | 2011-09-29 12:43:05 +0200 |
|---|---|---|
| committer | Spp <spp@jorge.gr> | 2011-09-29 12:43:05 +0200 |
| commit | b16d2245bbd374805d15cdca585e8b42bf139605 (patch) | |
| tree | b7b63c567112e1999a2566611363cf5e83adb1be /src/server/collision/Management | |
| parent | 8b820baa7324d41df264f48e344d62584bff70f8 (diff) | |
Cosmetic: Multiple cosmetic changes
- Added missing space to 'if', 'for', 'while' and 'switch' when it's followed by '('
- Added missing space after a comma and remove space before comma (with some exceptions)
- Remove trailing spaces
- Convert tab to spaces
Note: Only affects files with extension "cpp" and "h" under /src/server
Diffstat (limited to 'src/server/collision/Management')
| -rwxr-xr-x | src/server/collision/Management/VMapFactory.cpp | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/server/collision/Management/VMapFactory.cpp b/src/server/collision/Management/VMapFactory.cpp index 21907fef263..438b854de16 100755 --- a/src/server/collision/Management/VMapFactory.cpp +++ b/src/server/collision/Management/VMapFactory.cpp @@ -27,10 +27,10 @@ namespace VMAP { void chompAndTrim(std::string& str) { - while(str.length() >0) + while (str.length() >0) { char lc = str[str.length()-1]; - if(lc == '\r' || lc == '\n' || lc == ' ' || lc == '"' || lc == '\'') + if (lc == '\r' || lc == '\n' || lc == ' ' || lc == '"' || lc == '\'') { str = str.substr(0, str.length()-1); } @@ -39,10 +39,10 @@ namespace VMAP break; } } - while(str.length() >0) + while (str.length() >0) { char lc = str[0]; - if(lc == ' ' || lc == '"' || lc == '\'') + if (lc == ' ' || lc == '"' || lc == '\'') { str = str.substr(1, str.length()-1); } @@ -54,7 +54,7 @@ namespace VMAP } IVMapManager* gVMapManager = 0; - Table<unsigned int , bool>* iIgnoreSpellIds=0; + Table<unsigned int, bool>* iIgnoreSpellIds=0; //=============================================== // result false, if no more id are found @@ -63,14 +63,14 @@ namespace VMAP { bool result = false; unsigned int i; - for(i=pStartPos;i<pString.size(); ++i) + for (i=pStartPos;i<pString.size(); ++i) { - if(pString[i] == ',') + if (pString[i] == ',') { break; } } - if(i>pStartPos) + if (i>pStartPos) { std::string idString = pString.substr(pStartPos, i-pStartPos); pStartPos = i+1; @@ -88,15 +88,15 @@ namespace VMAP void VMapFactory::preventSpellsFromBeingTestedForLoS(const char* pSpellIdString) { - if(!iIgnoreSpellIds) - iIgnoreSpellIds = new Table<unsigned int , bool>(); - if(pSpellIdString != NULL) + if (!iIgnoreSpellIds) + iIgnoreSpellIds = new Table<unsigned int, bool>(); + if (pSpellIdString != NULL) { unsigned int pos =0; unsigned int id; std::string confString(pSpellIdString); chompAndTrim(confString); - while(getNextId(confString, pos, id)) + while (getNextId(confString, pos, id)) { iIgnoreSpellIds->set(id, true); } @@ -114,7 +114,7 @@ namespace VMAP // just return the instance IVMapManager* VMapFactory::createOrGetVMapManager() { - if(gVMapManager == 0) + if (gVMapManager == 0) gVMapManager= new VMapManager2(); // should be taken from config ... Please change if you like :-) return gVMapManager; } |
