1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-17 19:37:09 +02:00

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

This commit is contained in:
Uwe L. Korn
2014-11-06 14:14:06 +01:00
parent 755bc7f456
commit 80efa9a230

View File

@@ -24,12 +24,10 @@ namespace Tomahawk
APETag::APETag( TagLib::Tag *tag, TagLib::APE::Tag *apeTag )
: Tag( tag )
{
TagLib::APE::ItemListMap map = apeTag->itemListMap();
for( TagLib::APE::ItemListMap::ConstIterator it = map.begin();
it != map.end(); ++it )
for( const auto& item : apeTag->itemListMap() )
{
TagLib::String key = it->first;
QString val = TStringToQString( it->second.toString() );
const TagLib::String& key = item.first;
QString val = TStringToQString( item.second.toString() );
//some of these are not defined in the item key according to the hydrogenaudio wiki
//can I use them anyway? --Teo 11/2011
if( key == TagLib::String( "Album Artist" ) )