[irr 1.2] [Fixed] Listspointers
[irr 1.2] [Fixed] Listspointers
I have an bug, list1 = list2 doesn't work, the code gives an error in the clear function, the list are the sametype and it doens;t matter if list1 is empty or filled before the =.
Last edited by Strong99 on Sat Mar 24, 2007 8:13 pm, edited 2 times in total.
Compete or join in irrlichts monthly screenshot competition!
Blog/site: http://rex.4vandorp.eu
Company: http://www.islandworks.eu/, InCourse
Twitter: @strong99
Blog/site: http://rex.4vandorp.eu
Company: http://www.islandworks.eu/, InCourse
Twitter: @strong99
i use an own made class
named lod.
irr::core::list<CLod*> list1;
some push backs follow readed from file
than
irr::core::list<CLod*>list2 = list1;
And the error occurs in clear... but why? using clear is ok. But why an error when we use = ? even ::Iterator i = list1.begin() crashes
named lod.
irr::core::list<CLod*> list1;
some push backs follow readed from file
than
irr::core::list<CLod*>list2 = list1;
And the error occurs in clear... but why? using clear is ok. But why an error when we use = ? even ::Iterator i = list1.begin() crashes
Compete or join in irrlichts monthly screenshot competition!
Blog/site: http://rex.4vandorp.eu
Company: http://www.islandworks.eu/, InCourse
Twitter: @strong99
Blog/site: http://rex.4vandorp.eu
Company: http://www.islandworks.eu/, InCourse
Twitter: @strong99
i found examples from Irrlicht 1.1 and 1.0 over list1 = list2 seemd to work there whats wrong? even those examples stopt working on irr 1.2
Compete or join in irrlichts monthly screenshot competition!
Blog/site: http://rex.4vandorp.eu
Company: http://www.islandworks.eu/, InCourse
Twitter: @strong99
Blog/site: http://rex.4vandorp.eu
Company: http://www.islandworks.eu/, InCourse
Twitter: @strong99
Compete or join in irrlichts monthly screenshot competition!
Blog/site: http://rex.4vandorp.eu
Company: http://www.islandworks.eu/, InCourse
Twitter: @strong99
Blog/site: http://rex.4vandorp.eu
Company: http://www.islandworks.eu/, InCourse
Twitter: @strong99
k thnx
Compete or join in irrlichts monthly screenshot competition!
Blog/site: http://rex.4vandorp.eu
Company: http://www.islandworks.eu/, InCourse
Twitter: @strong99
Blog/site: http://rex.4vandorp.eu
Company: http://www.islandworks.eu/, InCourse
Twitter: @strong99
I get the same problem with the list's copy constructor. By debugging I found out that my program crashes in these lines:
void clear()
{
SKListNode* node = root;
while(node)
{
SKListNode* next = node->next;
delete node;
node = next;
}
root = 0;
last = 0;
size = 0;
}
root happens to have a junk value (non-initialized). I fixed my copy of irrlist.h as this (http://irrlicht.sourceforge.net/phpBB2/ ... sc&start=0 ) post said and it worked.
void clear()
{
SKListNode* node = root;
while(node)
{
SKListNode* next = node->next;
delete node;
node = next;
}
root = 0;
last = 0;
size = 0;
}
root happens to have a junk value (non-initialized). I fixed my copy of irrlist.h as this (http://irrlicht.sourceforge.net/phpBB2/ ... sc&start=0 ) post said and it worked.