mirror of
https://github.com/cookiengineer/audacity
synced 2025-10-21 14:02:57 +02:00
Define and use utilities transform_range, transform_container
This commit is contained in:
@@ -111,20 +111,13 @@ private:
|
||||
|
||||
auto ODDecodeFFmpegTask::FromList( const TrackHolders &channels ) -> Streams
|
||||
{
|
||||
Streams streams;
|
||||
streams.reserve(channels.size());
|
||||
using namespace std;
|
||||
transform(channels.begin(), channels.end(), back_inserter(streams),
|
||||
// Convert array of array of unique_ptr to array of array of bare pointers
|
||||
return transform_container<Streams>( channels,
|
||||
[](const NewChannelGroup &holders) {
|
||||
Channels channels;
|
||||
channels.reserve(holders.size());
|
||||
transform(holders.begin(), holders.end(), back_inserter(channels),
|
||||
mem_fn(&NewChannelGroup::value_type::get)
|
||||
);
|
||||
return channels;
|
||||
return transform_container<Channels>( holders,
|
||||
std::mem_fn(&NewChannelGroup::value_type::get) );
|
||||
}
|
||||
);
|
||||
return streams;
|
||||
}
|
||||
|
||||
//------ ODDecodeFFmpegTask definitions
|
||||
|
Reference in New Issue
Block a user