I should be using + instead of += apparently.

Yay for ##c++ for pointing this out.
This commit is contained in:
Jason Felds
2013-04-30 20:36:04 -04:00
parent f265465096
commit 3171f15df2
6 changed files with 7 additions and 7 deletions
+1 -1
View File
@@ -743,7 +743,7 @@ void Sprite::SetState( int iNewState )
float Sprite::GetAnimationLengthSeconds() const
{
return std::accumulate(m_States.begin(), m_States.end(), 0.f, [](float total, State const &s) { return total += s.fDelay; });
return std::accumulate(m_States.begin(), m_States.end(), 0.f, [](float total, State const &s) { return total + s.fDelay; });
}
void Sprite::SetSecondsIntoAnimation( float fSeconds )