mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-27 07:22:57 +02:00
use empty() instead of size()
Origin commit data
------------------
Branch: ni/coolstream
Commit: 7d8d995046
Author: Jacek Jendrzej <overx300@gmail.com>
Date: 2012-06-18 (Mon, 18 Jun 2012)
Origin message was:
------------------
use empty() instead of size()
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -387,7 +387,7 @@ std::string CUPnPDevice::HTTP(std::string url, std::string post, std::string act
|
||||
}
|
||||
path = url.substr(pos2);
|
||||
|
||||
if (post.size())
|
||||
if (!post.empty())
|
||||
command << "POST " << path << " HTTP/1.0\r\n";
|
||||
else
|
||||
command << "GET " << path << " HTTP/1.0\r\n";
|
||||
@@ -397,18 +397,18 @@ std::string CUPnPDevice::HTTP(std::string url, std::string post, std::string act
|
||||
command << "Accept: text/xml\r\n";
|
||||
command << "Connection: Close\r\n";
|
||||
|
||||
if (post.size())
|
||||
if (!post.empty())
|
||||
{
|
||||
command << "Content-Length: " << post.size() << "\r\n";
|
||||
command << "Content-Type: text/xml\r\n";
|
||||
}
|
||||
|
||||
if (action.size())
|
||||
if (!action.empty())
|
||||
command << "SOAPAction: \"" << action << "\"\r\n";
|
||||
|
||||
command << "\r\n";
|
||||
|
||||
if (post.size())
|
||||
if (!post.empty())
|
||||
command << post;
|
||||
|
||||
t_socket = socket(PF_INET, SOCK_STREAM, 0);
|
||||
|
@@ -247,7 +247,7 @@ int CTimerdClient::addTimerEvent( CTimerd::CTimerEventTypes evType, void* data,
|
||||
//printf("[CTimerdClient] checking for overlapping timers\n");
|
||||
CTimerd::TimerList overlappingTimer;
|
||||
overlappingTimer = getOverlappingTimers(alarmtime, stoptime);
|
||||
if (overlappingTimer.size() > 0)
|
||||
if (!overlappingTimer.empty())
|
||||
{
|
||||
// timerd starts eventID at 0 so we can return -1
|
||||
return -1;
|
||||
|
@@ -1473,7 +1473,7 @@ bool CRecordManager::CutBackNeutrino(const t_channel_id channel_id, const int mo
|
||||
if(SAME_TRANSPONDER(live_channel_id, channel_id)) {
|
||||
printf("%s zapTo_record channel_id %llx\n", __FUNCTION__, channel_id);
|
||||
ret = g_Zapit->zapTo_record(channel_id) > 0;
|
||||
} else if(recmap.size()) {
|
||||
} else if(!recmap.empty()) {
|
||||
ret = false;
|
||||
} else {
|
||||
if (mode != last_mode && (last_mode != NeutrinoMessages::mode_standby || mode != CNeutrinoApp::getInstance()->getLastMode())) {
|
||||
|
@@ -215,7 +215,7 @@ static bool deleteEvent(const event_id_t uniqueKey)
|
||||
MySIeventsOrderUniqueKey::iterator e = mySIeventsOrderUniqueKey.find(uniqueKey);
|
||||
|
||||
if (e != mySIeventsOrderUniqueKey.end()) {
|
||||
if (e->second->times.size()) {
|
||||
if (!e->second->times.empty()) {
|
||||
mySIeventsOrderFirstEndTimeServiceIDEventUniqueKey.erase(e->second);
|
||||
mySIeventsOrderServiceUniqueKeyFirstStartTimeEventUniqueKey.erase(e->second);
|
||||
}
|
||||
|
@@ -2086,8 +2086,8 @@ void CMovieBrowser::onDeleteFile(MI_MOVIE_INFO& movieSelectionHandler)
|
||||
|
||||
m_vMovieInfo.erase( (std::vector<MI_MOVIE_INFO>::iterator)&movieSelectionHandler);
|
||||
TRACE("List size: %d\n", m_vMovieInfo.size());
|
||||
//if(m_vMovieInfo.size() == 0) fileInfoStale();
|
||||
//if(m_vMovieInfo.size() == 0) onSetGUIWindow(m_settings.gui);
|
||||
//if(m_vMovieInfo.empty()) fileInfoStale();
|
||||
//if(m_vMovieInfo.empty()) onSetGUIWindow(m_settings.gui);
|
||||
updateSerienames();
|
||||
refreshBrowserList();
|
||||
refreshLastPlayList();
|
||||
@@ -2399,7 +2399,7 @@ void CMovieBrowser::loadAllTsFileNamesFromStorage(void)
|
||||
|
||||
TRACE("[mb] Dir%d, Files:%d \r\n",m_dirNames.size(),m_vMovieInfo.size());
|
||||
/*
|
||||
if(m_vMovieInfo.size() == 0)
|
||||
if(m_vMovieInfo.empty())
|
||||
{
|
||||
std::string msg = g_Locale->getText(LOCALE_MOVIEBROWSER_ERROR_NO_MOVIES);
|
||||
DisplayErrorMessage(msg.c_str());
|
||||
|
@@ -253,7 +253,7 @@ int CScanTs::exec(CMenuTarget* /*parent*/, const std::string & actionKey)
|
||||
g_Zapit->setScanBouquetMode( (CZapitClient::bouquetMode)scansettings.bouquetMode);
|
||||
|
||||
/* send satellite list to zapit */
|
||||
if(satList.size())
|
||||
if(!satList.empty())
|
||||
g_Zapit->setScanSatelliteList( satList);
|
||||
|
||||
tuned = -1;
|
||||
|
@@ -618,7 +618,7 @@ void CScanSetup::fillSatSelect()
|
||||
if(CFEManager::getInstance()->getMode() != CFEManager::FE_MODE_ALONE)
|
||||
break;
|
||||
}
|
||||
if(!sfound && satpos.size()) {
|
||||
if(!sfound && !satpos.empty()) {
|
||||
tmpit = satpos.begin();
|
||||
std::string satname = CServiceManager::getInstance()->GetSatelliteName(*tmpit);
|
||||
snprintf(scansettings.satNameNoDiseqc, sizeof(scansettings.satNameNoDiseqc), "%s", satname.c_str());
|
||||
@@ -649,7 +649,7 @@ void CScanSetup::fillCableSelect()
|
||||
|
||||
dprintf(DEBUG_DEBUG, "got scanprovider (cable): %s\n", sit->second.name.c_str());
|
||||
}
|
||||
if (!sfound && satmap.size()) {
|
||||
if (!sfound && !satmap.empty()) {
|
||||
sat_iterator_t sit = satmap.begin();
|
||||
snprintf(scansettings.satNameNoDiseqc, sizeof(scansettings.satNameNoDiseqc), "%s", sit->second.name.c_str());
|
||||
}
|
||||
@@ -678,7 +678,7 @@ int CScanSetup::showScanMenuSatFind()
|
||||
feSatSelect->addOption(satname.c_str());
|
||||
if (!sfound && strcmp(scansettings.satNameNoDiseqc, satname.c_str()) == 0)
|
||||
sfound = true;
|
||||
if (!sfound && !firstname.size())
|
||||
if (!sfound && firstname.empty())
|
||||
firstname = satname;
|
||||
count++;
|
||||
}
|
||||
|
@@ -390,7 +390,7 @@ void CUpnpBrowserGui::selectDevice()
|
||||
m_devices = m_socket->Discover("urn:schemas-upnp-org:service:ContentDirectory:1");
|
||||
scanBox->hide();
|
||||
|
||||
if (!m_devices.size())
|
||||
if (m_devices.empty())
|
||||
{
|
||||
ShowLocalizedMessage(LOCALE_MESSAGEBOX_INFO, LOCALE_UPNPBROWSER_NOSERVERS, CMessageBox::mbrBack, CMessageBox::mbBack, NEUTRINO_ICON_INFO);
|
||||
delete scanBox;
|
||||
@@ -457,7 +457,7 @@ void CUpnpBrowserGui::selectDevice()
|
||||
#endif
|
||||
m_devices = m_socket->Discover("urn:schemas-upnp-org:service:ContentDirectory:1");
|
||||
scanBox->hide();
|
||||
if (!m_devices.size())
|
||||
if (m_devices.empty())
|
||||
{
|
||||
ShowLocalizedMessage(LOCALE_MESSAGEBOX_INFO, LOCALE_UPNPBROWSER_NOSERVERS, CMessageBox::mbrBack, CMessageBox::mbBack, NEUTRINO_ICON_INFO);
|
||||
delete scanBox;
|
||||
|
Reference in New Issue
Block a user