diff options
author | Piotr Dziwinski <piotrdz@gmail.com> | 2013-10-12 18:48:28 +0200 |
---|---|---|
committer | Piotr Dziwinski <piotrdz@gmail.com> | 2013-10-12 18:50:30 +0200 |
commit | 5d0d9b5aa5cf19aff9edb42701d38b5096fce3aa (patch) | |
tree | c0259ff8a7fce4500096acda26cae52fd0beea74 /src/graphics | |
parent | 141f73866e97d450486efadd429d8d4607949415 (diff) | |
download | colobot-5d0d9b5aa5cf19aff9edb42701d38b5096fce3aa.tar.gz colobot-5d0d9b5aa5cf19aff9edb42701d38b5096fce3aa.tar.bz2 colobot-5d0d9b5aa5cf19aff9edb42701d38b5096fce3aa.zip |
Fixed some CBot-related memory leaks
* fixed leaks in CScript::CheckToken()
* fixed leaks in CInterface
* commented out unused function in robotmain.cpp
Diffstat (limited to 'src/graphics')
-rw-r--r-- | src/graphics/engine/lightman.cpp | 10 | ||||
-rw-r--r-- | src/graphics/engine/lightman.h | 18 |
2 files changed, 14 insertions, 14 deletions
diff --git a/src/graphics/engine/lightman.cpp b/src/graphics/engine/lightman.cpp index 8694c7a..564cced 100644 --- a/src/graphics/engine/lightman.cpp +++ b/src/graphics/engine/lightman.cpp @@ -69,16 +69,6 @@ void LightProgression::SetTarget(float value) } -DynamicLight::DynamicLight() -{ - rank = 0; - used = enabled = false; - priority = LIGHT_PRI_LOW; - includeType = excludeType = ENG_OBJTYPE_NULL; -} - - - CLightManager::CLightManager(CEngine* engine) { m_device = nullptr; 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) + {} }; /** |