Permalink
Browse files

[guilib] drop unused AddEffect() function

  • Loading branch information...
1 parent 1ec804d commit c2936b43bcd5c2d0beff0441a587207fc0607725 Jonathan Marshall committed Apr 19, 2014
Showing with 3 additions and 15 deletions.
  1. +3 −14 xbmc/guilib/VisibleEffect.cpp
  2. +0 −1 xbmc/guilib/VisibleEffect.h
View
17 xbmc/guilib/VisibleEffect.cpp
@@ -574,7 +574,9 @@ CAnimation CAnimation::CreateFader(float start, float end, unsigned int delay, u
{
CAnimation anim;
anim.m_type = type;
- anim.AddEffect(new CFadeEffect(start, end, delay, length));
+ anim.m_delay = delay;
+ anim.m_length = length;
+ anim.m_effects.push_back(new CFadeEffect(start, end, delay, length));
return anim;
}
@@ -700,19 +702,6 @@ void CAnimation::AddEffect(const CStdString &type, const TiXmlElement *node, con
m_effects.push_back(effect);
}
-void CAnimation::AddEffect(CAnimEffect *effect)
-{
- m_effects.push_back(effect);
- unsigned int total = m_delay + m_length;
- // our delay is the minimum of all the effect delays
- if (effect->GetDelay() < m_delay)
- m_delay = effect->GetDelay();
- // our total length is the maximum of all the effect lengths
- if (effect->GetLength() > total)
- total = effect->GetLength();
- m_length = total - m_delay;
-}
-
CScroller::CScroller(unsigned int duration /* = 200 */, boost::shared_ptr<Tweener> tweener /* = NULL */)
{
m_scrollValue = 0;
View
1 xbmc/guilib/VisibleEffect.h
@@ -178,7 +178,6 @@ class CAnimation
private:
void Calculate(const CPoint &point);
void AddEffect(const CStdString &type, const TiXmlElement *node, const CRect &rect);
- void AddEffect(CAnimEffect *effect);
enum ANIM_REPEAT { ANIM_REPEAT_NONE = 0, ANIM_REPEAT_PULSE, ANIM_REPEAT_LOOP };

0 comments on commit c2936b4

Please sign in to comment.