use empty() instead of size()

This commit is contained in:
satbaby
2012-06-16 09:44:42 +02:00
parent 6ff5a915bd
commit bc574e9688
29 changed files with 79 additions and 79 deletions

View File

@@ -367,7 +367,7 @@ printf("CRemoteControl::handleMsg: EVT_TUNE_COMPLETE (%016llx)\n", chid);
void CRemoteControl::getSubChannels()
{
//printf("[neutrino] getSubChannels, current_EPGid %llx\n", current_EPGid);
if ( subChannels.size() == 0 )
if ( subChannels.empty() )
{
CSectionsdClient::LinkageDescriptorList linkedServices;
//if ( g_Sectionsd->getLinkageDescriptorsUniqueKey( current_EPGid, linkedServices ) )
@@ -401,7 +401,7 @@ void CRemoteControl::getSubChannels()
void CRemoteControl::getNVODs()
{
//printf("[neutrino] getNVODs, current_EPGid %llx\n", current_EPGid);
if ( subChannels.size() == 0 )
if ( subChannels.empty() )
{
CSectionsdClient::NVODTimesList NVODs;
//if ( g_Sectionsd->getNVODTimesServiceKey( current_channel_id & 0xFFFFFFFFFFFFULL, NVODs ) )
@@ -633,13 +633,13 @@ const std::string & CRemoteControl::subChannelUp(void)
{
//return setSubChannel((subChannels.size() == 0) ? -1 : (int)((selected_subchannel + 1) % subChannels.size()));
// if there are any NVOD/subchannels switch these else switch audio channel (if any)
if (subChannels.size() > 0 || !g_settings.audiochannel_up_down_enable)
if ( !subChannels.empty() || !g_settings.audiochannel_up_down_enable)
{
return setSubChannel((subChannels.size() == 0) ? -1 : (int)((selected_subchannel + 1) % subChannels.size()));
}
else
{
if (current_PIDs.APIDs.size() > 0)
if ( !current_PIDs.APIDs.empty() )
{
setAPID((current_PIDs.PIDs.selected_apid + 1) % current_PIDs.APIDs.size());
}
@@ -651,13 +651,13 @@ const std::string & CRemoteControl::subChannelDown(void)
{
//return setSubChannel((selected_subchannel <= 0) ? (subChannels.size() - 1) : (selected_subchannel - 1));
// if there are any NVOD/subchannels switch these else switch audio channel (if any)
if (subChannels.size() > 0 || !g_settings.audiochannel_up_down_enable)
if ( !subChannels.empty() || !g_settings.audiochannel_up_down_enable)
{
return setSubChannel((selected_subchannel <= 0) ? (subChannels.size() - 1) : (selected_subchannel - 1));
}
else
{
if (current_PIDs.APIDs.size() > 0)
if ( !current_PIDs.APIDs.empty() )
{
if (current_PIDs.PIDs.selected_apid <= 0)
setAPID(current_PIDs.APIDs.size() - 1);