AlexMeng1986 / gamekit

Automatically exported from code.google.com/p/gamekit
0 stars 0 forks source link

removeListener() doesn't remove #313

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. add a listener to gkEngine or gkDynamicsWorld
2. remove the listener

What version of the product are you using? On what operating system?
latest trunk on Linux

Please provide any additional information below.

The method works but if the removable listener is the first element of the 
listeners list (or the only one), the listener wasn't removed.

There is an if statement in the gkEngine::removeListener() and in the 
gkDynamicsWorld::removeListener() methods to check the listener existance, but 
the m_listeners.find(listener) in the statement returns the index, so a 
listener with 0 index won't be deleted. This statement doesn't neccesary 
because the erase method check this properly before remove.

Original issue reported on code.google.com by palkodan...@gmail.com on 2 Jul 2013 at 8:57

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r1305.

Original comment by harkon...@gmail.com on 7 Jul 2013 at 10:52

GoogleCodeExporter commented 9 years ago
Fixed in latest revision.
Thanks.

Original comment by harkon...@gmail.com on 7 Jul 2013 at 10:53