Let Mac OS X have goodies.

This commit is contained in:
Jason Felds
2013-04-29 23:37:10 -04:00
parent 71d993ee39
commit c07d4cf78f
11 changed files with 4 additions and 117 deletions
-7
View File
@@ -14,15 +14,8 @@ int TrailUtil::GetNumSongs( const Trail *pTrail )
float TrailUtil::GetTotalSeconds( const Trail *pTrail )
{
#ifdef MACOSX
float fSecs = 0;
for (TrailEntry const &e : pTrail->m_vEntries)
fSecs += e.pSong->m_fMusicLengthSeconds;
return fSecs;
#else
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; });
#endif
}
///////////////////////////////////////////////////////////////////////