mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 00:11:14 +02:00
use empty() instead of size()
This commit is contained in:
@@ -582,7 +582,7 @@ int CAudioPlayerGui::show()
|
||||
//stop(); // Stop if song is deleted, next song will be startet automat.
|
||||
}
|
||||
if (m_selected >= m_playlist.size())
|
||||
m_selected = m_playlist.size() == 0 ? m_playlist.size() : m_playlist.size() - 1;
|
||||
m_selected = m_playlist.empty() ? m_playlist.size() : m_playlist.size() - 1;
|
||||
update = true;
|
||||
}
|
||||
}
|
||||
@@ -2469,7 +2469,7 @@ void CAudioPlayerGui::removeFromPlaylist(long pos)
|
||||
item->second.erase(pos);
|
||||
|
||||
// delete empty entries
|
||||
if (item->second.size() == 0)
|
||||
if (item->second.empty())
|
||||
{
|
||||
m_title2Pos.erase(item);
|
||||
}
|
||||
@@ -2529,7 +2529,7 @@ void CAudioPlayerGui::selectTitle(unsigned char selectionChar)
|
||||
}
|
||||
else
|
||||
{
|
||||
if (it->second.size() > 0)
|
||||
if ( !it->second.empty() )
|
||||
{
|
||||
i = *(it->second.begin());
|
||||
//printf("using begin i: %ld\n",i);
|
||||
|
Reference in New Issue
Block a user