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
@@ -51,7 +51,7 @@ class LinkedListElement
|
||||
|
||||
void delink()
|
||||
{
|
||||
if(isInList())
|
||||
if (isInList())
|
||||
{
|
||||
iNext->iPrev = iPrev; iPrev->iNext = iNext; iNext = NULL; iPrev = NULL;
|
||||
}
|
||||
@@ -112,11 +112,11 @@ class LinkedListHead
|
||||
|
||||
uint32 getSize() const
|
||||
{
|
||||
if(!iSize)
|
||||
if (!iSize)
|
||||
{
|
||||
uint32 result = 0;
|
||||
LinkedListElement const* e = getFirst();
|
||||
while(e)
|
||||
while (e)
|
||||
{
|
||||
++result;
|
||||
e = e->next();
|
||||
|
||||
@@ -43,7 +43,7 @@ template <class TO, class FROM> class RefManager : public LinkedListHead
|
||||
void clearReferences()
|
||||
{
|
||||
LinkedListElement* ref;
|
||||
while((ref = getFirst()) != NULL)
|
||||
while ((ref = getFirst()) != NULL)
|
||||
{
|
||||
((Reference<TO, FROM>*) ref)->invalidate();
|
||||
ref->delink(); // the delink might be already done by invalidate(), but doing it here again does not hurt and insures an empty list
|
||||
|
||||
@@ -45,9 +45,9 @@ template <class TO, class FROM> class Reference : public LinkedListElement
|
||||
void link(TO* toObj, FROM* fromObj)
|
||||
{
|
||||
assert(fromObj); // fromObj MUST not be NULL
|
||||
if(isValid())
|
||||
if (isValid())
|
||||
unlink();
|
||||
if(toObj != NULL)
|
||||
if (toObj != NULL)
|
||||
{
|
||||
iRefTo = toObj;
|
||||
iRefFrom = fromObj;
|
||||
|
||||
@@ -46,9 +46,9 @@ class ObjectRegistry
|
||||
bool InsertItem(T *obj, Key key, bool override = false)
|
||||
{
|
||||
typename RegistryMapType::iterator iter = i_registeredObjects.find(key);
|
||||
if( iter != i_registeredObjects.end() )
|
||||
if ( iter != i_registeredObjects.end() )
|
||||
{
|
||||
if( !override )
|
||||
if ( !override )
|
||||
return false;
|
||||
delete iter->second;
|
||||
i_registeredObjects.erase(iter);
|
||||
@@ -62,9 +62,9 @@ class ObjectRegistry
|
||||
void RemoveItem(Key key, bool delete_object = true)
|
||||
{
|
||||
typename RegistryMapType::iterator iter = i_registeredObjects.find(key);
|
||||
if( iter != i_registeredObjects.end() )
|
||||
if ( iter != i_registeredObjects.end() )
|
||||
{
|
||||
if( delete_object )
|
||||
if ( delete_object )
|
||||
delete iter->second;
|
||||
i_registeredObjects.erase(iter);
|
||||
}
|
||||
|
||||
@@ -101,7 +101,7 @@ namespace Trinity
|
||||
template<class SPECIFIC_TYPE, class H, class T> CountedPtr<SPECIFIC_TYPE>& Find(const ContainerMapList<TypeList<H, T> >&elements, OBJECT_HANDLE hdl, CountedPtr<SPECIFIC_TYPE>* fake)
|
||||
{
|
||||
CountedPtr<SPECIFIC_TYPE> &t = Find(elements._elements, hdl, fake);
|
||||
if(!t)
|
||||
if (!t)
|
||||
t = Find(elements._TailElement, hdl, fake);
|
||||
|
||||
return t;
|
||||
@@ -136,7 +136,7 @@ namespace Trinity
|
||||
template<class SPECIFIC_TYPE> bool Remove(ContainerMapList<SPECIFIC_TYPE> &elements, CountedPtr<SPECIFIC_TYPE> &obj, OBJECT_HANDLE hdl)
|
||||
{
|
||||
typename std::map<OBJECT_HANDLE, CountedPtr<SPECIFIC_TYPE> >::iterator iter = elements._element.find(hdl);
|
||||
if( iter != elements._element.end() )
|
||||
if ( iter != elements._element.end() )
|
||||
{
|
||||
elements._element.erase(iter);
|
||||
return true;
|
||||
|
||||
Reference in new issue
Block a user