[freenos] [freenos commit] r224 - Corrected indentation of code in the Stack header.

  • From: codesite-noreply@xxxxxxxxxx
  • To: freenos@xxxxxxxxxxxxx
  • Date: Fri, 10 Jul 2009 16:05:31 +0000

Author: nieklinnenbank
Date: Fri Jul 10 09:05:00 2009
New Revision: 224

Modified:
   trunk/include/Stack.h

Log:
Corrected indentation of code in the Stack header.


Modified: trunk/include/Stack.h
==============================================================================
--- trunk/include/Stack.h       (original)
+++ trunk/include/Stack.h       Fri Jul 10 09:05:00 2009
@@ -51,15 +51,15 @@
         */
        void push(Element<T>* node)
        {
-               if( _top == NULL )
-               {
-                       _top = node;
-                       return;
-               }
-               
-               Element<T>* temp = _top;
+           if( _top == NULL )
+           {
                _top = node;
-               _top->setNext(temp);
+               return;
+           }
+               
+           Element<T>* temp = _top;
+           _top = node;
+           _top->setNext(temp);
        }
        
        /**
@@ -69,9 +69,9 @@
         */
        Element<T>* pop()
        {
-               Element<T>* temp = _top;
-               _top = temp->getNext();
-               return temp;
+           Element<T>* temp = _top;
+           _top = temp->getNext();
+           return temp;
        }
        
        /**
@@ -79,14 +79,13 @@
         */
        Size length()
        {
-               Size s = 0;
-               
-               for( Element<T>* node = _top; node != NULL; node = 
node->getNext() )
-               {
-                       s++;
-               }
+           Size s = 0;
                
-               return s;
+           for( Element<T>* node = _top; node != NULL; node = node->getNext() )
+           {
+               s++;
+           }
+           return s;
        }
        
        /**
@@ -94,7 +93,7 @@
         */
        T* peek()
        {
-               return _top->getData();
+           return _top->getData();
        }
     private:


Other related posts:

  • » [freenos] [freenos commit] r224 - Corrected indentation of code in the Stack header. - codesite-noreply