REGoth icon indicating copy to clipboard operation
REGoth copied to clipboard

Cppcheck errors

Open CommanderJax opened this issue 8 years ago • 1 comments

The errors below were reported by cppcheck

1 [src/components/VobClasses.cpp:49]: (error) Memory leak: logic.m_pLogicController
2 [src/components/VobClasses.cpp:73]: (error) Memory leak: logic.m_pLogicController 3 [src/components/VobClasses.cpp:90]: (error) Memory leak: logic.m_pLogicController 4 [src/engine/BaseEngine.cpp:145]: (warning) Return value of std::remove() ignored. Elements remain in container. 5 [src/engine/Input.cpp:37]: (performance) Function parameter 'func' should be passed by reference. 6 [src/physics/PhysicsSystem.cpp:159]: (error) Memory leak: cs.collisionShape 7 [src/physics/PhysicsSystem.cpp:199]: (error) Memory leak: cs.collisionShape 8 [src/physics/PhysicsSystem.cpp:221]: (error) Memory leak: cs.collisionShape 9 [src/physics/PhysicsSystem.h:128]: (performance) Function parameter 'triangles' should be passed by reference.

CommanderJax avatar Jan 14 '17 10:01 CommanderJax

@logic-leaks: There are destructor-functions in EntityActions.h for the components. They should be called in the destructor of the world-class, but I seem to have forgotten that.

ataulien avatar Jan 14 '17 11:01 ataulien