* Add a safety assert to ListNode<T>::iterator to make sure null pointers are asserted on

* Update the TODO list since SaveSegmentDialog has been ported from MFC to wxWidgets already
 * Remove some commented out occurances of "ListNode<.*>.*\*" (yes regexp), to decrease the search context for refactoring code to use iterators

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2236 4a71c877-e1ca-e34f-864e-861f7616d084
master
Giel van Schijndel 2007-07-28 00:06:12 +00:00
parent 21e85b4e62
commit 92d0f946bb
4 changed files with 2 additions and 5 deletions

View File

@ -11,7 +11,6 @@
* objectproperties.cpp
* pasteprefs.cpp
* playermap.cpp
* savesegmentsdialog.cpp
* tdview.cpp
* textureprefs.cpp
* textureview.cpp

View File

@ -391,7 +391,6 @@ BOOL CBTEditDoc::OnNewDocument()
CenterCamera();
// m_UnitIDs = NULL;
// m_ObjectDatabase = NULL;
// m_DatabaseTypes = NULL;
// m_Deployments = NULL;

View File

@ -369,8 +369,6 @@ public:
BOOL GetAutoSync(void) { return m_AutoSync; }
BOOL GetViewFeatures(void) { return m_ViewFeatures; }
// ListNode<CObjectDB>* GetObjectDatabase(void) { return m_ObjectDatabase; }
// void SetObjectDatabase(ListNode<CObjectDB>* ObjectDatabase);
// CObjectDB* GetSelectedObject(void);
// BOOL ObjectAlreadyLoaded(char *Name);
CGeometry* GetDirectMaths(void) { return m_DirectMaths; }
@ -503,7 +501,6 @@ protected:
int m_ObjectBufferSize;
ListNode<C3DObjectInstance> *m_ObjectBuffer;
// ListNode<CObjectDB> *m_ObjectDatabase;
// CDatabaseTypes *m_DatabaseTypes;
BOOL m_EnableGravity;

View File

@ -201,11 +201,13 @@ class ListNode
T& operator*() const
{
assert(_nodePtr != NULL && _nodePtr->GetData() != NULL);
return *_nodePtr->GetData();
}
T* operator->() const
{
assert(_nodePtr != NULL && _nodePtr->GetData() != NULL);
return _nodePtr->GetData();
}