mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-18 03:41:27 +02:00
Use C++11 range-for and references for better performance
This commit is contained in:
@@ -24,12 +24,10 @@ namespace Tomahawk
|
|||||||
APETag::APETag( TagLib::Tag *tag, TagLib::APE::Tag *apeTag )
|
APETag::APETag( TagLib::Tag *tag, TagLib::APE::Tag *apeTag )
|
||||||
: Tag( tag )
|
: Tag( tag )
|
||||||
{
|
{
|
||||||
TagLib::APE::ItemListMap map = apeTag->itemListMap();
|
for( const auto& item : apeTag->itemListMap() )
|
||||||
for( TagLib::APE::ItemListMap::ConstIterator it = map.begin();
|
|
||||||
it != map.end(); ++it )
|
|
||||||
{
|
{
|
||||||
TagLib::String key = it->first;
|
const TagLib::String& key = item.first;
|
||||||
QString val = TStringToQString( it->second.toString() );
|
QString val = TStringToQString( item.second.toString() );
|
||||||
//some of these are not defined in the item key according to the hydrogenaudio wiki
|
//some of these are not defined in the item key according to the hydrogenaudio wiki
|
||||||
//can I use them anyway? --Teo 11/2011
|
//can I use them anyway? --Teo 11/2011
|
||||||
if( key == TagLib::String( "Album Artist" ) )
|
if( key == TagLib::String( "Album Artist" ) )
|
||||||
|
Reference in New Issue
Block a user