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
@@ -15,7 +15,7 @@ int TrailUtil::GetNumSongs( const Trail *pTrail )
float TrailUtil::GetTotalSeconds( const Trail *pTrail )
{
auto const &entries = pTrail->m_vEntries;
return std::accumulate(entries.begin(), entries.end(), 0.f, [](float total, TrailEntry const &e) { return total += e.pSong->m_fMusicLengthSeconds; });
return std::accumulate(entries.begin(), entries.end(), 0.f, [](float total, TrailEntry const &e) { return total + e.pSong->m_fMusicLengthSeconds; });
}
///////////////////////////////////////////////////////////////////////