[fixed]array erase() auto sorting?
Posted: Sun Feb 14, 2010 7:50 pm
i've found out a problem when using array, which is for example I stored some scene nodes in an array, and would like to delete some of it later using for-loop
I realize scene nodes that are in the end of the list didn't get deleted. i think array auto sorted the list when i use erase(), bringing the elements at the back in-front to fill in the blank am I correct?
I don't want to do that I want to manually sort() the list after I done my removals. Any way to do that? Thanks.
Code: Select all
nodeList[i]->remove();
nodeList.erase(i);
I don't want to do that I want to manually sort() the list after I done my removals. Any way to do that? Thanks.