fix memory errors realted to cache

This commit is contained in:
arthur.jamet
2021-06-14 17:34:06 +02:00
parent 5ea5e048c9
commit d17836685e
9 changed files with 94 additions and 37 deletions
@@ -8,9 +8,9 @@
namespace BBM
{
AnimationsComponent::AnimationsComponent(WAL::Entity &entity, RAY::ModelAnimations modelAnimation, int animIndex, bool play)
AnimationsComponent::AnimationsComponent(WAL::Entity &entity, const std::string &path, int animIndex, bool play)
: WAL::Component(entity),
_modelAnimation(std::move(modelAnimation)),
_modelAnimation(path),
_currentAnimIndex(animIndex),
_animDisabled(play)
{
@@ -20,7 +20,7 @@ namespace BBM
WAL::Component *AnimationsComponent::clone(WAL::Entity &entity) const
{
return new AnimationsComponent(entity,
RAY::ModelAnimations(this->_modelAnimation.getFilePath()),
this->_modelAnimation.getFilePath(),
this->_currentAnimIndex);
}
@@ -52,7 +52,7 @@ namespace BBM
bool isAnimDisabled() const;
//! @brief ctor entity and the path of the animation file
explicit AnimationsComponent(WAL::Entity &entity, RAY::ModelAnimations modelAnimation, int animIndex, bool play = true);
explicit AnimationsComponent(WAL::Entity &entity, const std::string &path, int animIndex, bool play = true);
//! @brief copy ctor
AnimationsComponent(const AnimationsComponent &) = default;
//! @brief dtor