]> jfr.im git - irc/gameservirc.git/blobdiff - gameserv/list.h
Added a TODO list to the cvs repository
[irc/gameservirc.git] / gameserv / list.h
index 01b28fa660d4cd37a144a1d22b0a31cac94d14c8..19237f1f289901b603bfebb6d6d40ae6813dbb54 100644 (file)
@@ -6,6 +6,7 @@
 #include "listnode.h"
 #include "aClient.h"
 
+
 template <class T>
 class List {
     public:
@@ -44,12 +45,9 @@ List<T>::~List()
        {
            tempPtr = currentPtr;
            currentPtr = currentPtr->Next();
-//         if (!tempPtr->getData()->stats || tempPtr->getData()->stats->started == 0)
            cout << "Deleting Memory address: " << tempPtr->getData() << endl << flush;
            
                delete tempPtr;
-//         else
-//             tempPtr->getData()->stats->started = 0;
        }
        cout << "All Nodes destroyed" << endl;
     }
@@ -172,11 +170,11 @@ void List<T>::print() const
     currentPtr = firstPtr;
     while (currentPtr)
     {
-       cout << "aClient: " << currentPtr->getData() << flush;
+       cout << "aClient: " << *currentPtr->getData() << flush;
 
         if (currentPtr->getData()->stats)
-           cout << "  Player Name: " << &currentPtr->getData()->stats->name 
-                << "   Password: " << &currentPtr->getData()->stats->password << flush;
+           cout << "  Player Name: " << currentPtr->getData()->stats->name 
+                << "   Password: " << currentPtr->getData()->stats->password << flush;
        cout << endl;
        currentPtr = currentPtr->next;
     }