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
+2 -2
View File
@@ -159,14 +159,14 @@ int Trail::GetMeter() const
int Trail::GetTotalMeter() const
{
return std::accumulate(m_vEntries.begin(), m_vEntries.end(), 0, [](int total, TrailEntry const &e) {
return total += e.pSteps->GetMeter();
return total + e.pSteps->GetMeter();
});
}
float Trail::GetLengthSeconds() const
{
return std::accumulate(m_vEntries.begin(), m_vEntries.end(), 0.f, [](float total, TrailEntry const &e) {
return total += e.pSong->m_fMusicLengthSeconds;
return total + e.pSong->m_fMusicLengthSeconds;
});
}