1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-11 00:24:12 +02:00

Use C++11 range-for and references for better performance

This commit is contained in:
Uwe L. Korn
2014-11-06 14:18:56 +01:00
parent 1b11ebb9f5
commit 9f62ca3548

View File

@@ -24,12 +24,10 @@ namespace Tomahawk
ASFTag::ASFTag( TagLib::Tag *tag, TagLib::ASF::Tag *asfTag )
: Tag( tag )
{
TagLib::ASF::AttributeListMap map = asfTag->attributeListMap();
for( TagLib::ASF::AttributeListMap::ConstIterator it = map.begin();
it != map.end(); ++it )
for ( const auto& item : asfTag->attributeListMap() )
{
TagLib::String key = it->first;
QString val = TStringToQString( it->second[ 0 ].toString() );
const TagLib::String& key = item.first;
QString val = TStringToQString( item.second[ 0 ].toString() );
if( key == TagLib::String( "WM/AlbumTitle" ) ) //album artist
{
m_albumArtist = val;