here's the code to reproduce the bug:
Code: Select all
class myClass
{
irr::core::list<Item*> ItemList;
void method();
myClass(){};
~myClass(){};
}
...
myClass::method()
{
ItemList.erase(ItemList.getLast());
}
irrlicht.1.7.2 compiling with CODE::BLOCKS(gcc)
irrlicht.1.8 compiling with CODE::BLOCKS(gcc)
With visual studio there are no problem and the code run smoothly (both the original code and the simplified code).
Any suggestion on how to obtain the same result (delete the last item in the list) with a different code for a temporary fix?
edit: the same appens when using "begin()" instead of "getLast()" and appens only under codeBlocks. I don't know why it works under visual studio.
Other code like:
Code: Select all
if(!ItemList.empty())