array.erase() doesn't work

You discovered a bug in the engine, and you are sure that it is not a problem of your code? Just post it in here. Please read the bug posting guidelines first.
Post Reply
n00bc0de
Posts: 118
Joined: Tue Oct 04, 2022 1:21 am

array.erase() doesn't work

Post by n00bc0de »

I have a bunch of objects that uses array and when I try to erase them, they don't get removed from the array. I changed those objects to std::vector and it worked the way it was supposed to.
CuteAlien
Admin
Posts: 9929
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: array.erase() doesn't work

Post by CuteAlien »

Sorry, that's not enough information for me to help you. Irrlicht's array works different than std::vector sometimes. But I can't guess what is different in this specific case without any example where I can see what you actually do. I often use erase myself and so does Irrlicht, so it's not like it never works.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
n00bc0de
Posts: 118
Joined: Tue Oct 04, 2022 1:21 am

Re: array.erase() doesn't work

Post by n00bc0de »

I tried to create a small example but it is working in the small example. Its strange. In my current project, I changed the array to a std::vector and it fixed the issue but it may be something I am just doing wrong with array. My current project is already several files and probably over 20,000 lines of code so it probably wouldn't be helpful as an example.

If I figure out what I am doing wrong I will post an update.
Post Reply