mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-31 01:11:06 +02:00
use empty() instead of size()
Origin commit data
------------------
Branch: ni/coolstream
Commit: bc574e9688
Author: Jacek Jendrzej <overx300@gmail.com>
Date: 2012-06-16 (Sat, 16 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:
@@ -1206,7 +1206,7 @@ void CMovieBrowser::refreshMovieInfo(void)
|
||||
{
|
||||
//TRACE("[mb]->refreshMovieInfo m_vMovieInfo.size %d\n", m_vMovieInfo.size());
|
||||
std::string emptytext = " ";
|
||||
if(m_vMovieInfo.size() <= 0) {
|
||||
if(m_vMovieInfo.empty()) {
|
||||
if(m_pcInfo != NULL)
|
||||
m_pcInfo->setText(&emptytext);
|
||||
return;
|
||||
@@ -1286,7 +1286,7 @@ void CMovieBrowser::info_hdd_level(bool paint_hdd)
|
||||
}
|
||||
void CMovieBrowser::refreshLCD(void)
|
||||
{
|
||||
if(m_vMovieInfo.size() <= 0) return;
|
||||
if(m_vMovieInfo.empty()) return;
|
||||
|
||||
//CVFD * lcd = CVFD::getInstance();
|
||||
if(m_movieSelectionHandler == NULL)
|
||||
@@ -1313,7 +1313,7 @@ void CMovieBrowser::refreshFilterList(void)
|
||||
m_FilterLines.rowWidth[0] = 100;
|
||||
m_FilterLines.lineHeader[0]= "";
|
||||
|
||||
if(m_vMovieInfo.size() <= 0)
|
||||
if(m_vMovieInfo.empty())
|
||||
return; // exit here if nothing else is to do
|
||||
|
||||
if(m_settings.filter.item == MB_INFO_MAX_NUMBER)
|
||||
@@ -1389,7 +1389,7 @@ void CMovieBrowser::refreshLastPlayList(void) //P2
|
||||
}
|
||||
m_vHandlePlayList.clear();
|
||||
|
||||
if(m_vMovieInfo.size() <= 0) {
|
||||
if(m_vMovieInfo.empty()) {
|
||||
if(m_pcLastPlay != NULL)
|
||||
m_pcLastPlay->setLines(&m_playListLines);
|
||||
return; // exit here if nothing else is to do
|
||||
@@ -1447,7 +1447,7 @@ void CMovieBrowser::refreshLastRecordList(void) //P2
|
||||
}
|
||||
m_vHandleRecordList.clear();
|
||||
|
||||
if(m_vMovieInfo.size() <= 0) {
|
||||
if(m_vMovieInfo.empty()) {
|
||||
if(m_pcLastRecord != NULL)
|
||||
m_pcLastRecord->setLines(&m_recordListLines);
|
||||
return; // exit here if nothing else is to do
|
||||
@@ -1506,7 +1506,7 @@ void CMovieBrowser::refreshBrowserList(void) //P1
|
||||
}
|
||||
m_vHandleBrowserList.clear();
|
||||
|
||||
if(m_vMovieInfo.size() <= 0)
|
||||
if(m_vMovieInfo.empty())
|
||||
{
|
||||
m_currentBrowserSelection = 0;
|
||||
m_movieSelectionHandler = NULL;
|
||||
@@ -1727,7 +1727,7 @@ bool CMovieBrowser::onButtonPressMainFrame(neutrino_msg_t msg)
|
||||
}
|
||||
else if (msg == CRCInput::RC_spkr)
|
||||
{
|
||||
if ((m_vMovieInfo.size() > 0) && (m_movieSelectionHandler != NULL) && (IsRecord == false))
|
||||
if ((!m_vMovieInfo.empty()) && (m_movieSelectionHandler != NULL) && (IsRecord == false))
|
||||
onDeleteFile(*m_movieSelectionHandler);
|
||||
}
|
||||
else if (msg == CRCInput::RC_help || msg == CRCInput::RC_info)
|
||||
@@ -2318,7 +2318,7 @@ void CMovieBrowser::onSetFocusNext(void)
|
||||
bool CMovieBrowser::onSortMovieInfoHandleList(std::vector<MI_MOVIE_INFO*>& handle_list, MB_INFO_ITEM sort_item, MB_DIRECTION direction)
|
||||
{
|
||||
//TRACE("sort: %d\r\n",direction);
|
||||
if(handle_list.size() <= 0)
|
||||
if(handle_list.empty())
|
||||
return (false); // nothing to sort, return immedately
|
||||
if(sortBy[sort_item] == NULL)
|
||||
return (false);
|
||||
@@ -2585,13 +2585,13 @@ bool CMovieBrowser::delFile_std(CFile& file)
|
||||
void CMovieBrowser::updateMovieSelection(void)
|
||||
{
|
||||
//TRACE("[mb]->updateMovieSelection %d\r\n",m_windowFocus);
|
||||
if (m_vMovieInfo.size() == 0) return;
|
||||
if (m_vMovieInfo.empty()) return;
|
||||
bool new_selection = false;
|
||||
|
||||
unsigned int old_movie_selection;
|
||||
if(m_windowFocus == MB_FOCUS_BROWSER)
|
||||
{
|
||||
if(m_vHandleBrowserList.size() == 0)
|
||||
if(m_vHandleBrowserList.empty())
|
||||
{
|
||||
// There are no elements in the Filebrowser, clear all handles
|
||||
m_currentBrowserSelection = 0;
|
||||
@@ -2612,7 +2612,7 @@ void CMovieBrowser::updateMovieSelection(void)
|
||||
}
|
||||
else if(m_windowFocus == MB_FOCUS_LAST_PLAY)
|
||||
{
|
||||
if(m_vHandlePlayList.size() == 0)
|
||||
if(m_vHandlePlayList.empty())
|
||||
{
|
||||
// There are no elements in the Filebrowser, clear all handles
|
||||
m_currentPlaySelection = 0;
|
||||
@@ -2633,7 +2633,7 @@ void CMovieBrowser::updateMovieSelection(void)
|
||||
}
|
||||
else if(m_windowFocus == MB_FOCUS_LAST_RECORD)
|
||||
{
|
||||
if(m_vHandleRecordList.size() == 0)
|
||||
if(m_vHandleRecordList.empty())
|
||||
{
|
||||
// There are no elements in the Filebrowser, clear all handles
|
||||
m_currentRecordSelection = 0;
|
||||
@@ -2666,7 +2666,7 @@ void CMovieBrowser::updateMovieSelection(void)
|
||||
void CMovieBrowser::updateFilterSelection(void)
|
||||
{
|
||||
//TRACE("[mb]->updateFilterSelection \r\n");
|
||||
if(m_FilterLines.lineArray[0].size() == 0) return;
|
||||
if(m_FilterLines.lineArray[0].empty()) return;
|
||||
|
||||
bool result = true;
|
||||
int selected_line = m_pcFilter->getSelectedLine();
|
||||
@@ -3214,7 +3214,7 @@ bool CMovieBrowser::getMovieInfoItem(MI_MOVIE_INFO& movie_info, MB_INFO_ITEM ite
|
||||
*item_string = movie_info.file.getFileName();
|
||||
break;
|
||||
case MB_INFO_FILEPATH: // = 1,
|
||||
if(m_dirNames.size() > 0)
|
||||
if(!m_dirNames.empty())
|
||||
*item_string = m_dirNames[movie_info.dirItNr];
|
||||
break;
|
||||
case MB_INFO_TITLE: // = 2,
|
||||
@@ -3557,7 +3557,7 @@ CDirMenu::CDirMenu(std::vector<MB_DIR>* dir_list)
|
||||
{
|
||||
std::string tmp = g_settings.network_nfs_local_dir[nfs];
|
||||
int result = -1;
|
||||
if(tmp.size())
|
||||
if(!tmp.empty())
|
||||
result = (*dirList)[i].name.compare( 0,tmp.size(),tmp) ;
|
||||
printf("[CDirMenu] (nfs%d) %s == (mb%d) %s (%d)\n",nfs,g_settings.network_nfs_local_dir[nfs],i,(*dirList)[i].name.c_str(),result);
|
||||
|
||||
|
Reference in New Issue
Block a user