From 5d0d9b5aa5cf19aff9edb42701d38b5096fce3aa Mon Sep 17 00:00:00 2001 From: Piotr Dziwinski Date: Sat, 12 Oct 2013 18:48:28 +0200 Subject: Fixed some CBot-related memory leaks * fixed leaks in CScript::CheckToken() * fixed leaks in CInterface * commented out unused function in robotmain.cpp --- src/graphics/engine/lightman.h | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'src/graphics/engine/lightman.h') diff --git a/src/graphics/engine/lightman.h b/src/graphics/engine/lightman.h index a2f6044..5df466d 100644 --- a/src/graphics/engine/lightman.h +++ b/src/graphics/engine/lightman.h @@ -51,9 +51,12 @@ struct LightProgression float speed; LightProgression() - { - starting = ending = current = progress = speed = 0.0f; - } + : starting(0.0f) + , ending(0.0f) + , current(0.0f) + , progress(0.0f) + , speed(0.0f) + {} //! Initializes the progression void Init(float value); @@ -113,7 +116,14 @@ struct DynamicLight //! Type of objects excluded from lighting with this light; if ENG_OBJTYPE_NULL is used, it is ignored EngineObjectType excludeType; - DynamicLight(); + DynamicLight() + : rank(0) + , used(false) + , enabled(false) + , priority(LIGHT_PRI_LOW) + , includeType(ENG_OBJTYPE_NULL) + , excludeType(ENG_OBJTYPE_NULL) + {} }; /** -- cgit v1.2.3-1-g7c22