whitespace edits
[blender-staging.git] / source / gameengine / SceneGraph / SG_QList.h
index 9f49060b302e1abeea108ce56191d9b4ac6ea7b3..eb404b1a5a5cef89623735b8b0cc381b9dd9869a 100644 (file)
@@ -1,4 +1,4 @@
-/**
+/*
  * $Id$
  *
  * ***** BEGIN GPL LICENSE BLOCK *****
  * $Id$
  *
  * ***** BEGIN GPL LICENSE BLOCK *****
  *
  * ***** END GPL LICENSE BLOCK *****
  */
  *
  * ***** END GPL LICENSE BLOCK *****
  */
+
+/** \file SG_QList.h
+ *  \ingroup bgesg
+ */
 #ifndef __SG_QLIST
 #define __SG_QLIST
 
 #ifndef __SG_QLIST
 #define __SG_QLIST
 
@@ -86,76 +91,76 @@ public:
        };
 
        SG_QList() : SG_DList()
        };
 
        SG_QList() : SG_DList()
-    { 
-        m_fqlink = m_bqlink = this; 
-    }
+       {
+               m_fqlink = m_bqlink = this;
+       }
        SG_QList(const SG_QList& other) : SG_DList()
        {
        SG_QList(const SG_QList& other) : SG_DList()
        {
-        m_fqlink = m_bqlink = this; 
+               m_fqlink = m_bqlink = this;
        }
        }
-    virtual ~SG_QList() 
-    {
+       virtual ~SG_QList()
+       {
                QDelink();
                QDelink();
-    }
+       }
 
 
-    inline bool QEmpty()               // Check for empty queue
-    {     
-        return ( m_fqlink == this ); 
-    }
-    bool QAddBack( SG_QList *item )  // Add to the back
-    {
+       inline bool QEmpty()               // Check for empty queue
+       {
+               return ( m_fqlink == this );
+       }
+       bool QAddBack( SG_QList *item )  // Add to the back
+       {
                if (!item->QEmpty())
                        return false;
                if (!item->QEmpty())
                        return false;
-        item->m_bqlink = m_bqlink;
-        item->m_fqlink = this;
-        m_bqlink->m_fqlink = item;
-        m_bqlink = item;
+               item->m_bqlink = m_bqlink;
+               item->m_fqlink = this;
+               m_bqlink->m_fqlink = item;
+               m_bqlink = item;
                return true;
                return true;
-    }
-    bool QAddFront( SG_QList *item )  // Add to the back
-    {
+       }
+       bool QAddFront( SG_QList *item )  // Add to the back
+       {
                if (!item->Empty())
                        return false;
                if (!item->Empty())
                        return false;
-        item->m_fqlink = m_fqlink;
-        item->m_bqlink = this;
-        m_fqlink->m_bqlink = item;
-        m_fqlink = item;
+               item->m_fqlink = m_fqlink;
+               item->m_bqlink = this;
+               m_fqlink->m_bqlink = item;
+               m_fqlink = item;
                return true;
                return true;
-    }
-    SG_QList *QRemove()           // Remove from the front
-    {
-        if (QEmpty()) 
-        {
-            return NULL;
-        }
-        SG_QList* item = m_fqlink;
-        m_fqlink = item->m_fqlink;
-        m_fqlink->m_bqlink = this;
-        item->m_fqlink = item->m_bqlink = item;
-        return item;
-    }
-    bool QDelink()             // Remove from the middle
-    {
+       }
+       SG_QList *QRemove()           // Remove from the front
+       {
+               if (QEmpty())
+               {
+                       return NULL;
+               }
+               SG_QList* item = m_fqlink;
+               m_fqlink = item->m_fqlink;
+               m_fqlink->m_bqlink = this;
+               item->m_fqlink = item->m_bqlink = item;
+               return item;
+       }
+       bool QDelink()             // Remove from the middle
+       {
                if (QEmpty())
                        return false;
                m_bqlink->m_fqlink = m_fqlink;
                m_fqlink->m_bqlink = m_bqlink;
                m_fqlink = m_bqlink = this;
                return true;
                if (QEmpty())
                        return false;
                m_bqlink->m_fqlink = m_fqlink;
                m_fqlink->m_bqlink = m_bqlink;
                m_fqlink = m_bqlink = this;
                return true;
-    }
-    inline SG_QList *QPeek()                   // Look at front without removing
-    { 
-        return m_fqlink; 
-    }  
-    inline SG_QList *QBack()                   // Look at front without removing
-    { 
-        return m_bqlink; 
-    }  
-       
-       
+       }
+       inline SG_QList *QPeek()                        // Look at front without removing
+       {
+               return m_fqlink;
+       }
+       inline SG_QList *QBack()                        // Look at front without removing
+       {
+               return m_bqlink;
+       }
+
+
 #ifdef WITH_CXX_GUARDEDALLOC
 public:
 #ifdef WITH_CXX_GUARDEDALLOC
 public:
-       void *operator new( unsigned int num_bytes) { return MEM_mallocN(num_bytes, "GE:SG_QList"); }
+       void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:SG_QList"); }
        void operator delete( void *mem ) { MEM_freeN(mem); }
 #endif
 };
        void operator delete( void *mem ) { MEM_freeN(mem); }
 #endif
 };