Skip to content

Commit

Permalink
MythDVDBuffer: Use std::transform to build chapter list
Browse files Browse the repository at this point in the history
  • Loading branch information
mark-kendall committed Oct 5, 2020
1 parent e3a8693 commit d748822
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions mythtv/libs/libmythtv/DVD/mythdvdbuffer.cpp
Expand Up @@ -370,8 +370,9 @@ void MythDVDBuffer::GetChapterTimes(QList<long long> &Times)
GetChapterTimes(m_title);
if (!m_chapterMap.contains(m_title))
return;
for (uint64_t chapter : m_chapterMap.value(m_title))
Times.push_back(static_cast<long long>(chapter));
const QList<uint64_t>& chapters = m_chapterMap.value(m_title);
std::transform(chapters.cbegin(), chapters.cend(), std::back_inserter(Times),
[](uint64_t chap) { return static_cast<long long>(chap); });
}

uint64_t MythDVDBuffer::GetChapterTimes(int Title)
Expand Down

0 comments on commit d748822

Please sign in to comment.