perandersson / playstate

PlayState
2 stars 0 forks source link

Replace the children std::list to LinkedList in SceneNode class #6

Closed perandersson closed 11 years ago

perandersson commented 11 years ago

Replace the children std::list into a LinkedList implementation that works the same way as the current LinkedList. This is because the std::list does not support deletions and iterations at the same time.

perandersson commented 11 years ago

Related reading: http://stackoverflow.com/questions/12699452/c-circular-dependency-with-intrusive-linked-list https://connect.microsoft.com/VisualStudio/feedback/details/514710/i-can-not-get-access-to-pointer-to-member

There are a lot of bugs posted on Microsofts forums about this bug, but it seems like it won't be fixed anytime soon. Perhaps an alternate solution is needed for these types of lists?

perandersson commented 11 years ago

FIxed. The template solution for the intrusive linked list could not be fixed due to bugs in the compiler. The new solution are runtime specific instead:

LinkedListLink<MyClass> MyClassLink;
LinkedList<MyClass> mClassList(offsetof(MyClass, MyClassLink));