previous = last_one;
next = next_one;
list = the_list;
- key.string = NULL;
+ key.string = (char *) NULL;
if (previous)
previous->next = this;
wxList::wxList (void)
{
- first_node = NULL;
- last_node = NULL;
+ first_node = (wxNode *) NULL;
+ last_node = (wxNode *) NULL;
n = 0;
destroy_data = 0;
key_type = wxKEY_NONE;
wxList::wxList (int N, wxObject * Objects[])
{
- wxNode *last = NULL;
+ wxNode *last = (wxNode *) NULL;
int i;
for (i = 0; i < N; i++)
{
- wxNode *next = new wxNode (this, last, NULL, Objects[i]);
+ wxNode *next = new wxNode (this, last, (wxNode *) NULL, Objects[i]);
last = next;
if (i == 0)
first_node = next;
{
n = 0;
destroy_data = 0;
- first_node = NULL;
- last_node = NULL;
+ first_node = (wxNode *) NULL;
+ last_node = (wxNode *) NULL;
key_type = the_key_type;
}
va_start (ap, first_one);
- wxNode *last = new wxNode (this, NULL, NULL, first_one);
+ wxNode *last = new wxNode (this, (wxNode *) NULL, (wxNode *) NULL, first_one);
first_node = last;
n = 1;
break;
else
{
- wxNode *node = new wxNode (this, last, NULL, object);
+ wxNode *node = new wxNode (this, last, (wxNode *) NULL, object);
last = node;
n++;
}
wxNode *wxList::Append(wxObject *object)
{
- wxNode *node = new wxNode(this, last_node, NULL, object);
+ wxNode *node = new wxNode(this, last_node, (wxNode *) NULL, object);
if (!first_node)
first_node = node;
last_node = node;
if (j++ == i)
return current;
}
- return NULL; // No such element
+ return (wxNode *) NULL; // No such element
}
current = current->Next();
}
- return NULL; // Not found!
+ return (wxNode *) NULL; // Not found!
}
wxNode *wxList::Find (const char *key) const
current = current->Next();
}
- return NULL; // Not found!
+ return (wxNode *) NULL; // Not found!
}
if (each == object)
return current;
}
- return NULL;
+ return (wxNode *) NULL;
}
bool wxList::DeleteNode (wxNode * node)
// Insert new node at front of list
wxNode *wxList::Insert (wxObject * object)
{
- wxNode *node = new wxNode (this, NULL, First (), object);
+ wxNode *node = new wxNode (this, (wxNode *) NULL, First (), object);
first_node = node;
if (!(node->Next ()))
// Insert new node before given node.
wxNode *wxList::Insert (wxNode * position, wxObject * object)
{
- wxNode *prev = NULL;
+ wxNode *prev = (wxNode *) NULL;
if (position)
prev = position->Previous ();
// Keyed append
wxNode *wxList::Append (long key, wxObject * object)
{
- wxNode *node = new wxNode (this, last_node, NULL, object, key);
+ wxNode *node = new wxNode (this, last_node, (wxNode *) NULL, object, key);
if (!first_node)
first_node = node;
last_node = node;
wxNode *wxList::Append (const char *key, wxObject * object)
{
- wxNode *node = new wxNode (this, last_node, NULL, object, key);
+ wxNode *node = new wxNode (this, last_node, (wxNode *) NULL, object, key);
if (!first_node)
first_node = node;
last_node = node;
delete current;
current = next;
}
- first_node = NULL;
- last_node = NULL;
+ first_node = (wxNode *) NULL;
+ last_node = (wxNode *) NULL;
n = 0;
}
{ if ((*F)( each->Data ())) return each->Data();
each = each->Next();
}
- return NULL;
+ return (wxNode *) NULL;
}
// Like FirstThat, but proceeds from the end backward
wxObject *wxList::LastThat(wxListIterateFunction F)
{ if ((*F)( each->Data ())) return each->Data();
each = each->Previous();
}
- return NULL;
+ return (wxNode *) NULL;
}
// (stefan.hammes@urz.uni-heidelberg.de)
n = 0;
destroy_data = 0;
key_type = wxKEY_NONE;
- first_node = NULL;
- last_node = NULL;
+ first_node = (wxNode *) NULL;
+ last_node = (wxNode *) NULL;
if (!first)
return;
va_start (ap, first);
- wxNode *last = new wxNode (this, NULL, NULL, (wxObject *) copystring (first));
+ wxNode *last = new wxNode (this, (wxNode *) NULL, (wxNode *) NULL, (wxObject *) copystring (first));
first_node = last;
n = 1;
break;
else
{
- wxNode *node = new wxNode (this, last, NULL, (wxObject *) copystring (s));
+ wxNode *node = new wxNode (this, last, (wxNode *) NULL, (wxObject *) copystring (s));
last = node;
n++;
}