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
This commit is contained in:
1 parent
8b820baa73
commit
b16d2245bb
390 files changed
+1545
-1545
No files matched your search
@@ -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;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user