[cstdstring] remove IsEmpty() and replace with empty()
authornight199uk <night199uk@xbmc.org>
Tue, 10 Sep 2013 14:31:25 +0000 (22:31 +0800)
committerJonathan Marshall <jmarshall@xbmc.org>
Wed, 13 Nov 2013 19:26:57 +0000 (08:26 +1300)
239 files changed:
xbmc/Application.cpp
xbmc/Autorun.cpp
xbmc/CueDocument.cpp
xbmc/FileItem.cpp
xbmc/GUIInfoManager.cpp
xbmc/GUILargeTextureManager.cpp
xbmc/GUIPassword.cpp
xbmc/LangInfo.cpp
xbmc/PartyModeManager.cpp
xbmc/PasswordManager.cpp
xbmc/TextureCache.cpp
xbmc/TextureCacheJob.cpp
xbmc/TextureDatabase.cpp
xbmc/ThumbLoader.cpp
xbmc/URL.cpp
xbmc/Util.cpp
xbmc/XBDateTime.cpp
xbmc/addons/Addon.cpp
xbmc/addons/AddonDatabase.cpp
xbmc/addons/AddonDll.h
xbmc/addons/AddonInstaller.cpp
xbmc/addons/AddonManager.cpp
xbmc/addons/AddonVersion.cpp
xbmc/addons/GUIDialogAddonSettings.cpp
xbmc/addons/GUIWindowAddonBrowser.cpp
xbmc/addons/PluginSource.cpp
xbmc/addons/Repository.cpp
xbmc/addons/Scraper.cpp
xbmc/addons/Skin.cpp
xbmc/cdrip/CDDARipJob.cpp
xbmc/cdrip/CDDARipper.cpp
xbmc/cores/DllLoader/exports/emu_msvcrt.cpp
xbmc/cores/ExternalPlayer/ExternalPlayer.cpp
xbmc/cores/dvdplayer/DVDCodecs/Overlay/DVDOverlayCodecTX3G.cpp
xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp
xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxFFmpeg.cpp
xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreamHTSP.cpp
xbmc/cores/dvdplayer/DVDSubtitles/DVDSubtitleParserSami.cpp
xbmc/cores/dvdplayer/DVDSubtitles/DVDSubtitleTagMicroDVD.cpp
xbmc/cores/dvdplayer/DVDSubtitles/DVDSubtitleTagSami.cpp
xbmc/cores/dvdplayer/Edl.cpp
xbmc/cores/omxplayer/OMXPlayer.cpp
xbmc/cores/playercorefactory/PlayerSelectionRule.cpp
xbmc/dbwrappers/Database.cpp
xbmc/dbwrappers/DatabaseQuery.cpp
xbmc/dialogs/GUIDialogCache.cpp
xbmc/dialogs/GUIDialogContextMenu.cpp
xbmc/dialogs/GUIDialogFileBrowser.cpp
xbmc/dialogs/GUIDialogGamepad.cpp
xbmc/dialogs/GUIDialogKaiToast.cpp
xbmc/dialogs/GUIDialogKeyboardGeneric.cpp
xbmc/dialogs/GUIDialogMediaSource.cpp
xbmc/dialogs/GUIDialogNumeric.cpp
xbmc/dialogs/GUIDialogPlayEject.cpp
xbmc/dialogs/GUIDialogSmartPlaylistEditor.cpp
xbmc/epg/Epg.cpp
xbmc/epg/EpgDatabase.cpp
xbmc/epg/EpgSearchFilter.cpp
xbmc/filesystem/AFPDirectory.cpp
xbmc/filesystem/AFPFile.cpp
xbmc/filesystem/APKFile.cpp
xbmc/filesystem/AddonsDirectory.cpp
xbmc/filesystem/CurlFile.cpp
xbmc/filesystem/DAVDirectory.cpp
xbmc/filesystem/FTPDirectory.cpp
xbmc/filesystem/FavouritesDirectory.cpp
xbmc/filesystem/File.cpp
xbmc/filesystem/FileFactory.cpp
xbmc/filesystem/HDHomeRunDirectory.cpp
xbmc/filesystem/HTSPDirectory.cpp
xbmc/filesystem/IDirectory.cpp
xbmc/filesystem/ImageFile.cpp
xbmc/filesystem/LibraryDirectory.cpp
xbmc/filesystem/MusicDatabaseDirectory.cpp
xbmc/filesystem/MusicDatabaseDirectory/DirectoryNode.cpp
xbmc/filesystem/MusicDatabaseFile.cpp
xbmc/filesystem/MusicSearchDirectory.cpp
xbmc/filesystem/MythDirectory.cpp
xbmc/filesystem/MythSession.cpp
xbmc/filesystem/PVRFile.cpp
xbmc/filesystem/PipesManager.cpp
xbmc/filesystem/PluginDirectory.cpp
xbmc/filesystem/RSSDirectory.cpp
xbmc/filesystem/RarManager.cpp
xbmc/filesystem/SMBDirectory.cpp
xbmc/filesystem/ShoutcastFile.cpp
xbmc/filesystem/SmartPlaylistDirectory.cpp
xbmc/filesystem/SourcesDirectory.cpp
xbmc/filesystem/SpecialProtocol.cpp
xbmc/filesystem/TuxBoxDirectory.cpp
xbmc/filesystem/UPnPDirectory.cpp
xbmc/filesystem/VTPDirectory.cpp
xbmc/filesystem/VideoDatabaseDirectory.cpp
xbmc/filesystem/VideoDatabaseDirectory/DirectoryNode.cpp
xbmc/filesystem/VirtualDirectory.cpp
xbmc/filesystem/ZipDirectory.cpp
xbmc/guilib/D3DResource.cpp
xbmc/guilib/GUIAction.cpp
xbmc/guilib/GUIAudioManager.cpp
xbmc/guilib/GUIBorderedImage.cpp
xbmc/guilib/GUIButtonControl.cpp
xbmc/guilib/GUIControlFactory.cpp
xbmc/guilib/GUIControlProfiler.cpp
xbmc/guilib/GUIEditControl.cpp
xbmc/guilib/GUIFadeLabelControl.cpp
xbmc/guilib/GUIFontManager.cpp
xbmc/guilib/GUIImage.cpp
xbmc/guilib/GUIInfoTypes.cpp
xbmc/guilib/GUIKeyboardFactory.cpp
xbmc/guilib/GUILabelControl.cpp
xbmc/guilib/GUIListItem.cpp
xbmc/guilib/GUIMultiImage.cpp
xbmc/guilib/GUIMultiSelectText.cpp
xbmc/guilib/GUIProgressControl.cpp
xbmc/guilib/GUISliderControl.cpp
xbmc/guilib/GUIStaticItem.cpp
xbmc/guilib/GUITextLayout.cpp
xbmc/guilib/GUITexture.cpp
xbmc/guilib/GUIWindowManager.cpp
xbmc/guilib/LocalizeStrings.cpp
xbmc/guilib/StereoscopicsManager.cpp
xbmc/guilib/TextureBundleXBT.cpp
xbmc/guilib/TextureBundleXPR.cpp
xbmc/guilib/TextureManager.cpp
xbmc/input/ButtonTranslator.cpp
xbmc/input/windows/IrssMessage.cpp
xbmc/interfaces/AnnouncementManager.cpp
xbmc/interfaces/Builtins.cpp
xbmc/interfaces/info/InfoBool.cpp
xbmc/interfaces/json-rpc/FileItemHandler.cpp
xbmc/interfaces/legacy/PlayList.cpp
xbmc/interfaces/python/XBPython.cpp
xbmc/music/Album.cpp
xbmc/music/Artist.h
xbmc/music/GUIViewStateMusic.cpp
xbmc/music/MusicDatabase.cpp
xbmc/music/MusicInfoLoader.cpp
xbmc/music/MusicThumbLoader.cpp
xbmc/music/Song.cpp
xbmc/music/dialogs/GUIDialogMusicInfo.cpp
xbmc/music/infoscanner/MusicInfoScanner.cpp
xbmc/music/karaoke/karaokelyricstext.cpp
xbmc/music/karaoke/karaokelyricstextkar.cpp
xbmc/music/karaoke/karaokewindowbackground.cpp
xbmc/music/tags/MusicInfoTagLoaderCDDA.cpp
xbmc/music/tags/MusicInfoTagLoaderFactory.cpp
xbmc/music/tags/MusicInfoTagLoaderMidi.cpp
xbmc/music/tags/TagLoaderTagLib.cpp
xbmc/music/windows/GUIWindowMusicBase.cpp
xbmc/music/windows/GUIWindowMusicNav.cpp
xbmc/music/windows/GUIWindowMusicPlaylist.cpp
xbmc/music/windows/GUIWindowMusicPlaylistEditor.cpp
xbmc/music/windows/GUIWindowMusicSongs.cpp
xbmc/network/AirPlayServer.cpp
xbmc/network/DNSNameCache.cpp
xbmc/network/GUIDialogNetworkSetup.cpp
xbmc/network/WakeOnAccess.cpp
xbmc/network/cddb.cpp
xbmc/network/linux/NetworkLinux.cpp
xbmc/network/upnp/UPnP.cpp
xbmc/network/upnp/UPnPInternal.cpp
xbmc/network/upnp/UPnPServer.cpp
xbmc/peripherals/Peripherals.cpp
xbmc/peripherals/bus/linux/PeripheralBusUSBLibUdev.cpp
xbmc/peripherals/devices/Peripheral.cpp
xbmc/peripherals/devices/PeripheralCecAdapter.cpp
xbmc/peripherals/devices/PeripheralDisk.cpp
xbmc/peripherals/devices/PeripheralHID.cpp
xbmc/peripherals/devices/PeripheralNIC.cpp
xbmc/peripherals/devices/PeripheralNyxboard.cpp
xbmc/pictures/GUIDialogPictureInfo.cpp
xbmc/pictures/GUIWindowPictures.cpp
xbmc/pictures/GUIWindowSlideShow.cpp
xbmc/pictures/PictureInfoTag.cpp
xbmc/pictures/PictureThumbLoader.cpp
xbmc/playlists/PlayListPLS.cpp
xbmc/playlists/PlayListXML.cpp
xbmc/playlists/SmartPlayList.cpp
xbmc/profiles/Profile.cpp
xbmc/profiles/dialogs/GUIDialogLockSettings.cpp
xbmc/profiles/dialogs/GUIDialogProfileSettings.cpp
xbmc/profiles/windows/GUIWindowSettingsProfile.cpp
xbmc/programs/GUIWindowPrograms.cpp
xbmc/pvr/PVRDatabase.cpp
xbmc/pvr/PVRGUIInfo.cpp
xbmc/pvr/PVRManager.cpp
xbmc/pvr/addons/PVRClient.cpp
xbmc/pvr/addons/PVRClients.cpp
xbmc/pvr/channels/PVRChannel.cpp
xbmc/pvr/channels/PVRChannelGroup.cpp
xbmc/pvr/channels/PVRChannelGroups.cpp
xbmc/pvr/dialogs/GUIDialogPVRChannelManager.cpp
xbmc/pvr/dialogs/GUIDialogPVRTimerSettings.cpp
xbmc/pvr/recordings/PVRRecording.cpp
xbmc/pvr/recordings/PVRRecordings.cpp
xbmc/pvr/timers/PVRTimerInfoTag.cpp
xbmc/pvr/windows/GUIWindowPVRChannels.cpp
xbmc/pvr/windows/GUIWindowPVRCommon.cpp
xbmc/pvr/windows/GUIWindowPVRRecordings.cpp
xbmc/settings/AdvancedSettings.cpp
xbmc/storage/MediaManager.cpp
xbmc/storage/windows/Win32StorageProvider.cpp
xbmc/test/TestUtils.cpp
xbmc/utils/AlarmClock.cpp
xbmc/utils/CPUInfo.cpp
xbmc/utils/EdenVideoArtUpdater.cpp
xbmc/utils/Fanart.cpp
xbmc/utils/FileOperationJob.cpp
xbmc/utils/LabelFormatter.cpp
xbmc/utils/Mime.cpp
xbmc/utils/RssReader.cpp
xbmc/utils/ScraperUrl.cpp
xbmc/utils/Screenshot.cpp
xbmc/utils/Splash.cpp
xbmc/utils/StdString.h
xbmc/utils/StringUtils.cpp
xbmc/utils/SystemInfo.cpp
xbmc/utils/TextSearch.cpp
xbmc/utils/TuxBoxUtil.cpp
xbmc/utils/URIUtils.cpp
xbmc/utils/Weather.cpp
xbmc/utils/XMLUtils.cpp
xbmc/utils/md5.cpp
xbmc/video/VideoDatabase.cpp
xbmc/video/VideoInfoScanner.cpp
xbmc/video/VideoInfoTag.cpp
xbmc/video/VideoInfoTag.h
xbmc/video/VideoThumbLoader.cpp
xbmc/video/dialogs/GUIDialogVideoInfo.cpp
xbmc/video/windows/GUIWindowVideoBase.cpp
xbmc/video/windows/GUIWindowVideoNav.cpp
xbmc/view/GUIViewControl.cpp
xbmc/view/GUIViewState.cpp
xbmc/view/ViewDatabase.cpp
xbmc/win32/WIN32Util.cpp
xbmc/windows/GUIMediaWindow.cpp
xbmc/windows/GUIWindowDebugInfo.cpp
xbmc/windows/GUIWindowFileManager.cpp
xbmc/windows/GUIWindowLoginScreen.cpp

index fe9b8a4..655c797 100644 (file)
@@ -1034,7 +1034,7 @@ bool CApplication::InitDirectoriesLinux()
   CUtil::GetHomePath(xbmcBinPath, "XBMC_BIN_HOME");
   xbmcPath = getenv("XBMC_HOME");
 
-  if (xbmcPath.IsEmpty())
+  if (xbmcPath.empty())
   {
     xbmcPath = xbmcBinPath;
     /* Check if xbmc binaries and arch independent data files are being kept in
@@ -1402,7 +1402,7 @@ bool CApplication::Initialize()
 
     if (CSettings::Get().GetBool("masterlock.startuplock") &&
         CProfilesManager::Get().GetMasterProfile().getLockMode() != LOCK_MODE_EVERYONE &&
-       !CProfilesManager::Get().GetMasterProfile().getLockCode().IsEmpty())
+       !CProfilesManager::Get().GetMasterProfile().getLockCode().empty())
     {
        g_passwordManager.CheckStartUpLock();
     }
@@ -2127,7 +2127,7 @@ float CApplication::GetDimScreenSaverLevel() const
        !m_screenSaver->ID().empty()))
     return 0;
 
-  if (!m_screenSaver->GetSetting("level").IsEmpty())
+  if (!m_screenSaver->GetSetting("level").empty())
     return 100.0f - (float)atof(m_screenSaver->GetSetting("level"));
   return 100.0f;
 }
@@ -4519,7 +4519,7 @@ bool CApplication::WakeUpScreenSaver(bool bPowerOffKeyPressed /* = false */)
 
     if (m_screenSaver->ID() == "screensaver.xbmc.builtin.dim" || m_screenSaver->ID() == "screensaver.xbmc.builtin.black" || m_screenSaver->ID().empty())
       return true;
-    else if (!m_screenSaver->ID().IsEmpty())
+    else if (!m_screenSaver->ID().empty())
     { // we're in screensaver window
       if (g_windowManager.GetActiveWindow() == WINDOW_SCREENSAVER
           || g_windowManager.GetActiveWindow() == WINDOW_VISUALISATION)
@@ -4628,7 +4628,7 @@ void CApplication::ActivateScreenSaver(bool forceType /*= false */)
     return;
   else if (m_screenSaver->ID() == "screensaver.xbmc.builtin.black")
     return;
-  else if (!m_screenSaver->ID().IsEmpty())
+  else if (!m_screenSaver->ID().empty())
     g_windowManager.ActivateWindow(WINDOW_SCREENSAVER);
 }
 
@@ -5703,7 +5703,7 @@ void CApplication::SaveCurrentFileSettings()
 bool CApplication::AlwaysProcess(const CAction& action)
 {
   // check if this button is mapped to a built-in function
-  if (!action.GetName().IsEmpty())
+  if (!action.GetName().empty())
   {
     CStdString builtInFunction;
     vector<CStdString> params;
index 22d7930..8ecf566 100644 (file)
@@ -95,17 +95,17 @@ bool CAutorun::PlayDisc(const CStdString& path, bool bypassSettings, bool startF
   if (pInfo == NULL)
     return false;
 
-  if (mediaPath.IsEmpty() && pInfo->IsAudio(1))
+  if (mediaPath.empty() && pInfo->IsAudio(1))
     mediaPath = "cdda://local/";
 
-  if (mediaPath.IsEmpty() && (pInfo->IsISOUDF(1) || pInfo->IsISOHFS(1) || pInfo->IsIso9660(1) || pInfo->IsIso9660Interactive(1)))
+  if (mediaPath.empty() && (pInfo->IsISOUDF(1) || pInfo->IsISOHFS(1) || pInfo->IsIso9660(1) || pInfo->IsIso9660Interactive(1)))
     mediaPath = "iso9660://";
 
-  if (mediaPath.IsEmpty())
+  if (mediaPath.empty())
     mediaPath = path;
 
 #ifdef TARGET_WINDOWS
-  if (mediaPath.IsEmpty() || mediaPath.CompareNoCase("iso9660://") == 0)
+  if (mediaPath.empty() || mediaPath.CompareNoCase("iso9660://") == 0)
     mediaPath = g_mediaManager.TranslateDevicePath("");
 #endif
 
@@ -179,7 +179,7 @@ bool CAutorun::RunDisc(IDirectory* pDir, const CStdString& strDrive, int& nAdded
           item.SetLabel(g_mediaManager.GetDiskLabel(strDrive));
           item.GetVideoInfoTag()->m_strFileNameAndPath = g_mediaManager.GetDiskUniqueId(strDrive);
 
-          if (!startFromBeginning && !item.GetVideoInfoTag()->m_strFileNameAndPath.IsEmpty())
+          if (!startFromBeginning && !item.GetVideoInfoTag()->m_strFileNameAndPath.empty())
             item.m_lStartOffset = STARTOFFSET_RESUME;
 
           g_application.PlayFile(item, false);
@@ -196,7 +196,7 @@ bool CAutorun::RunDisc(IDirectory* pDir, const CStdString& strDrive, int& nAdded
           item.SetLabel(g_mediaManager.GetDiskLabel(strDrive));
           item.GetVideoInfoTag()->m_strFileNameAndPath = g_mediaManager.GetDiskUniqueId(strDrive);
 
-          if (!startFromBeginning && !item.GetVideoInfoTag()->m_strFileNameAndPath.IsEmpty())
+          if (!startFromBeginning && !item.GetVideoInfoTag()->m_strFileNameAndPath.empty())
             item.m_lStartOffset = STARTOFFSET_RESUME;
 
           g_application.PlayFile(item, false);
@@ -283,7 +283,7 @@ bool CAutorun::RunDisc(IDirectory* pDir, const CStdString& strDrive, int& nAdded
             item.SetLabel(g_mediaManager.GetDiskLabel(strDrive));
             item.GetVideoInfoTag()->m_strFileNameAndPath = g_mediaManager.GetDiskUniqueId(strDrive);
 
-            if (!startFromBeginning && !item.GetVideoInfoTag()->m_strFileNameAndPath.IsEmpty())
+            if (!startFromBeginning && !item.GetVideoInfoTag()->m_strFileNameAndPath.empty())
             item.m_lStartOffset = STARTOFFSET_RESUME;
 
             // get playername
@@ -318,7 +318,7 @@ bool CAutorun::RunDisc(IDirectory* pDir, const CStdString& strDrive, int& nAdded
           strExt = ".mpg";
 
         // If a file format was extracted we are sure this is a VCD. Autoplay if settings indicate we should.
-        if (!strExt.IsEmpty() && bAllowVideo
+        if (!strExt.empty() && bAllowVideo
              && (bypassSettings || CSettings::Get().GetBool("dvds.autorun")))
         {
           CFileItemList items;
@@ -486,7 +486,7 @@ bool CAutorun::PlayDiscAskResume(const CStdString& path)
 bool CAutorun::CanResumePlayDVD(const CStdString& path)
 {
   CStdString strUniqueId = g_mediaManager.GetDiskUniqueId(path);
-  if (!strUniqueId.IsEmpty())
+  if (!strUniqueId.empty())
   {
     CVideoDatabase dbs;
     dbs.Open();
index 193139f..80e0511 100644 (file)
@@ -133,7 +133,7 @@ bool CCueDocument::Parse(const CStdString &strFile)
         // lets manage tracks titles without quotes
         CStdString titleNoQuote = strLine.Mid(5);
         titleNoQuote.TrimLeft();
-        if (!titleNoQuote.IsEmpty())
+        if (!titleNoQuote.empty())
         {
           g_charsetConverter.unknownToUTF8(titleNoQuote);
           m_Track[m_iTotalTracks].strTitle = titleNoQuote;
@@ -194,7 +194,7 @@ bool CCueDocument::Parse(const CStdString &strFile)
       {
         CStdString genreNoQuote = strLine.Mid(9);
         genreNoQuote.TrimLeft();
-        if (!genreNoQuote.IsEmpty())
+        if (!genreNoQuote.empty())
         {
           g_charsetConverter.unknownToUTF8(genreNoQuote);
           m_strGenre = genreNoQuote;
@@ -326,7 +326,7 @@ int CCueDocument::ExtractTimeFromIndex(const CStdString &index)
   // Get rid of the index number and any whitespace
   CStdString numberTime = index.Mid(5);
   numberTime.TrimLeft();
-  while (!numberTime.IsEmpty())
+  while (!numberTime.empty())
   {
     if (!isdigit(numberTime[0]))
       break;
@@ -354,7 +354,7 @@ int CCueDocument::ExtractNumericInfo(const CStdString &info)
 {
   CStdString number(info);
   number.TrimLeft();
-  if (number.IsEmpty() || !isdigit(number[0]))
+  if (number.empty() || !isdigit(number[0]))
     return -1;
   return atoi(number.c_str());
 }
index 317aa0b..85d43e7 100644 (file)
@@ -149,7 +149,7 @@ CFileItem::CFileItem(const CEpgInfoTag& tag)
   m_strLabel2 = tag.Plot();
   m_dateTime = tag.StartAsLocalTime();
 
-  if (!tag.Icon().IsEmpty())
+  if (!tag.Icon().empty())
     SetIconImage(tag.Icon());
 
   FillInMimeType(false);
@@ -196,7 +196,7 @@ CFileItem::CFileItem(const CPVRChannel& channel)
     }
   }
 
-  if (!channel.IconPath().IsEmpty())
+  if (!channel.IconPath().empty())
     SetIconImage(channel.IconPath());
 
   SetProperty("channelid", channel.ChannelID());
@@ -246,7 +246,7 @@ CFileItem::CFileItem(const CPVRTimerInfoTag& timer)
   m_strLabel2 = timer.Summary();
   m_dateTime = timer.StartAsLocalTime();
 
-  if (!timer.ChannelIcon().IsEmpty())
+  if (!timer.ChannelIcon().empty())
     SetIconImage(timer.ChannelIcon());
 
   FillInMimeType(false);
@@ -356,7 +356,7 @@ CFileItem::CFileItem(const CStdString& strPath, bool bIsFolder)
   m_strPath = strPath;
   m_bIsFolder = bIsFolder;
   // tuxbox urls cannot have a / at end
-  if (m_bIsFolder && !m_strPath.IsEmpty() && !IsFileFolder() && !URIUtils::IsTuxBox(m_strPath))
+  if (m_bIsFolder && !m_strPath.empty() && !IsFileFolder() && !URIUtils::IsTuxBox(m_strPath))
     URIUtils::AddSlashAtEnd(m_strPath);
   FillInMimeType(false);
 }
@@ -377,7 +377,7 @@ CFileItem::CFileItem(const CMediaSource& share)
   if (!IsRSS()) // no slash at end for rss feeds
     URIUtils::AddSlashAtEnd(m_strPath);
   CStdString label = share.strName;
-  if (!share.strStatus.IsEmpty())
+  if (!share.strStatus.empty())
     label = StringUtils::Format("%s (%s)", share.strName.c_str(), share.strStatus.c_str());
   SetLabel(label);
   m_iLockMode = share.m_iLockMode;
@@ -755,7 +755,7 @@ void CFileItem::ToSortable(SortItem &sortable, const Fields &fields) const
 
 bool CFileItem::Exists(bool bUseCache /* = true */) const
 {
-  if (m_strPath.IsEmpty()
+  if (m_strPath.empty()
    || m_strPath.Equals("add")
    || IsInternetStream()
    || IsParentFolder()
@@ -1194,7 +1194,7 @@ bool CFileItem::IsVideoDb() const
 
 bool CFileItem::IsVirtualDirectoryRoot() const
 {
-  return (m_bIsFolder && m_strPath.IsEmpty());
+  return (m_bIsFolder && m_strPath.empty());
 }
 
 bool CFileItem::IsRemovable() const
@@ -1225,7 +1225,7 @@ void CFileItem::FillInDefaultIcon()
   //   for .. folders the default picture for parent folder
   //   for other folders the defaultFolder.png
 
-  if (GetIconImage().IsEmpty())
+  if (GetIconImage().empty())
   {
     if (!m_bIsFolder)
     {
@@ -1375,7 +1375,7 @@ bool CFileItem::IsParentFolder() const
 
 void CFileItem::FillInMimeType(bool lookup /*= true*/)
 {
-  if (m_mimetype.IsEmpty())
+  if (m_mimetype.empty())
   {
     if( m_bIsFolder )
       m_mimetype = "x-directory/normal";
@@ -1408,7 +1408,7 @@ void CFileItem::FillInMimeType(bool lookup /*= true*/)
       m_mimetype = CMime::GetMimeType(*this);
 
     // if it's still empty set to an unknown type
-    if (m_mimetype.IsEmpty())
+    if (m_mimetype.empty())
       m_mimetype = "application/octet-stream";
   }
 
@@ -1481,13 +1481,13 @@ void CFileItem::UpdateInfo(const CFileItem &item, bool replaceLabels /*=true*/)
   if (item.HasPictureInfoTag())
     *GetPictureInfoTag() = *item.GetPictureInfoTag();
 
-  if (replaceLabels && !item.GetLabel().IsEmpty())
+  if (replaceLabels && !item.GetLabel().empty())
     SetLabel(item.GetLabel());
-  if (replaceLabels && !item.GetLabel2().IsEmpty())
+  if (replaceLabels && !item.GetLabel2().empty())
     SetLabel2(item.GetLabel2());
   if (!item.GetArt("thumb").empty())
     SetArt("thumb", item.GetArt("thumb"));
-  if (!item.GetIconImage().IsEmpty())
+  if (!item.GetIconImage().empty())
     SetIconImage(item.GetIconImage());
   AppendProperties(item);
 }
@@ -1496,7 +1496,7 @@ void CFileItem::SetFromVideoInfoTag(const CVideoInfoTag &video)
 {
   if (!video.m_strTitle.empty())
     SetLabel(video.m_strTitle);
-  if (video.m_strFileNameAndPath.IsEmpty())
+  if (video.m_strFileNameAndPath.empty())
   {
     m_strPath = video.m_strPath;
     URIUtils::AddSlashAtEnd(m_strPath);
@@ -2373,7 +2373,7 @@ void CFileItemList::StackFolders()
               dvdPath = path;
           }
 #ifdef HAVE_LIBBLURAY
-          if (dvdPath.IsEmpty())
+          if (dvdPath.empty())
           {
             path = URIUtils::AddFileToFolder(item->GetPath(), "index.bdmv");
             if (CFile::Exists(path))
@@ -2388,7 +2388,7 @@ void CFileItemList::StackFolders()
             }
           }
 #endif
-          if (!dvdPath.IsEmpty())
+          if (!dvdPath.empty())
           {
             // NOTE: should this be done for the CD# folders too?
             item->m_bIsFolder = false;
@@ -2668,7 +2668,7 @@ bool CFileItemList::AlwaysCache() const
 
 CStdString CFileItem::GetUserMusicThumb(bool alwaysCheckRemote /* = false */, bool fallbackToFolder /* = false */) const
 {
-  if (m_strPath.IsEmpty()
+  if (m_strPath.empty()
    || StringUtils::StartsWithNoCase(m_strPath, "newsmartplaylist://")
    || StringUtils::StartsWithNoCase(m_strPath, "newplaylist://")
    || m_bIsShareOrDrive
@@ -2746,7 +2746,7 @@ CStdString CFileItem::GetTBNFile() const
   if (m_bIsFolder && !IsFileFolder())
     URIUtils::RemoveSlashAtEnd(strFile);
 
-  if (!strFile.IsEmpty())
+  if (!strFile.empty())
   {
     if (m_bIsFolder && !IsFileFolder())
       thumbFile = strFile + ".tbn"; // folder, so just add ".tbn"
@@ -2873,7 +2873,7 @@ CStdString CFileItem::GetMovieName(bool bUseFolderNames /* = false */) const
   else if (CUtil::IsTVRecording(m_strPath))
   {
     CStdString title = CPVRRecording::GetTitleFromURL(m_strPath);
-    if (!title.IsEmpty())
+    if (!title.empty())
       return title;
   }
 
@@ -2955,12 +2955,12 @@ CStdString CFileItem::GetLocalFanart() const
    || IsAddonsPath()
    || IsDVD()
    || (URIUtils::IsFTP(strFile) && !g_advancedSettings.m_bFTPThumbs)
-   || m_strPath.IsEmpty())
+   || m_strPath.empty())
     return "";
 
   CStdString strDir = URIUtils::GetDirectory(strFile);
 
-  if (strDir.IsEmpty())
+  if (strDir.empty())
     return "";
 
   CFileItemList items;
@@ -2978,7 +2978,7 @@ CStdString CFileItem::GetLocalFanart() const
   strFile = URIUtils::ReplaceExtension(strFile, "-fanart");
   fanarts.insert(m_bIsFolder ? fanarts.end() : fanarts.begin(), URIUtils::GetFileName(strFile));
 
-  if (!strFile2.IsEmpty())
+  if (!strFile2.empty())
     fanarts.insert(m_bIsFolder ? fanarts.end() : fanarts.begin(), URIUtils::GetFileName(strFile2));
 
   for (unsigned int i = 0; i < fanarts.size(); ++i)
@@ -3281,7 +3281,7 @@ CStdString CFileItem::FindTrailer() const
 int CFileItem::GetVideoContentType() const
 {
   VIDEODB_CONTENT_TYPE type = VIDEODB_CONTENT_MOVIES;
-  if (HasVideoInfoTag() && !GetVideoInfoTag()->m_strShowTitle.IsEmpty()) // tvshow
+  if (HasVideoInfoTag() && !GetVideoInfoTag()->m_strShowTitle.empty()) // tvshow
     type = VIDEODB_CONTENT_TVSHOWS;
   if (HasVideoInfoTag() && GetVideoInfoTag()->m_iSeason > -1 && !m_bIsFolder) // episode
     return VIDEODB_CONTENT_EPISODES;
index 2a3fccf..627bf6e 100644 (file)
@@ -771,7 +771,7 @@ void CGUIInfoManager::SplitInfoString(const CStdString &infoString, vector<Prope
     }
     else if (infoString[i] == '.' && !parentheses)
     {
-      if (!property.IsEmpty()) // add our property and parameters
+      if (!property.empty()) // add our property and parameters
         info.push_back(Property(property.ToLower(), param));
       property.clear();
       param.clear();
@@ -784,7 +784,7 @@ void CGUIInfoManager::SplitInfoString(const CStdString &infoString, vector<Prope
   }
   if (parentheses)
     CLog::Log(LOGERROR, "unmatched parentheses in %s", infoString.c_str());
-  if (!property.IsEmpty())
+  if (!property.empty())
     info.push_back(Property(property.ToLower(), param));
 }
 
@@ -1138,7 +1138,7 @@ int CGUIInfoManager::TranslateSingleString(const CStdString &strCondition)
     {
       if (prop.name == "property" && prop.num_params() == 1)
       { // TODO: this doesn't support foo.xml
-        int winID = cat.param().IsEmpty() ? 0 : CButtonTranslator::TranslateWindow(cat.param());
+        int winID = cat.param().empty() ? 0 : CButtonTranslator::TranslateWindow(cat.param());
         if (winID != WINDOW_INVALID)
           return AddMultiInfo(GUIInfo(WINDOW_PROPERTY, winID, ConditionalStringParameter(prop.param())));
       }
@@ -1148,7 +1148,7 @@ int CGUIInfoManager::TranslateSingleString(const CStdString &strCondition)
         { // TODO: The parameter for these should really be on the first not the second property
           if (prop.param().Find("xml") >= 0)
             return AddMultiInfo(GUIInfo(window_bools[i].val, 0, ConditionalStringParameter(prop.param())));
-          int winID = prop.param().IsEmpty() ? 0 : CButtonTranslator::TranslateWindow(prop.param());
+          int winID = prop.param().empty() ? 0 : CButtonTranslator::TranslateWindow(prop.param());
           if (winID != WINDOW_INVALID)
             return AddMultiInfo(GUIInfo(window_bools[i].val, winID, 0));
           return 0;
@@ -1293,7 +1293,7 @@ int CGUIInfoManager::TranslateMusicPlayerString(const CStdString &info) const
 
 TIME_FORMAT CGUIInfoManager::TranslateTimeFormat(const CStdString &format)
 {
-  if (format.IsEmpty()) return TIME_FORMAT_GUESS;
+  if (format.empty()) return TIME_FORMAT_GUESS;
   else if (format.Equals("hh")) return TIME_FORMAT_HH;
   else if (format.Equals("mm")) return TIME_FORMAT_MM;
   else if (format.Equals("ss")) return TIME_FORMAT_SS;
@@ -1453,7 +1453,7 @@ CStdString CGUIInfoManager::GetLabel(int info, int contextWindow, CStdString *fa
         strLabel = m_currentFile->GetMusicInfoTag()->GetURL();
       else if (m_currentFile->HasVideoInfoTag())
         strLabel = m_currentFile->GetVideoInfoTag()->m_strFileNameAndPath;
-      if (strLabel.IsEmpty())
+      if (strLabel.empty())
         strLabel = m_currentFile->GetPath();
     }
     if (info == PLAYER_PATH)
@@ -1480,22 +1480,22 @@ CStdString CGUIInfoManager::GetLabel(int info, int contextWindow, CStdString *fa
                      StringUtils::EmptyString :
                      g_localizeStrings.Get(19055); // no information available
         }
-        if (m_currentFile->HasPVRRecordingInfoTag() && !m_currentFile->GetPVRRecordingInfoTag()->m_strTitle.IsEmpty())
+        if (m_currentFile->HasPVRRecordingInfoTag() && !m_currentFile->GetPVRRecordingInfoTag()->m_strTitle.empty())
           return m_currentFile->GetPVRRecordingInfoTag()->m_strTitle;
-        if (m_currentFile->HasVideoInfoTag() && !m_currentFile->GetVideoInfoTag()->m_strTitle.IsEmpty())
+        if (m_currentFile->HasVideoInfoTag() && !m_currentFile->GetVideoInfoTag()->m_strTitle.empty())
           return m_currentFile->GetVideoInfoTag()->m_strTitle;
-        if (m_currentFile->HasMusicInfoTag() && !m_currentFile->GetMusicInfoTag()->GetTitle().IsEmpty())
+        if (m_currentFile->HasMusicInfoTag() && !m_currentFile->GetMusicInfoTag()->GetTitle().empty())
           return m_currentFile->GetMusicInfoTag()->GetTitle();
         // don't have the title, so use dvdplayer, label, or drop down to title from path
-        if (!g_application.m_pPlayer->GetPlayingTitle().IsEmpty())
+        if (!g_application.m_pPlayer->GetPlayingTitle().empty())
           return g_application.m_pPlayer->GetPlayingTitle();
-        if (!m_currentFile->GetLabel().IsEmpty())
+        if (!m_currentFile->GetLabel().empty())
           return m_currentFile->GetLabel();
         return CUtil::GetTitleFromPath(m_currentFile->GetPath());
       }
       else
       {
-        if (!g_application.m_pPlayer->GetPlayingTitle().IsEmpty())
+        if (!g_application.m_pPlayer->GetPlayingTitle().empty())
           return g_application.m_pPlayer->GetPlayingTitle();
       }
     }
@@ -2114,7 +2114,7 @@ unsigned int CGUIInfoManager::Register(const CStdString &expression, int context
   condition.TrimLeft(" \t\r\n");
   condition.TrimRight(" \t\r\n");
 
-  if (condition.IsEmpty())
+  if (condition.empty())
     return 0;
 
   CSingleLock lock(m_critInfo);
@@ -2685,9 +2685,9 @@ bool CGUIInfoManager::GetMultiInfoBool(const GUIInfo &info, int contextWindow, c
       case STRING_IS_EMPTY:
         // note: Get*Image() falls back to Get*Label(), so this should cover all of them
         if (item && item->IsFileItem() && info.GetData1() >= LISTITEM_START && info.GetData1() < LISTITEM_END)
-          bReturn = GetItemImage((const CFileItem *)item, info.GetData1()).IsEmpty();
+          bReturn = GetItemImage((const CFileItem *)item, info.GetData1()).empty();
         else
-          bReturn = GetImage(info.GetData1(), contextWindow).IsEmpty();
+          bReturn = GetImage(info.GetData1(), contextWindow).empty();
         break;
       case STRING_COMPARE:
         {
@@ -2893,7 +2893,7 @@ bool CGUIInfoManager::GetMultiInfoBool(const GUIInfo &info, int contextWindow, c
             else if (window->GetID() == WINDOW_DIALOG_VIDEO_INFO)
               content = ((CGUIDialogVideoInfo *)window)->CurrentDirectory().GetContent();
           }
-          if (content.IsEmpty())
+          if (content.empty())
           {
             window = GetWindowWithCondition(contextWindow, WINDOW_CONDITION_IS_MEDIA_WINDOW);
             if (window)
@@ -3313,7 +3313,7 @@ CStdString CGUIInfoManager::GetImage(int info, int contextWindow, CStdString *fa
   else if (info == SYSTEM_PROFILETHUMB)
   {
     CStdString thumb = CProfilesManager::Get().GetCurrentProfile().getThumb();
-    if (thumb.IsEmpty())
+    if (thumb.empty())
       thumb = "unknown-user.png";
     return thumb;
   }
@@ -3339,7 +3339,7 @@ CStdString CGUIInfoManager::GetImage(int info, int contextWindow, CStdString *fa
     if (!g_application.m_pPlayer->IsPlayingVideo()) return "";
     if (fallback)
       *fallback = "DefaultVideoCover.png";
-    if(m_currentMovieThumb.IsEmpty())
+    if(m_currentMovieThumb.empty())
       return m_currentFile->HasArt("thumb") ? m_currentFile->GetArt("thumb") : "DefaultVideoCover.png";
     else return m_currentMovieThumb;
   }
@@ -3433,7 +3433,7 @@ CStdString CGUIInfoManager::GetDuration(TIME_FORMAT format) const
     if (tag.GetDuration() > 0)
       return StringUtils::SecondsToTimeString(tag.GetDuration(), format);
   }
-  if (g_application.m_pPlayer->IsPlayingVideo() && !m_currentMovieDuration.IsEmpty())
+  if (g_application.m_pPlayer->IsPlayingVideo() && !m_currentMovieDuration.empty())
     return m_currentMovieDuration;  // for tuxbox
   unsigned int iTotal = (unsigned int)g_application.GetTotalTime();
   if (iTotal > 0)
@@ -3826,7 +3826,7 @@ CStdString CGUIInfoManager::GetVideoLabel(int item)
         CStdString strRatingAndVotes;
         if (m_currentFile->GetVideoInfoTag()->m_fRating > 0.f)
         {
-          if (m_currentFile->GetVideoInfoTag()->m_strVotes.IsEmpty())
+          if (m_currentFile->GetVideoInfoTag()->m_strVotes.empty())
             strRatingAndVotes = StringUtils::Format("%.1f",
                                                     m_currentFile->GetVideoInfoTag()->m_fRating);
           else
@@ -4027,7 +4027,7 @@ void CGUIInfoManager::SetCurrentSong(CFileItem &item)
   *m_currentFile = item;
 
   m_currentFile->LoadMusicTag();
-  if (m_currentFile->GetMusicInfoTag()->GetTitle().IsEmpty())
+  if (m_currentFile->GetMusicInfoTag()->GetTitle().empty())
   {
     // No title in tag, show filename only
     m_currentFile->GetMusicInfoTag()->SetTitle(CUtil::GetTitleFromPath(m_currentFile->GetPath()));
@@ -4037,7 +4037,7 @@ void CGUIInfoManager::SetCurrentSong(CFileItem &item)
   // find a thumb for this file.
   if (m_currentFile->IsInternetStream())
   {
-    if (!g_application.m_strPlayListFile.IsEmpty())
+    if (!g_application.m_strPlayListFile.empty())
     {
       CLog::Log(LOGDEBUG,"Streaming media detected... using %s to find a thumb", g_application.m_strPlayListFile.c_str());
       CFileItem streamingItem(g_application.m_strPlayListFile,false);
@@ -4096,7 +4096,7 @@ void CGUIInfoManager::SetCurrentMovie(CFileItem &item)
     }
 
     // else its a video
-    if (!g_application.m_strPlayListFile.IsEmpty())
+    if (!g_application.m_strPlayListFile.empty())
     {
       CLog::Log(LOGDEBUG,"Streaming media detected... using %s to find a thumb", g_application.m_strPlayListFile.c_str());
       CFileItem thumbItem(g_application.m_strPlayListFile,false);
@@ -4160,7 +4160,7 @@ CTemperature CGUIInfoManager::GetGPUTemperature()
   int         ret   = 0;
   FILE        *p    = NULL;
 
-  if (cmd.IsEmpty() || !(p = popen(cmd.c_str(), "r")))
+  if (cmd.empty() || !(p = popen(cmd.c_str(), "r")))
     return CTemperature();
 
   ret = fscanf(p, "%d %c", &value, &scale);
@@ -4556,7 +4556,7 @@ CStdString CGUIInfoManager::GetItemLabel(const CFileItem *item, int info, CStdSt
       if (item->HasVideoInfoTag() && item->GetVideoInfoTag()->m_fRating > 0.f) // movie rating
       {
         CStdString strRatingAndVotes;
-        if (item->GetVideoInfoTag()->m_strVotes.IsEmpty())
+        if (item->GetVideoInfoTag()->m_strVotes.empty())
           strRatingAndVotes = StringUtils::Format("%.1f",
                                                   item->GetVideoInfoTag()->m_fRating);
         else
@@ -4624,7 +4624,7 @@ CStdString CGUIInfoManager::GetItemLabel(const CFileItem *item, int info, CStdSt
       return item->GetPVRRecordingInfoTag()->m_strPlot;
     if (item->HasVideoInfoTag())
     {
-      if (!(!item->GetVideoInfoTag()->m_strShowTitle.IsEmpty() && item->GetVideoInfoTag()->m_iSeason == -1)) // dont apply to tvshows
+      if (!(!item->GetVideoInfoTag()->m_strShowTitle.empty() && item->GetVideoInfoTag()->m_iSeason == -1)) // dont apply to tvshows
         if (item->GetVideoInfoTag()->m_playCount == 0 && !CSettings::Get().GetBool("videolibrary.showunwatchedplots"))
           return g_localizeStrings.Get(20370);
 
@@ -4679,7 +4679,7 @@ CStdString CGUIInfoManager::GetItemLabel(const CFileItem *item, int info, CStdSt
   case LISTITEM_ICON:
     {
       CStdString strThumb = item->GetArt("thumb");
-      if (strThumb.IsEmpty())
+      if (strThumb.empty())
         strThumb = item->GetIconImage();
       if (fallback)
         *fallback = item->GetIconImage();
@@ -5067,9 +5067,9 @@ bool CGUIInfoManager::GetItemBool(const CGUIListItem *item, int condition) const
   {
     if (item->HasProperty("playlistposition"))
       return (int)item->GetProperty("playlisttype").asInteger() == g_playlistPlayer.GetCurrentPlaylist() && (int)item->GetProperty("playlistposition").asInteger() == g_playlistPlayer.GetCurrentSong();
-    else if (item->IsFileItem() && !m_currentFile->GetPath().IsEmpty())
+    else if (item->IsFileItem() && !m_currentFile->GetPath().empty())
     {
-      if (!g_application.m_strPlayListFile.IsEmpty())
+      if (!g_application.m_strPlayListFile.empty())
       {
         //playlist file that is currently playing or the playlistitem that is currently playing.
         return g_application.m_strPlayListFile.Equals(((const CFileItem *)item)->GetPath()) || m_currentFile->IsSamePath((const CFileItem *)item);
@@ -5175,8 +5175,8 @@ void CGUIInfoManager::UpdateFromTuxBox()
     m_currentFile->GetVideoInfoTag()->m_strTitle = g_tuxbox.vVideoSubChannel.current_name;
 
   // Set m_currentMovieDuration
-  if(!g_tuxbox.sCurSrvData.current_event_duration.IsEmpty() &&
-    !g_tuxbox.sCurSrvData.next_event_description.IsEmpty() &&
+  if(!g_tuxbox.sCurSrvData.current_event_duration.empty() &&
+    !g_tuxbox.sCurSrvData.next_event_description.empty() &&
     !g_tuxbox.sCurSrvData.current_event_duration.Equals("-") &&
     !g_tuxbox.sCurSrvData.next_event_description.Equals("-"))
   {
@@ -5192,8 +5192,8 @@ void CGUIInfoManager::UpdateFromTuxBox()
   }
 
   //Set strVideoGenre
-  if (!g_tuxbox.sCurSrvData.current_event_description.IsEmpty() &&
-    !g_tuxbox.sCurSrvData.next_event_description.IsEmpty() &&
+  if (!g_tuxbox.sCurSrvData.current_event_description.empty() &&
+    !g_tuxbox.sCurSrvData.next_event_description.empty() &&
     !g_tuxbox.sCurSrvData.current_event_description.Equals("-") &&
     !g_tuxbox.sCurSrvData.next_event_description.Equals("-"))
   {
@@ -5207,7 +5207,7 @@ void CGUIInfoManager::UpdateFromTuxBox()
 
   //Set m_currentMovie.m_director
   if (!g_tuxbox.sCurSrvData.current_event_details.Equals("-") &&
-    !g_tuxbox.sCurSrvData.current_event_details.IsEmpty())
+    !g_tuxbox.sCurSrvData.current_event_details.empty())
   {
     m_currentFile->GetVideoInfoTag()->m_director = StringUtils::Split(g_tuxbox.sCurSrvData.current_event_details, g_advancedSettings.m_videoItemSeparator);
   }
index 45fa8aa..ba1e004 100644 (file)
@@ -55,14 +55,14 @@ bool CImageLoader::DoWork()
   else
     loadPath = texturePath;
 
-  if (m_use_cache && loadPath.IsEmpty())
+  if (m_use_cache && loadPath.empty())
   {
     // not in our texture cache, so try and load directly and then cache the result
     loadPath = CTextureCache::Get().CacheImage(texturePath, &m_texture);
     if (m_texture)
       return true; // we're done
   }
-  if (!m_use_cache || !loadPath.IsEmpty())
+  if (!m_use_cache || !loadPath.empty())
   {
     // direct route - load the image
     unsigned int start = XbmcThreads::SystemClockMillis();
index 75b62d1..290f729 100644 (file)
@@ -202,7 +202,7 @@ bool CGUIPassword::IsProfileLockUnlocked(int iProfile, bool& bCanceled, bool pro
     if (!prompt)
       return (profile->getLockMode() == LOCK_MODE_EVERYONE);
 
-    if (profile->getDate().IsEmpty() &&
+    if (profile->getDate().empty() &&
        (CProfilesManager::Get().GetMasterProfile().getLockMode() == LOCK_MODE_EVERYONE ||
         profile->getLockMode() == LOCK_MODE_EVERYONE))
     {
index 5e2f2aa..ed3e6a0 100644 (file)
@@ -319,7 +319,7 @@ bool CLangInfo::Load(const std::string& strFileName, bool onlyCheckLanguage /*=
     {
       CRegion region(m_defaultRegion);
       region.m_strName=pRegion->Attribute("name");
-      if (region.m_strName.IsEmpty())
+      if (region.m_strName.empty())
         region.m_strName="N/A";
 
       if (pRegion->Attribute("locale"))
@@ -399,7 +399,7 @@ void CLangInfo::LoadTokens(const TiXmlNode* pTokens, vector<CStdString>& vecToke
         strSep = pToken->Attribute("separators");
       if (pToken->FirstChild() && pToken->FirstChild()->Value())
       {
-        if (strSep.IsEmpty())
+        if (strSep.empty())
           vecTokens.push_back(pToken->FirstChild()->Value());
         else
           for (unsigned int i=0;i<strSep.size();++i)
index 11d8fc9..8cceb43 100644 (file)
@@ -63,7 +63,7 @@ bool CPartyModeManager::Enable(PartyModeContext context /*= PARTYMODECONTEXT_MUS
   bool playlistLoaded;
 
   m_bIsVideo = context == PARTYMODECONTEXT_VIDEO;
-  if (!strXspPath.IsEmpty()) //if a path to a smartplaylist is supplied use it
+  if (!strXspPath.empty()) //if a path to a smartplaylist is supplied use it
     partyModePath = strXspPath;
   else if (m_bIsVideo)
     partyModePath = CProfilesManager::Get().GetUserDataItem("PartyMode-Video.xsp");
@@ -649,11 +649,11 @@ pair<CStdString,CStdString> CPartyModeManager::GetWhereClauseWithHistory() const
   // now add this on to the normal where clause
   if (m_history.size())
   {
-    if (m_strCurrentFilterMusic.IsEmpty())
+    if (m_strCurrentFilterMusic.empty())
       historyWhereMusic = "songview.idSong not in (";
     else
       historyWhereMusic = m_strCurrentFilterMusic + " and songview.idSong not in (";
-    if (m_strCurrentFilterVideo.IsEmpty())
+    if (m_strCurrentFilterVideo.empty())
       historyWhereVideo = "idMVideo not in (";
     else
       historyWhereVideo = m_strCurrentFilterVideo + " and idMVideo not in (";
index 19c04a5..fece2c2 100644 (file)
@@ -85,7 +85,7 @@ bool CPasswordManager::PromptToAuthenticateURL(CURL &url)
 void CPasswordManager::SaveAuthenticatedURL(const CURL &url, bool saveToProfile)
 {
   // don't store/save authenticated url if it doesn't contain username
-  if (url.GetUserName().IsEmpty())
+  if (url.GetUserName().empty())
     return;
 
   CSingleLock lock(m_critSection);
index d4bca6b..5394bd9 100644 (file)
@@ -76,7 +76,7 @@ bool CTextureCache::HasCachedImage(const CStdString &url)
 {
   CTextureDetails details;
   CStdString cachedImage(GetCachedImage(url, details));
-  return (!cachedImage.IsEmpty() && cachedImage != url);
+  return (!cachedImage.empty() && cachedImage != url);
 }
 
 CStdString CTextureCache::GetCachedImage(const CStdString &image, CTextureDetails &details, bool trackUsage)
@@ -106,7 +106,7 @@ CStdString CTextureCache::CheckCachedImage(const CStdString &url, bool returnDDS
   CTextureDetails details;
   CStdString path(GetCachedImage(url, details, true));
   needsRecaching = !details.hash.empty();
-  if (!path.IsEmpty())
+  if (!path.empty())
   {
     if (!needsRecaching && returnDDS && !URIUtils::IsInPath(url, "special://skin/")) // TODO: should skin images be .dds'd (currently they're not necessarily writeable)
     { // check for dds version
@@ -125,7 +125,7 @@ void CTextureCache::BackgroundCacheImage(const CStdString &url)
 {
   CTextureDetails details;
   CStdString path(GetCachedImage(url, details));
-  if (!path.IsEmpty() && details.hash.empty())
+  if (!path.empty() && details.hash.empty())
     return; // image is already cached and doesn't need to be checked further
 
   // needs (re)caching
@@ -317,7 +317,7 @@ bool CTextureCache::Export(const CStdString &image, const CStdString &destinatio
 {
   CTextureDetails details;
   CStdString cachedImage(GetCachedImage(image, details));
-  if (!cachedImage.IsEmpty())
+  if (!cachedImage.empty())
   {
     CStdString dest = destination + URIUtils::GetExtension(cachedImage);
     if (overwrite || !CFile::Exists(dest))
@@ -334,7 +334,7 @@ bool CTextureCache::Export(const CStdString &image, const CStdString &destinatio
 {
   CTextureDetails details;
   CStdString cachedImage(GetCachedImage(image, details));
-  if (!cachedImage.IsEmpty())
+  if (!cachedImage.empty())
   {
     if (CFile::Cache(cachedImage, destination))
       return true;
index 2ec01bf..d58b1f4 100644 (file)
@@ -69,7 +69,7 @@ bool CTextureCacheJob::DoWork()
   // check whether we need cache the job anyway
   bool needsRecaching = false;
   CStdString path(CTextureCache::Get().CheckCachedImage(m_url, false, needsRecaching));
-  if (!path.IsEmpty() && !needsRecaching)
+  if (!path.empty() && !needsRecaching)
     return false;
   return CacheTexture();
 }
@@ -98,7 +98,7 @@ bool CTextureCacheJob::CacheTexture(CBaseTexture **out_texture)
     m_details.file = m_cachePath + ".jpg";
     if (out_texture)
       *out_texture = LoadImage(CTextureCache::GetCachedPath(m_details.file), width, height, additional_info);
-    CLog::Log(LOGDEBUG, "Fast %s image '%s' to '%s': %p", m_oldHash.IsEmpty() ? "Caching" : "Recaching", image.c_str(), m_details.file.c_str(), out_texture);
+    CLog::Log(LOGDEBUG, "Fast %s image '%s' to '%s': %p", m_oldHash.empty() ? "Caching" : "Recaching", image.c_str(), m_details.file.c_str(), out_texture);
     return true;
   }
 #endif
@@ -110,7 +110,7 @@ bool CTextureCacheJob::CacheTexture(CBaseTexture **out_texture)
     else
       m_details.file = m_cachePath + ".jpg";
 
-    CLog::Log(LOGDEBUG, "%s image '%s' to '%s':", m_oldHash.IsEmpty() ? "Caching" : "Recaching", image.c_str(), m_details.file.c_str());
+    CLog::Log(LOGDEBUG, "%s image '%s' to '%s':", m_oldHash.empty() ? "Caching" : "Recaching", image.c_str(), m_details.file.c_str());
 
     if (CPicture::CacheTexture(texture, width, height, CTextureCache::GetCachedPath(m_details.file)))
     {
index b47dc31..34d27fa 100644 (file)
@@ -124,7 +124,7 @@ CStdString CTextureUtils::GetWrappedImageURL(const CStdString &image, const CStd
   url.SetProtocol("image");
   url.SetUserName(type);
   url.SetHostName(image);
-  if (!options.IsEmpty())
+  if (!options.empty())
   {
     url.SetFileName("transform");
     url.SetOptions("?" + options);
@@ -142,7 +142,7 @@ CStdString CTextureUtils::UnwrapImageURL(const CStdString &image)
   if (StringUtils::StartsWith(image, "image://"))
   {
     CURL url(image);
-    if (url.GetUserName().IsEmpty() && url.GetOptions().IsEmpty())
+    if (url.GetUserName().empty() && url.GetOptions().empty())
       return url.GetHostName();
   }
   return image;
index b34154a..865b843 100644 (file)
@@ -101,19 +101,19 @@ bool CProgramThumbLoader::FillThumb(CFileItem &item)
   // no need to do anything if we already have a thumb set
   CStdString thumb = item.GetArt("thumb");
 
-  if (thumb.IsEmpty())
+  if (thumb.empty())
   { // see whether we have a cached image for this item
     CProgramThumbLoader loader;
     thumb = loader.GetCachedImage(item, "thumb");
-    if (thumb.IsEmpty())
+    if (thumb.empty())
     {
       thumb = GetLocalThumb(item);
-      if (!thumb.IsEmpty())
+      if (!thumb.empty())
         loader.SetCachedImage(item, "thumb", thumb);
     }
   }
 
-  if (!thumb.IsEmpty())
+  if (!thumb.empty())
   {
     CTextureCache::Get().BackgroundCacheImage(thumb);
     item.SetArt("thumb", thumb);
index 8eb01e3..96960ac 100644 (file)
@@ -324,7 +324,7 @@ void CURL::Parse(const CStdString& strURL1)
     }
     else
     {
-      if (!m_strHostName.IsEmpty() && strURL[iEnd-1]=='/')
+      if (!m_strHostName.empty() && strURL[iEnd-1]=='/')
         m_strFileName = m_strHostName + "/";
       else
         m_strFileName = m_strHostName;
@@ -491,7 +491,7 @@ const CStdString CURL::GetFileNameWithoutPath() const
   if ((m_strProtocol == "rar"  || 
        m_strProtocol == "zip"  ||
        m_strProtocol == "apk") &&
-       m_strFileName.IsEmpty())
+       m_strFileName.empty())
     return URIUtils::GetFileName(m_strHostName);
 
   // otherwise, we've already got the filepath, so just grab the filename portion
@@ -686,7 +686,7 @@ std::string CURL::GetRedacted(const std::string& path)
 
 bool CURL::IsLocal() const
 {
-  return (IsLocalHost() || m_strProtocol.IsEmpty());
+  return (IsLocalHost() || m_strProtocol.empty());
 }
 
 bool CURL::IsLocalHost() const
index a42913f..563f43c 100644 (file)
@@ -149,7 +149,7 @@ CStdString CUtil::GetTitleFromPath(const CStdString& strFileNameAndPath, bool bI
   {
     CRSSDirectory dir;
     CFileItemList items;
-    if(dir.GetDirectory(strFileNameAndPath, items) && !items.m_strTitle.IsEmpty())
+    if(dir.GetDirectory(strFileNameAndPath, items) && !items.m_strTitle.empty())
       return items.m_strTitle;
   }
 
@@ -164,9 +164,9 @@ CStdString CUtil::GetTitleFromPath(const CStdString& strFileNameAndPath, bool bI
   }
 
   // Windows SMB Network (SMB)
-  else if (url.GetProtocol() == "smb" && strFilename.IsEmpty())
+  else if (url.GetProtocol() == "smb" && strFilename.empty())
   {
-    if (url.GetHostName().IsEmpty())
+    if (url.GetHostName().empty())
     {
       strFilename = g_localizeStrings.Get(20171);
     }
@@ -176,11 +176,11 @@ CStdString CUtil::GetTitleFromPath(const CStdString& strFileNameAndPath, bool bI
     }
   }
   // iTunes music share (DAAP)
-  else if (url.GetProtocol() == "daap" && strFilename.IsEmpty())
+  else if (url.GetProtocol() == "daap" && strFilename.empty())
     strFilename = g_localizeStrings.Get(20174);
 
   // HDHomerun Devices
-  else if (url.GetProtocol() == "hdhomerun" && strFilename.IsEmpty())
+  else if (url.GetProtocol() == "hdhomerun" && strFilename.empty())
     strFilename = "HDHomerun Devices";
 
   // Slingbox Devices
@@ -204,7 +204,7 @@ CStdString CUtil::GetTitleFromPath(const CStdString& strFileNameAndPath, bool bI
     strFilename = g_localizeStrings.Get(20258);
 
   // SAP Streams
-  else if (url.GetProtocol() == "sap" && strFilename.IsEmpty())
+  else if (url.GetProtocol() == "sap" && strFilename.empty())
     strFilename = "SAP Streams";
 
   // Root file views
@@ -219,7 +219,7 @@ CStdString CUtil::GetTitleFromPath(const CStdString& strFileNameAndPath, bool bI
   else if (StringUtils::StartsWithNoCase(path, "special://videoplaylists"))
     strFilename = g_localizeStrings.Get(136);
 
-  else if (URIUtils::ProtocolHasParentInHostname(url.GetProtocol()) && strFilename.IsEmpty())
+  else if (URIUtils::ProtocolHasParentInHostname(url.GetProtocol()) && strFilename.empty())
     strFilename = URIUtils::GetFileName(url.GetHostName());
 
   // now remove the extension if needed
@@ -300,7 +300,7 @@ void CUtil::CleanString(const CStdString& strFileName, CStdString& strTitle, CSt
   strTitle = strTitleAndYear.Trim();
 
   // append year
-  if (!strYear.IsEmpty())
+  if (!strYear.empty())
     strTitleAndYear = strTitle + " (" + strYear + ")";
 
   // restore extension if needed
@@ -312,7 +312,7 @@ void CUtil::GetQualifiedFilename(const CStdString &strBasePath, CStdString &strF
 {
   // Check if the filename is a fully qualified URL such as protocol://path/to/file
   CURL plItemUrl(strFilename);
-  if (!plItemUrl.GetProtocol().IsEmpty())
+  if (!plItemUrl.GetProtocol().empty())
     return;
 
   // If the filename starts "x:", "\\" or "/" it's already fully qualified so return
@@ -416,7 +416,7 @@ void CUtil::GetHomePath(CStdString& strPath, const CStdString& strTarget)
   }
 #endif
 
-  if (strPath.IsEmpty())
+  if (strPath.empty())
   {
     CStdString strHomePath = ResolveExecutablePath();
 #if defined(TARGET_DARWIN)
@@ -515,7 +515,7 @@ bool CUtil::IsPicture(const CStdString& strFile)
 
 bool CUtil::ExcludeFileOrFolder(const CStdString& strFileOrFolder, const CStdStringArray& regexps)
 {
-  if (strFileOrFolder.IsEmpty())
+  if (strFileOrFolder.empty())
     return false;
 
   CRegExp regExExcludes(true, true);  // case insensitive regex
@@ -1117,7 +1117,7 @@ void CUtil::SplitParams(const CStdString &paramString, std::vector<CStdString> &
     // whitespace handling - we skip any whitespace at the left or right of an unquoted parameter
     if (ch == ' ' && !inQuotes)
     {
-      if (parameter.IsEmpty()) // skip whitespace on left
+      if (parameter.empty()) // skip whitespace on left
         continue;
       if (!whiteSpacePos) // make a note of where whitespace starts on the right
         whiteSpacePos = parameter.size();
@@ -1143,13 +1143,13 @@ void CUtil::SplitParams(const CStdString &paramString, std::vector<CStdString> &
       parameter.Delete(quotaPos);
     }
   }
-  if (!parameter.IsEmpty() || parameters.size())
+  if (!parameter.empty() || parameters.size())
     parameters.push_back(parameter);
 }
 
 int CUtil::GetMatchingSource(const CStdString& strPath1, VECSOURCES& VECSOURCES, bool& bIsSourceName)
 {
-  if (strPath1.IsEmpty())
+  if (strPath1.empty())
     return -1;
 
   // copy as we may change strPath
@@ -1288,7 +1288,7 @@ int CUtil::GetMatchingSource(const CStdString& strPath1, VECSOURCES& VECSOURCES,
 
 CStdString CUtil::TranslateSpecialSource(const CStdString &strSpecial)
 {
-  if (!strSpecial.IsEmpty() && strSpecial[0] == '$')
+  if (!strSpecial.empty() && strSpecial[0] == '$')
   {
     if (StringUtils::StartsWithNoCase(strSpecial, "$home"))
       return URIUtils::AddFileToFolder("special://home/", strSpecial.Mid(5));
@@ -1414,7 +1414,7 @@ double CUtil::AlbumRelevance(const CStdString& strAlbumTemp1, const CStdString&
   strAlbum.MakeLower();
   double fAlbumPercentage = fstrcmp(strAlbumTemp, strAlbum, 0.0f);
   double fArtistPercentage = 0.0f;
-  if (!strArtist1.IsEmpty())
+  if (!strArtist1.empty())
   {
     CStdString strArtistTemp = strArtistTemp1;
     strArtistTemp.MakeLower();
index b099757..a1de91a 100644 (file)
@@ -680,7 +680,7 @@ void CDateTime::FromULargeInt(const ULARGE_INTEGER& time)
 
 void CDateTime::SetFromDateString(const CStdString &date)
 {
-  if (date.IsEmpty())
+  if (date.empty())
   {
     SetValid(false);
     return;
@@ -699,7 +699,7 @@ void CDateTime::SetFromDateString(const CStdString &date)
     iDayPos = 0;
 
   CStdString strMonth = date.Mid(iDayPos,iPos-iDayPos);
-  if (strMonth.IsEmpty()) // assume dbdate format
+  if (strMonth.empty()) // assume dbdate format
   {
     SetFromDBDate(date);
     return;
@@ -1036,7 +1036,7 @@ void CDateTime::SetFromRFC1123DateTime(const CStdString &dateTime)
 CStdString CDateTime::GetAsLocalizedTime(const CStdString &format, bool withSeconds) const
 {
   CStdString strOut;
-  const CStdString& strFormat = format.IsEmpty() ? g_langInfo.GetTimeFormat() : format;
+  const CStdString& strFormat = format.empty() ? g_langInfo.GetTimeFormat() : format;
 
   SYSTEMTIME dateTime;
   GetAsSystemTime(dateTime);
index 36efc23..42c018a 100644 (file)
@@ -158,7 +158,7 @@ AddonProps::AddonProps(const cp_extension_t *ext)
     license = CAddonMgr::Get().GetExtValue(metadata->configuration, "license");
     CStdString language;
     language = CAddonMgr::Get().GetExtValue(metadata->configuration, "language");
-    if (!language.IsEmpty())
+    if (!language.empty())
       extrainfo.insert(make_pair("language",language));
     broken = CAddonMgr::Get().GetExtValue(metadata->configuration, "broken");
     EMPTY_IF("nofanart",fanart)
@@ -276,7 +276,7 @@ CAddon::CAddon(const cp_plugin_info_t *plugin)
 CAddon::CAddon(const AddonProps &props)
   : m_props(props)
 {
-  if (props.libname.IsEmpty()) BuildLibName();
+  if (props.libname.empty()) BuildLibName();
   else m_strLibName = props.libname;
   BuildProfilePath();
   m_userSettingsPath = URIUtils::AddFileToFolder(Profile(), "settings.xml");
index f3a808d..4202363 100644 (file)
@@ -628,7 +628,7 @@ bool CAddonDatabase::BreakAddon(const CStdString &addonID, const CStdString& rea
     CStdString sql = PrepareSQL("delete from broken where addonID='%s'", addonID.c_str());
     m_pDS->exec(sql);
 
-    if (!reason.IsEmpty())
+    if (!reason.empty())
     { // broken
       sql = PrepareSQL("insert into broken(id, addonID, reason) values(NULL, '%s', '%s')", addonID.c_str(),reason.c_str());
       m_pDS->exec(sql);
@@ -647,7 +647,7 @@ bool CAddonDatabase::HasAddon(const CStdString &addonID)
   CStdString strWhereClause = PrepareSQL("addonID = '%s'", addonID.c_str());
   CStdString strHasAddon = GetSingleValue("addon", "id", strWhereClause);
   
-  return !strHasAddon.IsEmpty();
+  return !strHasAddon.empty();
 }
 
 bool CAddonDatabase::IsAddonDisabled(const CStdString &addonID)
@@ -675,7 +675,7 @@ bool CAddonDatabase::IsSystemPVRAddonEnabled(const CStdString &addonID)
   CStdString strWhereClause = PrepareSQL("addonID = '%s'", addonID.c_str());
   CStdString strEnabled = GetSingleValue("pvrenabled", "id", strWhereClause);
 
-  return !strEnabled.IsEmpty();
+  return !strEnabled.empty();
 }
 
 CStdString CAddonDatabase::IsAddonBroken(const CStdString &addonID)
@@ -743,7 +743,7 @@ bool CAddonDatabase::IsAddonBlacklisted(const CStdString& addonID,
                                         const CStdString& version)
 {
   CStdString where = PrepareSQL("addonID='%s' and version='%s'",addonID.c_str(),version.c_str());
-  return !GetSingleValue("blacklist","addonID",where).IsEmpty();
+  return !GetSingleValue("blacklist","addonID",where).empty();
 }
 
 bool CAddonDatabase::RemoveAddonFromBlacklist(const CStdString& addonID,
index 3007fbb..856c39c 100644 (file)
@@ -93,7 +93,7 @@ CAddonDll<TheDll, TheStruct, TheProps>::CAddonDll(const cp_extension_t *ext)
     m_bIsChild(false)
 {
   // if library attribute isn't present, look for a system-dependent one
-  if (ext && m_strLibName.IsEmpty())
+  if (ext && m_strLibName.empty())
   {
 #if defined(TARGET_ANDROID)
   m_strLibName = CAddonMgr::Get().GetExtValue(ext->configuration, "@library_android");
index 5030dda..5a3edd1 100644 (file)
@@ -490,7 +490,7 @@ bool CAddonInstallJob::DoWork()
 {
   AddonPtr repoPtr = GetRepoForAddon(m_addon);
   CStdString installFrom;
-  if (!repoPtr || repoPtr->Props().libname.IsEmpty())
+  if (!repoPtr || repoPtr->Props().libname.empty())
   {
     // Addons are installed by downloading the .zip package on the server to the local
     // packages folder, then extracting from the local .zip package into the addons folder
@@ -508,7 +508,7 @@ bool CAddonInstallJob::DoWork()
     {
       // zip passed in - download + extract
       CStdString path(m_addon->Path());
-      if (!m_referer.IsEmpty() && URIUtils::IsInternetStream(path))
+      if (!m_referer.empty() && URIUtils::IsInternetStream(path))
       {
         CURL url(path);
         url.SetProtocolOptions(m_referer);
@@ -759,7 +759,7 @@ void CAddonInstallJob::ReportInstallError(const CStdString& addonID,
 
 bool CAddonInstallJob::CheckHash(const CStdString& zipFile)
 {
-  if (m_hash.IsEmpty())
+  if (m_hash.empty())
     return true;
   CStdString md5 = CUtil::GetFileMD5(zipFile);
   if (!md5.Equals(m_hash))
@@ -798,7 +798,7 @@ bool CAddonUnInstallJob::DoWork()
 
   AddonPtr repoPtr = CAddonInstallJob::GetRepoForAddon(m_addon);
   RepositoryPtr therepo = boost::dynamic_pointer_cast<CRepository>(repoPtr);
-  if (therepo && !therepo->Props().libname.IsEmpty())
+  if (therepo && !therepo->Props().libname.empty())
   {
     CFileItemList dummy;
     CStdString s = StringUtils::Format("plugin://%s/?action=uninstall"
index dc8c597..fb968eb 100644 (file)
@@ -757,7 +757,7 @@ bool CAddonMgr::GetExtList(cp_cfg_element_t *base, const char *path, vector<CStd
   if (!base || !path)
     return false;
   CStdString all = m_cpluff->lookup_cfg_value(base, path);
-  if (all.IsEmpty())
+  if (all.empty())
     return false;
   StringUtils::SplitString(all, " ", result);
   return true;
index 9ab8682..f3b20a2 100644 (file)
@@ -32,7 +32,7 @@ namespace ADDON
   AddonVersion::AddonVersion(const CStdString& version)
   {
     m_originalVersion = version;
-    if (m_originalVersion.IsEmpty())
+    if (m_originalVersion.empty())
       m_originalVersion = "0.0.0";
     const char *epoch_end = strchr(m_originalVersion.c_str(), ':');
     if (epoch_end != NULL)
index dc3f83c..e60bc8a 100644 (file)
@@ -296,7 +296,7 @@ bool CGUIDialogAddonSettings::ShowVirtualKeyboard(int iControl)
                 if (i == (unsigned int)atoi(value))
                   selected = i;
                 CStdString localized = m_addon->GetString(atoi(valuesVec[i].c_str()));
-                if (localized.IsEmpty())
+                if (localized.empty())
                   localized = g_localizeStrings.Get(atoi(valuesVec[i].c_str()));
                 valuesVec[i] = localized;
               }
@@ -411,7 +411,7 @@ bool CGUIDialogAddonSettings::ShowVirtualKeyboard(int iControl)
         else if (strcmpi(type, "action") == 0)
         {
           CStdString action = setting->Attribute("action");
-          if (!action.IsEmpty())
+          if (!action.empty())
           {
             // replace $CWD with the url of plugin/script
             action.Replace("$CWD", m_addon->Path());
@@ -424,7 +424,7 @@ bool CGUIDialogAddonSettings::ShowVirtualKeyboard(int iControl)
         else if (strcmp(type, "date") == 0)
         {
           CDateTime date;
-          if (!value.IsEmpty())
+          if (!value.empty())
             date.SetFromDBDate(value);
           SYSTEMTIME timedate;
           date.GetAsSystemTime(timedate);
@@ -438,7 +438,7 @@ bool CGUIDialogAddonSettings::ShowVirtualKeyboard(int iControl)
         else if (strcmp(type, "time") == 0)
         {
           SYSTEMTIME timedate;
-          if (!value.IsEmpty())
+          if (!value.empty())
           {
             // assumes HH:MM
             timedate.wHour = atoi(value.Left(2));
@@ -603,7 +603,7 @@ void CGUIDialogAddonSettings::CreateSections()
     CGUIButtonControl *button = originalButton ? originalButton->Clone() : NULL;
 
     CStdString label = GetString(category->Attribute("label"));
-    if (label.IsEmpty())
+    if (label.empty())
       label = g_localizeStrings.Get(128);
 
     // add the category button
@@ -753,7 +753,7 @@ void CGUIDialogAddonSettings::CreateControls()
         if (!pControl) return;
         ((CGUISpinControlEx *)pControl)->SetText(label);
 
-        if (!lvalues.IsEmpty())
+       if (!lvalues.empty())
           StringUtils::Tokenize(lvalues, valuesVec, "|");
         else if (values.Equals("$HOURS"))
         {
@@ -765,7 +765,7 @@ void CGUIDialogAddonSettings::CreateControls()
         }
         else
           StringUtils::Tokenize(values, valuesVec, "|");
-        if (!entries.IsEmpty())
+        if (!entries.empty())
           StringUtils::Tokenize(entries, entryVec, "|");
 
         if(bSort && strcmpi(type, "labelenum") == 0)
@@ -776,10 +776,10 @@ void CGUIDialogAddonSettings::CreateControls()
           int iAdd = i;
           if (entryVec.size() > i)
             iAdd = atoi(entryVec[i].c_str());
-          if (!lvalues.IsEmpty())
+          if (!lvalues.empty())
           {
             CStdString replace = m_addon->GetString(atoi(valuesVec[i].c_str()));
-            if (replace.IsEmpty())
+            if (replace.empty())
               replace = g_localizeStrings.Get(atoi(valuesVec[i].c_str()));
             ((CGUISpinControlEx *)pControl)->AddLabel(replace, iAdd);
           }
@@ -921,7 +921,7 @@ CStdString CGUIDialogAddonSettings::GetAddonNames(const CStdString& addonIDslist
   StringUtils::SplitString(addonIDslist, ",", addons);
   for (CStdStringArray::const_iterator it = addons.begin(); it != addons.end() ; it ++)
   {
-    if (!retVal.IsEmpty())
+    if (!retVal.empty())
       retVal += ", ";
     AddonPtr addon;
     if (CAddonMgr::Get().GetAddon(*it ,addon))
@@ -945,7 +945,7 @@ vector<std::string> CGUIDialogAddonSettings::GetFileEnumValues(const CStdString
   bool hideExtensions = (options.CompareNoCase("hideext") == 0);
   // fetch directory
   CFileItemList items;
-  if (!mask.IsEmpty())
+  if (!mask.empty())
     CDirectory::GetDirectory(fullPath, items, mask, XFILE::DIR_FLAG_NO_FILE_DIRS);
   else
     CDirectory::GetDirectory(fullPath, items, "", XFILE::DIR_FLAG_NO_FILE_DIRS);
@@ -992,7 +992,7 @@ void CGUIDialogAddonSettings::EnableControls()
 
 bool CGUIDialogAddonSettings::GetCondition(const CStdString &condition, const int controlId)
 {
-  if (condition.IsEmpty()) return true;
+  if (condition.empty()) return true;
 
   bool bCondition = true;
   bool bCompare = true;
index ed69ccd..d3156df 100644 (file)
@@ -79,7 +79,7 @@ bool CGUIWindowAddonBrowser::OnMessage(CGUIMessage& message)
       m_rootDir.AllowNonLocalSources(false);
 
       // is this the first time the window is opened?
-      if (m_vecItems->GetPath() == "?" && message.GetStringParam().IsEmpty())
+      if (m_vecItems->GetPath() == "?" && message.GetStringParam().empty())
         m_vecItems->SetPath("");
     }
     break;
@@ -314,7 +314,7 @@ bool CGUIWindowAddonBrowser::GetDirectory(const CStdString& strDirectory,
     }
   }
 
-  if (strDirectory.IsEmpty() && CAddonInstaller::Get().IsDownloading())
+  if (strDirectory.empty() && CAddonInstaller::Get().IsDownloading())
   {
     CFileItemPtr item(new CFileItem("addons://downloading/",true));
     item->SetLabel(g_localizeStrings.Get(24067));
@@ -378,7 +378,7 @@ int CGUIWindowAddonBrowser::SelectAddonID(ADDON::TYPE type, CStdStringArray &add
 int CGUIWindowAddonBrowser::SelectAddonID(const vector<ADDON::TYPE> &types, CStdString &addonID, bool showNone /*= false*/)
 {
   CStdStringArray addonIDs;
-  if (!addonID.IsEmpty())
+  if (!addonID.empty())
     addonIDs.push_back(addonID);
   int retval = SelectAddonID(types, addonIDs, showNone, false);
   if (addonIDs.size() > 0)
@@ -420,7 +420,7 @@ int CGUIWindowAddonBrowser::SelectAddonID(const vector<ADDON::TYPE> &types, CStd
         items.Add(item);
     }
 
-    if (!heading.IsEmpty())
+    if (!heading.empty())
       heading += ", ";
     heading += TranslateType(*it, true);
   }
index 3ca6a71..a9427ef 100644 (file)
@@ -43,7 +43,7 @@ CPluginSource::CPluginSource(const cp_extension_t *ext)
   if (ext)
   {
     provides = CAddonMgr::Get().GetExtValue(ext->configuration, "provides");
-    if (!provides.IsEmpty())
+    if (!provides.empty())
       Props().extrainfo.insert(make_pair("provides", provides));
   }
   SetProvides(provides);
@@ -57,7 +57,7 @@ AddonPtr CPluginSource::Clone() const
 void CPluginSource::SetProvides(const CStdString &content)
 {
   vector<CStdString> provides;
-  if (!content.IsEmpty())
+  if (!content.empty())
   {
     StringUtils::SplitString(content, " ", provides);
     for (unsigned int i = 0; i < provides.size(); ++i)
index eb18f5b..19c48d7 100644 (file)
@@ -159,7 +159,7 @@ string CRepository::GetAddonHash(const AddonPtr& addon) const
 
 #define SET_IF_NOT_EMPTY(x,y) \
   { \
-    if (!x.IsEmpty()) \
+    if (!x.empty()) \
        x = y; \
   }
 
@@ -269,9 +269,9 @@ bool CRepositoryUpdateJob::DoWork()
                                               addon->Name(),TOAST_DISPLAY_TIME,false,TOAST_DISPLAY_TIME);
       }
     }
-    if (!addons[i]->Props().broken.IsEmpty())
+    if (!addons[i]->Props().broken.empty())
     {
-      if (database.IsAddonBroken(addons[i]->ID()).IsEmpty())
+      if (database.IsAddonBroken(addons[i]->ID()).empty())
       {
         std::string line = g_localizeStrings.Get(24096);
         if (addons[i]->Props().broken == "DEPSNOTMET")
index 9615a74..2e459f2 100644 (file)
@@ -132,7 +132,7 @@ CScraper::CScraper(const cp_extension_t *ext) : CAddon(ext), m_fLoaded(false)
     m_language = CAddonMgr::Get().GetExtValue(ext->configuration, "@language");
     m_requiressettings = CAddonMgr::Get().GetExtValue(ext->configuration,"@requiressettings").Equals("true");
     CStdString persistence = CAddonMgr::Get().GetExtValue(ext->configuration, "@cachepersistence");
-    if (!persistence.IsEmpty())
+    if (!persistence.empty())
       m_persistence.SetFromTimeString(persistence);
   }
   switch (Type())
@@ -183,7 +183,7 @@ bool CScraper::SetPathSettings(CONTENT_TYPE content, const CStdString& xml)
   if (!LoadSettings())
     return false;
 
-  if (xml.IsEmpty())
+  if (xml.empty())
     return true;
 
   CXBMCTinyXML doc;
@@ -246,7 +246,7 @@ vector<CStdString> CScraper::Run(const CStdString& function,
     throw CScraperError();
 
   CStdString strXML = InternalRun(function,scrURL,http,extras);
-  if (strXML.IsEmpty())
+  if (strXML.empty())
   {
     if (function != "NfoUrl" && function != "ResolveIDToUrl")
       CLog::Log(LOGERROR, "%s: Unable to parse web site",__FUNCTION__);
@@ -577,7 +577,7 @@ std::vector<CScraperUrl> CScraper::FindMovie(XFILE::CCurlFile &fcurl, const CStd
   vector<CStdString> vcsIn(1);
   g_charsetConverter.utf8To(SearchStringEncoding(), sTitle, vcsIn[0]);
   CURL::Encode(vcsIn[0]);
-  if (!sYear.IsEmpty())
+  if (!sYear.empty())
     vcsIn.push_back(sYear);
 
   // request a search URL from the title/filename/etc.
index e177eda..d689e60 100644 (file)
@@ -80,13 +80,13 @@ CSkinInfo::CSkinInfo(const cp_extension_t *ext)
   else
   { // no resolutions specified -> backward compatibility
     CStdString defaultWide = CAddonMgr::Get().GetExtValue(ext->configuration, "@defaultwideresolution");
-    if (defaultWide.IsEmpty())
+    if (defaultWide.empty())
       defaultWide = CAddonMgr::Get().GetExtValue(ext->configuration, "@defaultresolution");
     TranslateResolution(defaultWide, m_defaultRes);
   }
 
   CStdString str = CAddonMgr::Get().GetExtValue(ext->configuration, "@effectslowdown");
-  if (!str.IsEmpty())
+  if (!str.empty())
     m_effectsSlowDown = (float)atof(str.c_str());
   else
     m_effectsSlowDown = 1.f;
@@ -152,7 +152,7 @@ CStdString CSkinInfo::GetSkinPath(const CStdString& strFile, RESOLUTION_INFO *re
     return ""; // invalid skin
 
   CStdString strPathToUse = Path();
-  if (!strBaseDir.IsEmpty())
+  if (!strBaseDir.empty())
     strPathToUse = strBaseDir;
 
   // if the caller doesn't care about the resolution just use a temporary
index 6cdad02..216ec1b 100644 (file)
@@ -70,7 +70,7 @@ bool CCDDARipJob::DoWork()
   if (file.IsRemote())
     m_output = SetupTempFile();
   
-  if (m_output.IsEmpty())
+  if (m_output.empty())
   {
     CLog::Log(LOGERROR, "CCDDARipper: Error opening file");
     return false;
index c0bcd98..364c9d8 100644 (file)
@@ -195,7 +195,7 @@ bool CCDDARipper::CreateAlbumDir(const MUSIC_INFO::CMusicInfoTag& infoTag, CStdS
 
   CStdString strAlbumDir = GetAlbumDirName(infoTag);
 
-  if (!strAlbumDir.IsEmpty())
+  if (!strAlbumDir.empty())
   {
     strDirectory = URIUtils::AddFileToFolder(strDirectory, strAlbumDir);
     URIUtils::AddSlashAtEnd(strDirectory);
@@ -231,9 +231,9 @@ CStdString CCDDARipper::GetAlbumDirName(const MUSIC_INFO::CMusicInfoTag& infoTag
   if (strAlbumDir.Find("%A") != -1)
   {
     CStdString strAlbumArtist = StringUtils::Join(infoTag.GetAlbumArtist(), g_advancedSettings.m_musicItemSeparator);
-    if (strAlbumArtist.IsEmpty())
+    if (strAlbumArtist.empty())
       strAlbumArtist = StringUtils::Join(infoTag.GetArtist(), g_advancedSettings.m_musicItemSeparator);
-    if (strAlbumArtist.IsEmpty())
+    if (strAlbumArtist.empty())
       strAlbumArtist = "Unknown Artist";
     else
       strAlbumArtist.Replace('/', '_');
@@ -244,7 +244,7 @@ CStdString CCDDARipper::GetAlbumDirName(const MUSIC_INFO::CMusicInfoTag& infoTag
   if (strAlbumDir.Find("%B") != -1)
   {
     CStdString strAlbum = infoTag.GetAlbum();
-    if (strAlbum.IsEmpty())
+    if (strAlbum.empty())
       strAlbum = StringUtils::Format("Unknown Album %s", CDateTime::GetCurrentDateTime().GetAsLocalizedDateTime().c_str());
     else
       strAlbum.Replace('/', '_');
@@ -255,7 +255,7 @@ CStdString CCDDARipper::GetAlbumDirName(const MUSIC_INFO::CMusicInfoTag& infoTag
   if (strAlbumDir.Find("%G") != -1)
   {
     CStdString strGenre = StringUtils::Join(infoTag.GetGenre(), g_advancedSettings.m_musicItemSeparator);
-    if (strGenre.IsEmpty())
+    if (strGenre.empty())
       strGenre = "Unknown Genre";
     else
       strGenre.Replace('/', '_');
@@ -266,7 +266,7 @@ CStdString CCDDARipper::GetAlbumDirName(const MUSIC_INFO::CMusicInfoTag& infoTag
   if (strAlbumDir.Find("%Y") != -1)
   {
     CStdString strYear = infoTag.GetYearString();
-    if (strYear.IsEmpty())
+    if (strYear.empty())
       strYear = "Unknown Year";
     else
       strYear.Replace('/', '_');
@@ -299,7 +299,7 @@ CStdString CCDDARipper::GetTrackName(CFileItem *item)
 
   // grab the label to use it as our ripped filename
   CStdString track = destItem.GetLabel();
-  if (track.IsEmpty())
+  if (track.empty())
     track = StringUtils::Format("%s%02i", "Track-", trackNumber);
   track += GetExtension(CSettings::Get().GetInt("audiocds.encoder"));
 
index 61e4c4e..d1352c3 100644 (file)
@@ -139,7 +139,7 @@ extern "C" void __stdcall init_emu_environ()
 #endif
 
   // check if we are running as real xbmc.app or just binary
-  if (!CUtil::GetFrameworksPath(true).IsEmpty())
+  if (!CUtil::GetFrameworksPath(true).empty())
   {
     // using external python, it's build looking for xxx/lib/python2.6
     // so point it to frameworks which is where python2.6 is located
index f8815a4..2808a58 100644 (file)
@@ -419,7 +419,7 @@ BOOL CExternalPlayer::ExecuteAppW32(const char* strPath, const char* strSwitches
 
   if (m_bAbortRequest) return false;
 
-  BOOL ret = CreateProcessW(WstrPath.IsEmpty() ? NULL : WstrPath.c_str(),
+  BOOL ret = CreateProcessW(WstrPath.empty() ? NULL : WstrPath.c_str(),
                             (LPWSTR) WstrSwitches.c_str(), NULL, NULL, FALSE, NULL,
                             NULL, NULL, &si, &m_processInfo);
 
@@ -738,7 +738,7 @@ void CExternalPlayer::GetCustomRegexpReplacers(TiXmlElement *pRootElement,
       XMLUtils::GetString(pReplacer,"pat",strPat);
       XMLUtils::GetString(pReplacer,"rep",strRep);
 
-      if (!strPat.IsEmpty() && !strRep.IsEmpty())
+      if (!strPat.empty() && !strRep.empty())
       {
         CLog::Log(LOGDEBUG,"  Registering replacer:");
         CLog::Log(LOGDEBUG,"    Match:[%s] Pattern:[%s] Replacement:[%s]", strMatch.c_str(), strPat.c_str(), strRep.c_str());
@@ -757,7 +757,7 @@ void CExternalPlayer::GetCustomRegexpReplacers(TiXmlElement *pRootElement,
       else
       {
         // error message about missing tag
-        if (strPat.IsEmpty())
+        if (strPat.empty())
           CLog::Log(LOGERROR,"  Missing <Pat> tag");
         else
           CLog::Log(LOGERROR,"  Missing <Rep> tag");
index 371d958..bcc2d33 100644 (file)
@@ -230,7 +230,7 @@ int CDVDOverlayCodecTX3G::Decode(DemuxPacket *pPacket)
   free(bgnStyle);
   free(endStyle);
     
-  if (strUTF8.IsEmpty())
+  if (strUTF8.empty())
     return OC_BUFFER;
 
   if (strUTF8[strUTF8.size()-1] == '\n')
index a4e1477..09551c4 100644 (file)
@@ -713,7 +713,7 @@ int CDVDVideoCodecFFmpeg::FilterOpen(const CStdString& filters, bool scale)
   if (m_pFilterGraph)
     FilterClose();
 
-  if (filters.IsEmpty() && !scale)
+  if (filters.empty() && !scale)
     return 0;
 
   if (m_pHardware)
index 87a367f..6ca7ba4 100644 (file)
@@ -153,7 +153,7 @@ static void ff_flush_avutil_log_buffers(void)
      add a new buffer next time it writes to the log */
   std::map<uintptr_t, CStdString>::iterator it;
   for (it = g_logbuffer.begin(); it != g_logbuffer.end(); )
-    if ((*it).second.IsEmpty())
+    if ((*it).second.empty())
       g_logbuffer.erase(it++);
     else
       ++it;
index eceae33..eae1fb7 100644 (file)
@@ -98,7 +98,7 @@ bool CDVDInputStreamHTSP::Open(const char* file, const std::string& content)
   if(!m_session.Connect(url.GetHostName(), url.GetPort()))
     return false;
 
-  if(!url.GetUserName().IsEmpty())
+  if(!url.GetUserName().empty())
     m_session.Auth(url.GetUserName(), url.GetPassWord());
 
   m_session.SendEnableAsync();
index a00e5dd..401bc8b 100644 (file)
@@ -71,7 +71,7 @@ bool CDVDSubtitleParserSami::Open(CDVDStreamInfo &hints)
     }
   }
   const char *lang = NULL;
-  if (!strClassID.IsEmpty())
+  if (!strClassID.empty())
     lang = strClassID.c_str();
 
   CDVDOverlayText* pOverlay = NULL;
index 8408e89..54d4042 100644 (file)
@@ -150,7 +150,7 @@ void CDVDSubtitleTagMicroDVD::ConvertLine(CDVDOverlayText* pOverlay, const char*
     }
   }
     
-  if (strUTF8.IsEmpty())
+  if (strUTF8.empty())
     return;
 
   if( strUTF8[strUTF8.size()-1] == '\n' )
index 71cab90..264a60a 100644 (file)
@@ -178,7 +178,7 @@ void CDVDSubtitleTagSami::ConvertLine(CDVDOverlayText* pOverlay, const char* lin
       pos = del_start;
       m_flag[FLAG_LANGUAGE] = false;
     }
-    else if (fullTag == "<br>" && !strUTF8.IsEmpty())
+    else if (fullTag == "<br>" && !strUTF8.empty())
     {
       strUTF8.Insert(pos, "\n");
       pos += 1;
@@ -188,7 +188,7 @@ void CDVDSubtitleTagSami::ConvertLine(CDVDOverlayText* pOverlay, const char* lin
   if(m_flag[FLAG_LANGUAGE])
     strUTF8.erase(del_start);
 
-  if (strUTF8.IsEmpty())
+  if (strUTF8.empty())
     return;
 
   if( strUTF8[strUTF8.size()-1] == '\n' )
index f1baf94..6c8b121 100644 (file)
@@ -896,7 +896,7 @@ CStdString CEdl::GetInfo()
   if (HasSceneMarker())
     strInfo.AppendFormat("s%i", m_vecSceneMarkers.size());
 
-  return strInfo.IsEmpty() ? "-" : strInfo;
+  return strInfo.empty() ? "-" : strInfo;
 }
 
 bool CEdl::InCut(const int64_t iSeek, Cut *pCut)
index d511ab3..f1bd5f7 100644 (file)
@@ -3296,7 +3296,7 @@ bool COMXPlayer::OpenVideoStream(int iStream, int source, bool reset)
     // for music file, don't open artwork as video
     bool disabled = false;
     CStdString extension = URIUtils::GetExtension(m_filename);
-    if (!extension.IsEmpty() && g_advancedSettings.m_musicExtensions.Find(extension.ToLower()) != -1)
+    if (!extension.empty() && g_advancedSettings.m_musicExtensions.Find(extension.ToLower()) != -1)
     {
       CLog::Log(LOGWARNING, "%s - Ignoring video in audio filetype:%s", __FUNCTION__, m_filename.c_str());
       disabled = true;
index 4402a9d..a0add7c 100644 (file)
@@ -38,7 +38,7 @@ CPlayerSelectionRule::~CPlayerSelectionRule()
 void CPlayerSelectionRule::Initialize(TiXmlElement* pRule)
 {
   m_name = pRule->Attribute("name");
-  if (!m_name || m_name.IsEmpty())
+  if (!m_name || m_name.empty())
     m_name = "un-named";
 
   CLog::Log(LOGDEBUG, "CPlayerSelectionRule::Initialize: creating rule: %s", m_name.c_str());
index 7c51a9c..c0b37a9 100644 (file)
@@ -214,7 +214,7 @@ bool CDatabase::DeleteValues(const CStdString &strTable, const CStdString &strWh
   bool bReturn = true;
 
   CStdString strQueryBase = "DELETE FROM %s";
-  if (!strWhereClause.IsEmpty())
+  if (!strWhereClause.empty())
     strQueryBase.AppendFormat(" WHERE %s", strWhereClause.c_str());
 
   CStdString strQuery = FormatSQL(strQueryBase, strTable.c_str());
@@ -268,7 +268,7 @@ bool CDatabase::ResultQuery(const CStdString &strQuery)
 
 bool CDatabase::QueueInsertQuery(const CStdString &strQuery)
 {
-  if (strQuery.IsEmpty())
+  if (strQuery.empty())
     return false;
 
   if (!m_bMultiWrite)
@@ -342,8 +342,8 @@ void CDatabase::InitSettings(DatabaseSettings &dbSettings)
   if ( dbSettings.type.Equals("mysql") )
   {
     // check we have all information before we cancel the fallback
-    if ( ! (dbSettings.host.IsEmpty() ||
-            dbSettings.user.IsEmpty() || dbSettings.pass.IsEmpty()) )
+    if ( ! (dbSettings.host.empty() ||
+            dbSettings.user.empty() || dbSettings.pass.empty()) )
       m_sqlite = false;
     else
       CLog::Log(LOGINFO, "Essential mysql database information is missing. Require at least host, user and pass defined.");
@@ -355,12 +355,12 @@ void CDatabase::InitSettings(DatabaseSettings &dbSettings)
 #endif
   {
     dbSettings.type = "sqlite3";
-    if (dbSettings.host.IsEmpty())
+    if (dbSettings.host.empty())
       dbSettings.host = CSpecialProtocol::TranslatePath(CProfilesManager::Get().GetDatabaseFolder());
   }
 
   // use separate, versioned database
-  if (dbSettings.name.IsEmpty())
+  if (dbSettings.name.empty())
     dbSettings.name = GetBaseDBName();
 }
 
@@ -453,13 +453,13 @@ bool CDatabase::Connect(const CStdString &dbName, const DatabaseSettings &dbSett
   // host name is always required
   m_pDB->setHostName(dbSettings.host.c_str());
 
-  if (!dbSettings.port.IsEmpty())
+  if (!dbSettings.port.empty())
     m_pDB->setPort(dbSettings.port.c_str());
 
-  if (!dbSettings.user.IsEmpty())
+  if (!dbSettings.user.empty())
     m_pDB->setLogin(dbSettings.user.c_str());
 
-  if (!dbSettings.pass.IsEmpty())
+  if (!dbSettings.pass.empty())
     m_pDB->setPasswd(dbSettings.pass.c_str());
 
   // database name is always required
index ca127cd..4a21e4a 100644 (file)
@@ -252,7 +252,7 @@ CStdString CDatabaseQueryRule::FormatParameter(const CStdString &operatorString,
     StringUtils::SplitString(param, ",", split);
     for (CStdStringArray::iterator itIn = split.begin(); itIn != split.end(); ++itIn)
     {
-      if (!parameter.IsEmpty())
+      if (!parameter.empty())
         parameter += ",";
       parameter += db.PrepareSQL("'%s'", (*itIn).Trim().c_str());
     }
@@ -430,7 +430,7 @@ CStdString CDatabaseQueryRuleCombination::GetWhereClause(const CDatabase &db, co
     rule += "(";
     CStdString currentRule = (*it)->GetWhereClause(db, strType);
     // if we don't get a rule, we add '1' or '0' so the query is still valid and doesn't fail
-    if (currentRule.IsEmpty())
+    if (currentRule.empty())
       currentRule = m_type == CombinationAnd ? "'1'" : "'0'";
     rule += currentRule;
     rule += ")";
index 5bbb06b..1a7d043 100644 (file)
@@ -74,7 +74,7 @@ void CGUIDialogCache::OpenDialog()
 {
   if (m_pDlg)
   {
-    if (m_strHeader.IsEmpty())
+    if (m_strHeader.empty())
       m_pDlg->SetHeading(438);
     else
       m_pDlg->SetHeading(m_strHeader);
index 68e990b..43754f5 100644 (file)
@@ -352,7 +352,7 @@ void CGUIDialogContextMenu::GetContextButtons(const CStdString &type, const CFil
 
       buttons.Add(CONTEXT_BUTTON_SET_THUMB, 20019);
     }
-    if (!GetDefaultShareNameByType(type).IsEmpty())
+    if (!GetDefaultShareNameByType(type).empty())
       buttons.Add(CONTEXT_BUTTON_CLEAR_DEFAULT, 13403); // Clear Default
 
     buttons.Add(CONTEXT_BUTTON_ADD_SOURCE, 1026); // Add Source
@@ -454,7 +454,7 @@ bool CGUIDialogContextMenu::OnContextButton(const CStdString &type, const CFileI
     if (CGUIDialogYesNo::ShowAndGetInput(751, 0, 750, 0))
     { // check default before we delete, as deletion will kill the share object
       CStdString defaultSource(GetDefaultShareNameByType(type));
-      if (!defaultSource.IsEmpty())
+      if (!defaultSource.empty())
       {
         if (share->strName.Equals(defaultSource))
           ClearDefault(type);
@@ -493,7 +493,7 @@ bool CGUIDialogContextMenu::OnContextButton(const CStdString &type, const CFileI
       CFileItemList items;
 
       // add the current thumb, if available
-      if (!share->m_strThumbnailImage.IsEmpty())
+      if (!share->m_strThumbnailImage.empty())
       {
         CFileItemPtr current(new CFileItem("thumb://Current", false));
         current->SetArt("thumb", share->m_strThumbnailImage);
@@ -542,7 +542,7 @@ bool CGUIDialogContextMenu::OnContextButton(const CStdString &type, const CFileI
         CMediaSourceSettings::Get().UpdateSource(type,share->strName,"thumbnail",strThumb);
         CMediaSourceSettings::Get().Save();
       }
-      else if (!strThumb.IsEmpty())
+      else if (!strThumb.empty())
       { // this is some sort of an auto-share, so store in the texture database
         CTextureDatabase db;
         if (db.Open())
index 7fbcb91..210fb08 100644 (file)
@@ -90,10 +90,10 @@ bool CGUIDialogFileBrowser::OnAction(const CAction &action)
     GoParentFolder();
     return true;
   }
-  if ((action.GetID() == ACTION_CONTEXT_MENU || action.GetID() == ACTION_MOUSE_RIGHT_CLICK) && m_Directory->GetPath().IsEmpty())
+  if ((action.GetID() == ACTION_CONTEXT_MENU || action.GetID() == ACTION_MOUSE_RIGHT_CLICK) && m_Directory->GetPath().empty())
   {
     int iItem = m_viewControl.GetSelectedItem();
-    if ((!m_addSourceType.IsEmpty() && iItem != m_vecItems->Size()-1))
+    if ((!m_addSourceType.empty() && iItem != m_vecItems->Size()-1))
       return OnPopupMenu(iItem);
     if (m_addNetworkShareEnabled && g_mediaManager.HasLocation(m_selectedPath))
     {
@@ -351,7 +351,7 @@ void CGUIDialogFileBrowser::Update(const CStdString &strDirectory)
     {
       strSelectedItem = pItem->GetPath();
       URIUtils::RemoveSlashAtEnd(strSelectedItem);
-      m_history.SetSelectedItem(strSelectedItem, m_Directory->GetPath().IsEmpty()?"empty":m_Directory->GetPath());
+      m_history.SetSelectedItem(strSelectedItem, m_Directory->GetPath().empty()?"empty":m_Directory->GetPath());
     }
   }
 
@@ -404,7 +404,7 @@ void CGUIDialogFileBrowser::Update(const CStdString &strDirectory)
 
   // if we're getting the root source listing
   // make sure the path history is clean
-  if (strDirectory.IsEmpty())
+  if (strDirectory.empty())
     m_history.ClearPathHistory();
 
   // some evil stuff don't work with the '/' mask, e.g. shoutcast directory - make sure no files are in there
@@ -424,7 +424,7 @@ void CGUIDialogFileBrowser::Update(const CStdString &strDirectory)
 
   OnSort();
 
-  if (m_Directory->GetPath().IsEmpty() && m_addNetworkShareEnabled &&
+  if (m_Directory->GetPath().empty() && m_addNetworkShareEnabled &&
      (CProfilesManager::Get().GetMasterProfile().getLockMode() == LOCK_MODE_EVERYONE ||
       CProfilesManager::Get().IsMasterProfile() || g_passwordManager.bMasterUser))
   { // we are in the virtual directory - add the "Add Network Location" item
@@ -433,7 +433,7 @@ void CGUIDialogFileBrowser::Update(const CStdString &strDirectory)
     pItem->m_bIsFolder = true;
     m_vecItems->Add(pItem);
   }
-  if (m_Directory->GetPath().IsEmpty() && !m_addSourceType.IsEmpty())
+  if (m_Directory->GetPath().empty() && !m_addSourceType.empty())
   {
     CFileItemPtr pItem(new CFileItem(g_localizeStrings.Get(21359)));
     pItem->SetPath("source://");
@@ -540,7 +540,7 @@ void CGUIDialogFileBrowser::OnClick(int iItem)
       OnAddMediaSource();
       return;
     }
-    if (!m_addSourceType.IsEmpty())
+    if (!m_addSourceType.empty())
     {
       OnEditMediaSource(pItem.get());
       return;
@@ -838,7 +838,7 @@ bool CGUIDialogFileBrowser::ShowAndGetSource(CStdString &path, bool allowNetwork
   g_windowManager.AddUniqueInstance(browser);
 
   VECSOURCES shares;
-  if (!strType.IsEmpty())
+  if (!strType.empty())
   {
     if (additionalShare)
       shares = *additionalShare;
@@ -882,7 +882,7 @@ bool CGUIDialogFileBrowser::ShowAndGetSource(CStdString &path, bool allowNetwork
 void CGUIDialogFileBrowser::SetSources(const VECSOURCES &shares)
 {
   m_shares = shares;
-  if (!m_shares.size() && m_addSourceType.IsEmpty())
+  if (!m_shares.size() && m_addSourceType.empty())
     g_mediaManager.GetLocalDrives(m_shares);
   m_rootDir.SetSources(m_shares);
 }
@@ -932,8 +932,8 @@ void CGUIDialogFileBrowser::OnEditMediaSource(CFileItem* pItem)
 bool CGUIDialogFileBrowser::OnPopupMenu(int iItem)
 {
   CContextButtons choices;
-  choices.Add(1, m_addSourceType.IsEmpty() ? 20133 : 21364);
-  choices.Add(2, m_addSourceType.IsEmpty() ? 20134 : 21365);
+  choices.Add(1, m_addSourceType.empty() ? 20133 : 21364);
+  choices.Add(2, m_addSourceType.empty() ? 20134 : 21365);
 
   int btnid = CGUIDialogContextMenu::ShowAndGetChoice(choices);
   if (btnid == 1)
index d0d1419..e50fe61 100644 (file)
@@ -180,7 +180,7 @@ bool CGUIDialogGamepad::ShowAndGetInput(CStdString& aTextString, const CStdStrin
     return false;
   }
 
-  if (strUserInput.IsEmpty())
+  if (strUserInput.empty())
     // user canceled out
     return false;
 
@@ -204,7 +204,7 @@ bool CGUIDialogGamepad::ShowAndVerifyNewPassword(CStdString& strNewPassword)
     return false;
   }
 
-  if (strUserInput.IsEmpty())
+  if (strUserInput.empty())
     // user canceled out
     return false;
 
@@ -243,7 +243,7 @@ int CGUIDialogGamepad::ShowAndVerifyPassword(CStdString& strPassword, const CStd
     return 0;
   }
 
-  if (strPassTemp.IsEmpty())
+  if (strPassTemp.empty())
     // user canceled out
     return -1;
 
index d65162e..53685b2 100644 (file)
@@ -136,7 +136,7 @@ bool CGUIDialogKaiToast::DoWork()
     {
       CStdString strTypeImage = toast.imagefile;
 
-      if (strTypeImage.IsEmpty())
+      if (strTypeImage.empty())
       {
         CGUIImage *typeImage = NULL;
 
index de1b1d4..42b360a 100644 (file)
@@ -129,7 +129,7 @@ bool CGUIDialogKeyboardGeneric::OnAction(const CAction &action)
   }
   else if (action.GetID() == ACTION_CURSOR_RIGHT)
   {
-    if (m_strEditing.IsEmpty() && (unsigned int) GetCursorPos() == m_strEdit.size() && (m_strEdit.size() == 0 || m_strEdit[m_strEdit.size() - 1] != ' '))
+    if (m_strEditing.empty() && (unsigned int) GetCursorPos() == m_strEdit.size() && (m_strEdit.size() == 0 || m_strEdit[m_strEdit.size() - 1] != ' '))
     { // add a space
       Character(L' ');
     }
@@ -154,7 +154,7 @@ bool CGUIDialogKeyboardGeneric::OnAction(const CAction &action)
   }
   else if (action.GetID() >= KEY_VKEY && action.GetID() < KEY_ASCII)
   { // input from the keyboard (vkey, not ascii)
-    if (!m_strEditing.IsEmpty())
+    if (!m_strEditing.empty())
       return handled;
     uint8_t b = action.GetID() & 0xFF;
     if (b == XBMCVK_HOME)
@@ -323,7 +323,7 @@ void CGUIDialogKeyboardGeneric::InputText(const CStdString& aTextString)
 {
   CStdStringW newStr;
   g_charsetConverter.utf8ToW(aTextString, newStr);
-  if (!newStr.IsEmpty())
+  if (!newStr.empty())
   {
     m_strEditing.clear();
     m_iEditingOffset = 0;
@@ -393,7 +393,7 @@ void CGUIDialogKeyboardGeneric::UpdateLabel() // FIXME seems to be called twice
       else
         edit.append(m_strEdit.size(), L'*');
     }
-    else if (!m_strEditing.IsEmpty())
+    else if (!m_strEditing.empty())
     {
       edit.Insert(m_iCursorPos, m_strEditing);
       pEdit->SetHighlight(m_iCursorPos, m_iCursorPos + m_strEditing.size());
@@ -413,7 +413,7 @@ void CGUIDialogKeyboardGeneric::UpdateLabel() // FIXME seems to be called twice
     if (m_pCharCallback)
     {
       // do not send editing text comes from system input method
-      if (!m_hiddenInput && !m_strEditing.IsEmpty())
+      if (!m_hiddenInput && !m_strEditing.empty())
         g_charsetConverter.wToUTF8(m_strEdit, utf8Edit);
       m_pCharCallback(this, utf8Edit);
     }
@@ -611,7 +611,7 @@ void CGUIDialogKeyboardGeneric::OnDeinitWindow(int nextWindowID)
 
 void CGUIDialogKeyboardGeneric::MoveCursor(int iAmount)
 {
-  if (!m_strEditing.IsEmpty())
+  if (!m_strEditing.empty())
     return;
   SetCursorPos(GetCursorPos() + iAmount);
 }
index e080dd8..9952899 100644 (file)
@@ -342,7 +342,7 @@ void CGUIDialogMediaSource::OnPathBrowse(int item)
   {
     if (item < m_paths->Size()) // if the skin does funky things, m_paths may have been cleared
       m_paths->Get(item)->SetPath(path);
-    if (!m_bNameChanged || m_name.IsEmpty())
+    if (!m_bNameChanged || m_name.empty())
     {
       CURL url(path);
       m_name = url.GetWithoutUserDetails();
@@ -364,7 +364,7 @@ void CGUIDialogMediaSource::OnPath(int item)
   CGUIKeyboardFactory::ShowAndGetInput(path, g_localizeStrings.Get(1021), false);
   m_paths->Get(item)->SetPath(path);
 
-  if (!m_bNameChanged || m_name.IsEmpty())
+  if (!m_bNameChanged || m_name.empty())
   {
     CURL url(m_paths->Get(item)->GetPath());
     m_name = url.GetWithoutUserDetails();
@@ -413,8 +413,8 @@ void CGUIDialogMediaSource::UpdateButtons()
   if (!m_paths->Size()) // sanity
     return;
 
-  CONTROL_ENABLE_ON_CONDITION(CONTROL_OK, !m_paths->Get(0)->GetPath().IsEmpty() && !m_name.IsEmpty());
-  CONTROL_ENABLE_ON_CONDITION(CONTROL_PATH_ADD, !m_paths->Get(0)->GetPath().IsEmpty());
+  CONTROL_ENABLE_ON_CONDITION(CONTROL_OK, !m_paths->Get(0)->GetPath().empty() && !m_name.empty());
+  CONTROL_ENABLE_ON_CONDITION(CONTROL_PATH_ADD, !m_paths->Get(0)->GetPath().empty());
   CONTROL_ENABLE_ON_CONDITION(CONTROL_PATH_REMOVE, m_paths->Size() > 1);
   // name
   SET_CONTROL_LABEL2(CONTROL_NAME, m_name);
@@ -428,7 +428,7 @@ void CGUIDialogMediaSource::UpdateButtons()
     CStdString path;
     CURL url(item->GetPath());
     path = url.GetWithoutUserDetails();
-    if (path.IsEmpty()) path = "<"+g_localizeStrings.Get(231)+">"; // <None>
+    if (path.empty()) path = "<"+g_localizeStrings.Get(231)+">"; // <None>
     item->SetLabel(path);
   }
   CGUIMessage msg(GUI_MSG_LABEL_BIND, GetID(), CONTROL_PATH, 0, 0, m_paths);
@@ -527,7 +527,7 @@ vector<CStdString> CGUIDialogMediaSource::GetPaths()
   vector<CStdString> paths;
   for (int i = 0; i < m_paths->Size(); i++)
   {
-    if (!m_paths->Get(i)->GetPath().IsEmpty())
+    if (!m_paths->Get(i)->GetPath().empty())
     { // strip off the user and password for smb paths (anything that the password manager can auth)
       // and add the user/pass to the password manager - note, we haven't confirmed that it works
       // at this point, but if it doesn't, the user will get prompted anyway in SMBDirectory.
index b999cfe..8bf52a6 100644 (file)
@@ -208,7 +208,7 @@ void CGUIDialogNumeric::OnBackSpace()
   }
   if (m_mode == INPUT_NUMBER || m_mode == INPUT_PASSWORD)
   { // just go back one character
-    if (!m_number.IsEmpty())
+    if (!m_number.empty())
       m_number.Delete(m_number.GetLength() - 1);
   }
   else if (m_mode == INPUT_IP_ADDRESS)
@@ -705,7 +705,7 @@ bool CGUIDialogNumeric::ShowAndVerifyNewPassword(CStdString& strNewPassword)
     return false;
   }
 
-  if (strUserInput.IsEmpty())
+  if (strUserInput.empty())
     // user canceled out
     return false;
 
@@ -739,7 +739,7 @@ int CGUIDialogNumeric::ShowAndVerifyPassword(CStdString& strPassword, const CStd
   CStdString strPassTemp = strPassword;
   if (ShowAndVerifyInput(strPassTemp, strTempHeading, true))
     return 0;   // user entered correct password
-  if (strPassTemp.IsEmpty()) return -1;   // user canceled out
+  if (strPassTemp.empty()) return -1;   // user canceled out
   return 1; // user must have entered an incorrect password
 }
 
index 0fb1503..a7e49d1 100644 (file)
@@ -115,7 +115,7 @@ bool CGUIDialogPlayEject::ShowAndGetInput(const CFileItem & item,
   }
 
   // Use the label for Line 1 if not defined
-  if (strLine1.IsEmpty())
+  if (strLine1.empty())
     strLine1 = item.GetLabel();
 
   // Setup dialog parameters
index d2dbba4..5080d1a 100644 (file)
@@ -161,7 +161,7 @@ void CGUIDialogSmartPlaylistEditor::OnRuleList(int item)
 void CGUIDialogSmartPlaylistEditor::OnOK()
 {
   // save our playlist
-  if (m_path.IsEmpty())
+  if (m_path.empty())
   {
     CStdString filename(CUtil::MakeLegalFileName(m_playlist.m_playlistName));
     CStdString path;
index a538a5d..8fad897 100644 (file)
@@ -679,7 +679,7 @@ bool CEpg::UpdateFromScraper(time_t start, time_t end)
       bGrabSuccess = (g_PVRClients->GetEPGForChannel(*channel, this, start, end) == PVR_ERROR_NO_ERROR);
     }
   }
-  else if (m_strScraperName.IsEmpty()) /* no grabber defined */
+  else if (m_strScraperName.empty()) /* no grabber defined */
     CLog::Log(LOGWARNING, "EPG - %s - no EPG scraper defined for table '%s'", __FUNCTION__, m_strName.c_str());
   else
   {
index d518b19..6c4137c 100644 (file)
@@ -294,7 +294,7 @@ bool CEpgDatabase::GetLastEpgScanTime(int iEpgId, CDateTime *lastScan)
   CStdString strWhereClause = FormatSQL("idEpg = %u", iEpgId);
   CStdString strValue = GetSingleValue("lastepgscan", "sLastScan", strWhereClause);
 
-  if (!strValue.IsEmpty())
+  if (!strValue.empty())
   {
     lastScan->SetFromDBDateTime(strValue.c_str());
     bReturn = true;
index 45f8e3e..60a767f 100644 (file)
@@ -97,7 +97,7 @@ bool EpgSearchFilter::MatchSearchTerm(const CEpgInfoTag &tag) const
 {
   bool bReturn(true);
 
-  if (!m_strSearchTerm.IsEmpty())
+  if (!m_strSearchTerm.empty())
   {
     CTextSearch search(m_strSearchTerm, m_bIsCaseSensitive, SEARCH_DEFAULT_OR);
     bReturn = search.Search(tag.Title()) ||
index 9f36552..38a8412 100644 (file)
@@ -127,7 +127,7 @@ bool CAFPDirectory::GetDirectory(const CStdString& strPath, CFileItemList &items
   CURL url(strPath);
   CAfpConnection::afpConnnectError afpError = gAfpConnection.Connect(url);
 
-  if (afpError != CAfpConnection::AfpOk || (!url.GetShareName().IsEmpty() && !gAfpConnection.GetVolume()))
+  if (afpError != CAfpConnection::AfpOk || (!url.GetShareName().empty() && !gAfpConnection.GetVolume()))
   {
     if (afpError == CAfpConnection::AfpAuth)
     {
@@ -145,7 +145,7 @@ bool CAFPDirectory::GetDirectory(const CStdString& strPath, CFileItemList &items
   struct afp_file_info *curDirPtr = NULL;
 
   // if no share name in url - try to fetch the volumes on the server and treat them like folders
-  if (url.GetShareName().IsEmpty())
+  if (url.GetShareName().empty())
   {
     bListVolumes = true;
     struct afp_server *serv = gAfpConnection.GetServer();
index 204352b..7002903 100644 (file)
@@ -234,14 +234,14 @@ CAfpConnection::afpConnnectError CAfpConnection::Connect(const CURL& url)
     strncpy(m_pAfpUrl->uamname, "No User Authent", sizeof(m_pAfpUrl->uamname));
     CLog::Log(LOGDEBUG, "AFP: Using anonymous authentication.");
   }
-  else if ((nonConstUrl.GetPassWord().IsEmpty() || nonConstUrl.GetUserName().IsEmpty()) && serverChanged)
+  else if ((nonConstUrl.GetPassWord().empty() || nonConstUrl.GetUserName().empty()) && serverChanged)
   {
     // this is our current url object whe are connected to (at least we try)
     return AfpAuth;
   }
 
   // we got a password in the url
-  if (!nonConstUrl.GetPassWord().IsEmpty())
+  if (!nonConstUrl.GetPassWord().empty())
   {
     // copy password because afp_parse_url just puts garbage into the password field :(
     strncpy(m_pAfpUrl->password, nonConstUrl.GetPassWord().c_str(), 127);
@@ -330,14 +330,14 @@ int CAfpConnection::stat(const CURL &url, struct stat *statbuff)
     strncpy(tmpurl.uamname, "No User Authent", sizeof(tmpurl.uamname));
     CLog::Log(LOGDEBUG, "AFP: Using anonymous authentication.");
   }
-  else if ((nonConstUrl.GetPassWord().IsEmpty() || nonConstUrl.GetUserName().IsEmpty()))
+  else if ((nonConstUrl.GetPassWord().empty() || nonConstUrl.GetUserName().empty()))
   {
     // this is our current url object whe are connected to (at least we try)
     return -1;
   }
 
   // we got a password in the url
-  if (!nonConstUrl.GetPassWord().IsEmpty())
+  if (!nonConstUrl.GetPassWord().empty())
   {
     // copy password because afp_parse_url just puts garbage into the password field :(
     strncpy(tmpurl.password, nonConstUrl.GetPassWord().c_str(), 127);
index b3f2383..cbf256e 100644 (file)
@@ -247,7 +247,7 @@ int CAPKFile::Stat(const CURL& url, struct __stat64* buffer)
     for (int i = 0; i < numFiles; i++)
     {
       CStdString name = zip_get_name(zip_archive, i, zip_flags);
-      if (!name.IsEmpty() && name.Left(path.size()).Equals(path))
+      if (!name.empty() && name.Left(path.size()).Equals(path))
       {
         buffer->st_gid  = 0;
         buffer->st_mode = _S_IFDIR;
index ee858f5..efb994a 100644 (file)
@@ -99,7 +99,7 @@ bool CAddonsDirectory::GetDirectory(const CStdString& strPath, CFileItemList &it
   else if (path.GetHostName().Equals("search"))
   {
     CStdString search(path.GetFileName());
-    if (search.IsEmpty() && !GetKeyboardInput(16017, search))
+    if (search.empty() && !GetKeyboardInput(16017, search))
       return false;
 
     items.SetProperty("reponame",g_localizeStrings.Get(283));
@@ -131,7 +131,7 @@ bool CAddonsDirectory::GetDirectory(const CStdString& strPath, CFileItemList &it
     items.SetLabel(addon->Name());
   }
 
-  if (path.GetFileName().IsEmpty())
+  if (path.GetFileName().empty())
   {
     if (!path.GetHostName().Equals("repos"))
     {
@@ -145,7 +145,7 @@ bool CAddonsDirectory::GetDirectory(const CStdString& strPath, CFileItemList &it
             item->SetPath(URIUtils::AddFileToFolder(strPath,TranslateType((TYPE)i,false)));
             item->m_bIsFolder = true;
             CStdString thumb = GetIcon((TYPE)i);
-            if (!thumb.IsEmpty() && g_TextureManager.HasTexture(thumb))
+            if (!thumb.empty() && g_TextureManager.HasTexture(thumb))
               item->SetArt("thumb", thumb);
             items.Add(item);
             break;
index 4cb578a..a8ef702 100644 (file)
@@ -474,7 +474,7 @@ void CCurlFile::SetCommonOptions(CReadState* state)
   g_curlInterface.easy_setopt(h, CURLOPT_COOKIEJAR, strCookieFile.c_str());
 
   // Set custom cookie if requested
-  if (!m_cookie.IsEmpty())
+  if (!m_cookie.empty())
     g_curlInterface.easy_setopt(h, CURLOPT_COOKIE, m_cookie.c_str());
 
   g_curlInterface.easy_setopt(h, CURLOPT_COOKIELIST, "FLUSH");
@@ -512,7 +512,7 @@ void CCurlFile::SetCommonOptions(CReadState* state)
   }
 
   // setup Referer header if needed
-  if (!m_referer.IsEmpty())
+  if (!m_referer.empty())
     g_curlInterface.easy_setopt(h, CURLOPT_REFERER, m_referer.c_str());
   else
   {
@@ -660,7 +660,7 @@ void CCurlFile::ParseAndCorrectUrl(CURL &url2)
   ||  strProtocol.Equals("ftps") )
   {
     // we was using url optons for urls, keep the old code work and warning
-    if (!url2.GetOptions().IsEmpty())
+    if (!url2.GetOptions().empty())
     {
       CLog::Log(LOGWARNING, "%s: ftp url option is deprecated, please switch to use protocol option (change '?' to '|'), url: [%s]", __FUNCTION__, url2.GetRedacted().c_str());
       url2.SetProtocolOptions(url2.GetOptions().Mid(1));
@@ -703,14 +703,14 @@ void CCurlFile::ParseAndCorrectUrl(CURL &url2)
     if (url2.HasProtocolOption("auth"))
     {
       m_ftpauth = url2.GetProtocolOption("auth");
-      if(m_ftpauth.IsEmpty())
+      if(m_ftpauth.empty())
         m_ftpauth = "any";
     }
     m_ftpport = "";
     if (url2.HasProtocolOption("active"))
     {
       m_ftpport = url2.GetProtocolOption("active");
-      if(m_ftpport.IsEmpty())
+      if(m_ftpport.empty())
         m_ftpport = "-";
     }
     m_ftppasvip = url2.HasProtocolOption("pasvip") && url2.GetProtocolOption("pasvip") != "0";
@@ -721,11 +721,11 @@ void CCurlFile::ParseAndCorrectUrl(CURL &url2)
     if (CSettings::Get().GetBool("network.usehttpproxy")
         && !CSettings::Get().GetString("network.httpproxyserver").empty()
         && CSettings::Get().GetInt("network.httpproxyport") > 0
-        && m_proxy.IsEmpty())
+        && m_proxy.empty())
     {
       m_proxy = CSettings::Get().GetString("network.httpproxyserver");
       m_proxy.AppendFormat(":%d", CSettings::Get().GetInt("network.httpproxyport"));
-      if (CSettings::Get().GetString("network.httpproxyusername").length() > 0 && m_proxyuserpass.IsEmpty())
+      if (CSettings::Get().GetString("network.httpproxyusername").length() > 0 && m_proxyuserpass.empty())
       {
         m_proxyuserpass = CSettings::Get().GetString("network.httpproxyusername");
         m_proxyuserpass += ":" + CSettings::Get().GetString("network.httpproxypassword");
@@ -754,7 +754,7 @@ void CCurlFile::ParseAndCorrectUrl(CURL &url2)
         if(name.Equals("auth"))
         {
           m_httpauth = value;
-          if(m_httpauth.IsEmpty())
+          if(m_httpauth.empty())
             m_httpauth = "any";
         }
         else if (name.Equals("Referer"))
@@ -1580,7 +1580,7 @@ bool CCurlFile::GetHttpHeader(const CURL &url, CHttpHeader &headers)
 bool CCurlFile::GetMimeType(const CURL &url, CStdString &content, CStdString useragent)
 {
   CCurlFile file;
-  if (!useragent.IsEmpty())
+  if (!useragent.empty())
     file.SetUserAgent(useragent);
 
   struct __stat64 buffer;
index c0a3654..2385544 100644 (file)
@@ -163,7 +163,7 @@ bool CDAVDirectory::GetDirectory(const CStdString& strPath, CFileItemList &items
 
       CStdString itemPath(URIUtils::AddFileToFolder(url2.GetWithoutFilename(), url3.GetFileName()));
 
-      if (item.GetLabel().IsEmpty())
+      if (item.GetLabel().empty())
       {
         CStdString name(itemPath);
         URIUtils::RemoveSlashAtEnd(name);
@@ -175,7 +175,7 @@ bool CDAVDirectory::GetDirectory(const CStdString& strPath, CFileItemList &items
         URIUtils::AddSlashAtEnd(itemPath);
 
       // Add back protocol options
-      if (!url2.GetProtocolOptions().IsEmpty())
+      if (!url2.GetProtocolOptions().empty())
         itemPath += "|" + url2.GetProtocolOptions();
       item.SetPath(itemPath);
 
index 8419b66..0b9d275 100644 (file)
@@ -40,7 +40,7 @@ bool CFTPDirectory::GetDirectory(const CStdString& strPath, CFileItemList &items
   CURL url(strPath);
 
   CStdString path = url.GetFileName();
-  if( !path.IsEmpty() && !StringUtils::EndsWith(path, "/") )
+  if( !path.empty() && !StringUtils::EndsWith(path, "/") )
   {
     path += "/";
     url.SetFileName(path);
@@ -79,7 +79,7 @@ bool CFTPDirectory::GetDirectory(const CStdString& strPath, CFileItemList &items
       g_charsetConverter.unknownToUTF8(name);
 
       // convert got empty result, ignore it
-      if (name.IsEmpty())
+      if (name.empty())
         continue;
 
       if (serverNotUseUTF8 || name != parse.getName())
index 540feaa..bf80cf4 100644 (file)
@@ -159,7 +159,7 @@ bool CFavouritesDirectory::AddOrRemove(CFileItem *item, int contextWindow)
   else
   { // create our new favourite item
     CFileItemPtr favourite(new CFileItem(item->GetLabel()));
-    if (item->GetLabel().IsEmpty())
+    if (item->GetLabel().empty())
       favourite->SetLabel(CUtil::GetTitleFromPath(item->GetPath(), item->m_bIsFolder));
     favourite->SetArt("thumb", item->GetArt("thumb"));
     favourite->SetPath(executePath);
index 3dc2fa4..5c80df7 100644 (file)
@@ -169,7 +169,7 @@ bool CFile::Cache(const CStdString& strFileName, const CStdString& strDest, XFIL
         StringUtils::Tokenize(url.GetFileName(),tokens,pathsep.c_str());
         CStdString strCurrPath;
         // Handle special
-        if (!url.GetProtocol().IsEmpty()) {
+        if (!url.GetProtocol().empty()) {
           pathsep = "/";
           strCurrPath += url.GetProtocol() + "://";
         } // If the directory has a / at the beginning, don't forget it
@@ -419,7 +419,7 @@ bool CFile::Exists(const CStdString& strFileName, bool bUseCache /* = true */)
   
   try
   {
-    if (strFileName.IsEmpty())
+    if (strFileName.empty())
       return false;
 
     if (bUseCache)
index b0e55af..fdf97b1 100644 (file)
@@ -136,7 +136,7 @@ IFile* CFileFactory::CreateLoader(const CURL& url)
   else if (strProtocol == "special") return new CSpecialProtocolFile();
   else if (strProtocol == "multipath") return new CMultiPathFile();
   else if (strProtocol == "image") return new CImageFile();
-  else if (strProtocol == "file" || strProtocol.IsEmpty()) return new CHDFile();
+  else if (strProtocol == "file" || strProtocol.empty()) return new CHDFile();
   else if (strProtocol == "filereader") return new CFileReaderFile();
 #if defined(HAS_FILESYSTEM_CDDA) && defined(HAS_DVD_DRIVE)
   else if (strProtocol == "cdda") return new CFileCDDA();
index 83da54a..8046375 100644 (file)
@@ -51,7 +51,7 @@ bool CHomeRunDirectory::GetDirectory(const CStdString& strPath, CFileItemList &i
 
   CURL url(strPath);
 
-  if(url.GetHostName().IsEmpty())
+  if(url.GetHostName().empty())
   {
     // no hostname, list all available devices
     int target_ip = 0;
index 524be38..252f5b5 100644 (file)
@@ -171,7 +171,7 @@ bool CHTSPDirectorySession::Open(const CURL& url)
     return false;
   }
 
-  if(!url.GetUserName().IsEmpty())
+  if(!url.GetUserName().empty())
     m_session.Auth(url.GetUserName(), url.GetPassWord());
 
   if(!m_session.SendEnableAsync())
@@ -425,7 +425,7 @@ bool CHTSPDirectory::GetDirectory(const CStdString& strPath, CFileItemList &item
     return false;
 
 
-  if(url.GetFileName().IsEmpty())
+  if(url.GetFileName().empty())
   {
     CFileItemPtr item;
 
index c32f52d..1a423d1 100644 (file)
@@ -138,7 +138,7 @@ bool IDirectory::ProcessRequirements()
 
 bool IDirectory::GetKeyboardInput(const CVariant &heading, CStdString &input)
 {
-  if (!CStdString(m_requirements["input"].asString()).IsEmpty())
+  if (!m_requirements["input"].asString().empty())
   {
     input = m_requirements["input"].asString();
     return true;
index d4d134b..96f3c38 100644 (file)
@@ -40,11 +40,11 @@ bool CImageFile::Open(const CURL& url)
   CStdString file = url.Get();
   bool needsRecaching = false;
   CStdString cachedFile = CTextureCache::Get().CheckCachedImage(file, false, needsRecaching);
-  if (cachedFile.IsEmpty())
+  if (cachedFile.empty())
   { // not in the cache, so cache it
     cachedFile = CTextureCache::Get().CacheImage(file);
   }
-  if (!cachedFile.IsEmpty())
+  if (!cachedFile.empty())
   { // in the cache, return what we have
     if (m_file.Open(cachedFile))
       return true;
@@ -56,7 +56,7 @@ bool CImageFile::Exists(const CURL& url)
 {
   bool needsRecaching = false;
   CStdString cachedFile = CTextureCache::Get().CheckCachedImage(url.Get(), false, needsRecaching);
-  if (!cachedFile.IsEmpty())
+  if (!cachedFile.empty())
     return CFile::Exists(cachedFile);
 
   // need to check if the original can be cached on demand and that the file exists 
@@ -70,7 +70,7 @@ int CImageFile::Stat(const CURL& url, struct __stat64* buffer)
 {
   bool needsRecaching = false;
   CStdString cachedFile = CTextureCache::Get().CheckCachedImage(url.Get(), false, needsRecaching);
-  if (!cachedFile.IsEmpty())
+  if (!cachedFile.empty())
     return CFile::Stat(cachedFile, buffer);
 
   /* 
index d3adb35..39c5b15 100644 (file)
@@ -62,7 +62,7 @@ bool CLibraryDirectory::GetDirectory(const CStdString& strPath, CFileItemList &i
         CSmartPlaylist playlist;
         CStdString type, label;
         XMLUtils::GetString(node, "content", type);
-        if (type.IsEmpty())
+        if (type.empty())
         {
           CLog::Log(LOGERROR, "<content> tag must not be empty for type=\"filter\" node '%s'", libNode.c_str());
           return false;
@@ -83,7 +83,7 @@ bool CLibraryDirectory::GetDirectory(const CStdString& strPath, CFileItemList &i
       {
         CStdString path;
         XMLUtils::GetPath(node, "path", path);
-        if (!path.IsEmpty())
+        if (!path.empty())
         {
           URIUtils::AddSlashAtEnd(path);
           return CDirectory::GetDirectory(path, items, m_strFileMask, m_flags);
@@ -132,7 +132,7 @@ bool CLibraryDirectory::GetDirectory(const CStdString& strPath, CFileItemList &i
       CFileItemPtr item(new CFileItem(URIUtils::AddFileToFolder(strPath, folder), true));
 
       item->SetLabel(label);
-      if (!icon.IsEmpty() && g_TextureManager.HasTexture(icon))
+      if (!icon.empty() && g_TextureManager.HasTexture(icon))
         item->SetIconImage(icon);
       item->m_iprogramCount = order;
       items.Add(item);
index 67e2bd7..34e38ec 100644 (file)
@@ -59,7 +59,7 @@ bool CMusicDatabaseDirectory::GetDirectory(const CStdString& strPath, CFileItemL
     if (item->m_bIsFolder && !item->HasIcon() && !item->HasArt("thumb"))
     {
       CStdString strImage = GetIcon(item->GetPath());
-      if (!strImage.IsEmpty() && g_TextureManager.HasTexture(strImage))
+      if (!strImage.empty() && g_TextureManager.HasTexture(strImage))
         item->SetIconImage(strImage);
     }
   }
@@ -162,7 +162,7 @@ bool CMusicDatabaseDirectory::GetLabel(const CStdString& strDirectory, CStdStrin
   // get artist
   if (params.GetArtistId() >= 0)
   {
-    if (!strLabel.IsEmpty())
+    if (!strLabel.empty())
       strLabel += " / ";
     strLabel += musicdatabase.GetArtistById(params.GetArtistId());
   }
@@ -170,12 +170,12 @@ bool CMusicDatabaseDirectory::GetLabel(const CStdString& strDirectory, CStdStrin
   // get album
   if (params.GetAlbumId() >= 0)
   {
-    if (!strLabel.IsEmpty())
+    if (!strLabel.empty())
       strLabel += " / ";
     strLabel += musicdatabase.GetAlbumById(params.GetAlbumId());
   }
 
-  if (strLabel.IsEmpty())
+  if (strLabel.empty())
   {
     switch (pNode->GetChildType())
     {
index f7c3433..acc930d 100644 (file)
@@ -73,7 +73,7 @@ CDirectoryNode* CDirectoryNode::ParseURL(const CStdString& strPath)
 
   CStdStringArray Path;
   StringUtils::SplitString(strDirectory, "/", Path);
-  if (!strDirectory.IsEmpty())
+  if (!strDirectory.empty())
     Path.insert(Path.begin(), "");
 
   CDirectoryNode* pNode=NULL;
@@ -202,14 +202,14 @@ CStdString CDirectoryNode::BuildPath() const
 {
   CStdStringArray array;
 
-  if (!m_strName.IsEmpty())
+  if (!m_strName.empty())
     array.insert(array.begin(), m_strName);
 
   CDirectoryNode* pParent=m_pParent;
   while (pParent!=NULL)
   {
     const CStdString& strNodeName=pParent->GetName();
-    if (!strNodeName.IsEmpty())
+    if (!strNodeName.empty())
       array.insert(array.begin(), strNodeName);
 
     pParent=pParent->GetParent();
index c4746ab..a850aa5 100644 (file)
@@ -69,7 +69,7 @@ bool CMusicDatabaseFile::Open(const CURL& url)
 
 bool CMusicDatabaseFile::Exists(const CURL& url)
 {
-  return !TranslateUrl(url).IsEmpty();
+  return !TranslateUrl(url).empty();
 }
 
 int CMusicDatabaseFile::Stat(const CURL& url, struct __stat64* buffer)
index 78045f3..4ee05c9 100644 (file)
@@ -44,7 +44,7 @@ bool CMusicSearchDirectory::GetDirectory(const CStdString& strPath, CFileItemLis
   CURL url(strPath);
   CStdString search(url.GetHostName());
 
-  if (search.IsEmpty())
+  if (search.empty())
     return false;
 
   // and retrieve the search details
index 566950a..a219630 100644 (file)
@@ -133,11 +133,11 @@ bool CMythDirectory::GetGuide(const CStdString& base, CFileItemList &items)
       url.SetFileName("guide/" + number);
       CFileItemPtr item(new CFileItem(url.Get(), true));
       item->m_strTitle = number;
-      if (!name.IsEmpty())
+      if (!name.empty())
         item->m_strTitle += " - " + name; // e.g. 3 - TV3
 
       CStdString icon = GetValue(m_dll->channel_icon(channel));
-      if (!icon.IsEmpty())
+      if (!icon.empty())
       {
         url.SetFileName("files/channels/" + URIUtils::GetFileName(icon)); // e.g. files/channels/tv3.jpg
         item->SetArt("thumb", url.Get());
@@ -192,7 +192,7 @@ bool CMythDirectory::GetGuideForChannel(const CStdString& base, CFileItemList &i
       item->m_strTitle = StringUtils::Format("%s - %s",
                                              localstart.GetAsLocalizedTime("HH:mm", false).c_str(),
                                              title.c_str()); // e.g. 20:30 - Mythbusters
-      if (!subtitle.IsEmpty())
+      if (!subtitle.empty())
         item->m_strTitle     += " - \"" + subtitle + "\""; // e.g. 20:30 - Mythbusters - "The Pirate Special"
       item->m_dateTime        = localstart;
 
@@ -201,7 +201,7 @@ bool CMythDirectory::GetGuideForChannel(const CStdString& base, CFileItemList &i
        */
       CVideoInfoTag* tag      = item->GetVideoInfoTag();
       tag->m_strTitle         = title;
-      if (!subtitle.IsEmpty())
+      if (!subtitle.empty())
         tag->m_strTitle      += " - \"" + subtitle + "\""; // e.g. Mythbusters - "The Pirate Special"
       tag->m_strShowTitle     = title;
       tag->m_strOriginalTitle = title;
index e626bb4..594fc1e 100644 (file)
@@ -143,7 +143,7 @@ void CMythSession::SetFileItemMetaData(CFileItem &item, cmyth_proginfo_t program
   CStdString title        = GetValue(m_dll->proginfo_title(program)); // e.g. Mythbusters
   CStdString subtitle     = GetValue(m_dll->proginfo_subtitle(program)); // e.g. The Pirate Special
   item.m_strTitle         = title;
-  if (!subtitle.IsEmpty())
+  if (!subtitle.empty())
     item.m_strTitle      += " - \"" + subtitle + "\""; // e.g. Mythbusters - "The Pirate Special"
   item.m_dateTime         = GetValue(m_dll->proginfo_rec_start(program));
   item.m_dwSize           = m_dll->proginfo_length(program); // size in bytes
@@ -162,7 +162,7 @@ void CMythSession::SetFileItemMetaData(CFileItem &item, cmyth_proginfo_t program
    * subtitle to the start of the plot if not already as it used to? Seems strange, should be
    * handled by skin?
    *
-  if (tag->m_strPlot.Left(tag->m_strPlotOutline.length()) != tag->m_strPlotOutline && !tag->m_strPlotOutline.IsEmpty())
+  if (tag->m_strPlot.Left(tag->m_strPlotOutline.length()) != tag->m_strPlotOutline && !tag->m_strPlotOutline.empty())
     tag->m_strPlot = tag->m_strPlotOutline + '\n' + tag->m_strPlot;
    */
   tag->m_genre            = StringUtils::Split(GetValue(m_dll->proginfo_category(program)), g_advancedSettings.m_videoItemSeparator); // e.g. Sports
@@ -209,7 +209,7 @@ void CMythSession::SetFileItemMetaData(CFileItem &item, cmyth_proginfo_t program
      * within the OSD.
      */
     CStdString name = GetValue(m_dll->proginfo_chansign(program));
-    if (!name.IsEmpty())
+    if (!name.empty())
       tag->m_strTitle += " - " + name;
 
     /*
@@ -226,13 +226,13 @@ void CMythSession::SetFileItemMetaData(CFileItem &item, cmyth_proginfo_t program
      * Update the path and channel icon for LiveTV in case the channel has changed through
      * NextChannel(), PreviousChannel() or SetChannel().
      */
-    if (!number.IsEmpty())
+    if (!number.empty())
     {
       url.SetFileName("channels/" + number + ".ts"); // e.g. channels/3.ts
       item.SetPath(url.Get());
     }
     CStdString chanicon = GetValue(m_dll->proginfo_chanicon(program));
-    if (!chanicon.IsEmpty())
+    if (!chanicon.empty())
     {
       url.SetFileName("files/channels/" + URIUtils::GetFileName(chanicon)); // e.g. files/channels/tv3.jpg
       item.SetArt("thumb", url.Get());
@@ -277,8 +277,8 @@ void CMythSession::SetSeasonAndEpisode(const cmyth_proginfo_t &program, int *sea
   *season  = 0;
   *episode = 0;
   
-  if (programid.IsEmpty() // Can't do anything if the program ID is empty
-  ||  seriesid.IsEmpty()) // Can't figure out the end parsing if the series ID is empty  {
+  if (programid.empty() // Can't do anything if the program ID is empty
+  ||  seriesid.empty()) // Can't figure out the end parsing if the series ID is empty  {
     return;
   
   CStdString category = programid.Left(2); // Valid for both XMLTV and SchedulesDirect sources
index d223a4d..a3a69f7 100644 (file)
@@ -220,7 +220,7 @@ CStdString CPVRFile::TranslatePVRFilename(const CStdString& pathFile)
     if (channel && channel->HasPVRChannelInfoTag())
     {
       CStdString stream = channel->GetPVRChannelInfoTag()->StreamURL();
-      if(!stream.IsEmpty())
+      if(!stream.empty())
       {
         if (stream.compare(6, 7, "stream/") == 0)
         {
index ba8309a..d17fac6 100644 (file)
@@ -290,7 +290,7 @@ CStdString   PipesManager::GetUniquePipeName()
 XFILE::Pipe *PipesManager::CreatePipe(const CStdString &name, int nMaxPipeSize)
 {
   CStdString pName = name;
-  if (pName.IsEmpty())
+  if (pName.empty())
     pName = GetUniquePipeName();
   
   CSingleLock lock(m_lock);
index 2040c28..50dd45a 100644 (file)
@@ -418,7 +418,7 @@ bool CPluginDirectory::GetDirectory(const CStdString& strPath, CFileItemList& it
 bool CPluginDirectory::RunScriptWithParams(const CStdString& strPath)
 {
   CURL url(strPath);
-  if (url.GetHostName().IsEmpty()) // called with no script - should never happen
+  if (url.GetHostName().empty()) // called with no script - should never happen
     return false;
 
   AddonPtr addon;
index 8c4df40..3e66177 100644 (file)
@@ -154,7 +154,7 @@ static void ParseItemMRSS(CFileItem* item, SResources& resources, TiXmlElement*
   }
   else if (name == "title")
   {
-    if(text.IsEmpty())
+    if(text.empty())
       return;
 
     if(text.length() > item->m_strTitle.length())
@@ -162,7 +162,7 @@ static void ParseItemMRSS(CFileItem* item, SResources& resources, TiXmlElement*
   }
   else if(name == "description")
   {
-    if(text.IsEmpty())
+    if(text.empty())
       return;
 
     CStdString description = text;
@@ -172,7 +172,7 @@ static void ParseItemMRSS(CFileItem* item, SResources& resources, TiXmlElement*
   }
   else if(name == "category")
   {
-    if(text.IsEmpty())
+    if(text.empty())
       return;
 
     CStdString scheme = item_child->Attribute("scheme");
@@ -530,7 +530,7 @@ static void ParseItem(CFileItem* item, TiXmlElement* root, const CStdString& pat
       item->m_bIsFolder = false;
   }
 
-  if(!item->m_strTitle.IsEmpty())
+  if(!item->m_strTitle.empty())
     item->SetLabel(item->m_strTitle);
 
   if(item->HasVideoInfoTag())
@@ -540,10 +540,10 @@ static void ParseItem(CFileItem* item, TiXmlElement* root, const CStdString& pat
     if(item->HasProperty("duration")    && !vtag->GetDuration())
       vtag->m_duration = StringUtils::TimeStringToSeconds(item->GetProperty("duration").asString());
 
-    if(item->HasProperty("description") && vtag->m_strPlot.IsEmpty())
+    if(item->HasProperty("description") && vtag->m_strPlot.empty())
       vtag->m_strPlot = item->GetProperty("description").asString();
 
-    if(vtag->m_strPlotOutline.IsEmpty() && !vtag->m_strPlot.IsEmpty())
+    if(vtag->m_strPlotOutline.empty() && !vtag->m_strPlot.empty())
     {
       int pos = vtag->m_strPlot.Find('\n');
       if(pos >= 0)
@@ -609,7 +609,7 @@ bool CRSSDirectory::GetDirectory(const CStdString& path, CFileItemList &items)
     if (!item->HasArt("thumb") && items.HasArt("thumb"))
       item->SetArt("thumb", items.GetArt("thumb"));
 
-    if (!item->GetPath().IsEmpty())
+    if (!item->GetPath().empty())
       items.Add(item);
   }
 
index 6458b84..ef942be 100644 (file)
@@ -140,7 +140,7 @@ bool CRarManager::CacheRarredFile(CStdString& strPathInCache, const CStdString&
   CStdString strCachedPath = URIUtils::AddFileToFolder(strDir + "rarfolder%04d",
                                            URIUtils::GetFileName(strPathInRar));
   strCachedPath = CUtil::GetNextPathname(strCachedPath, 9999);
-  if (strCachedPath.IsEmpty())
+  if (strCachedPath.empty())
   {
     CLog::Log(LOGWARNING, "Could not cache file %s", (strRarPath + strPathInRar).c_str());
     return false;
@@ -255,7 +255,7 @@ bool CRarManager::GetFilesInRar(CFileItemList& vecpItems, const CStdString& strR
 
   ArchiveList_struct* pIterator;
   CStdString strCompare = strPathInRar;
-  if (!URIUtils::HasSlashAtEnd(strCompare) && !strCompare.IsEmpty())
+  if (!URIUtils::HasSlashAtEnd(strCompare) && !strCompare.empty())
     strCompare += '/';
   for( pIterator = pFileList; pIterator  ; pIterator ? pIterator = pIterator->next : NULL)
   {
index 1624238..9461673 100644 (file)
@@ -441,7 +441,7 @@ CStdString CSMBDirectory::MountShare(const CStdString &smbPath, const CStdString
 
   CStdString strCmd = "mount -t cifs " + smbPath + " " + strMountPoint +
     " -o rw,nobrl,directio";
-  if (!strUser.IsEmpty())
+  if (!strUser.empty())
     strCmd += ",user=" + strUser + ",password=" + strPass;
   else
     strCmd += ",guest";
index ddc7bf8..d6dafc6 100644 (file)
@@ -76,7 +76,7 @@ bool CShoutcastFile::Open(const CURL& url)
   if (result)
   {
     m_tag.SetTitle(m_file.GetHttpHeader().GetValue("icy-name"));
-    if (m_tag.GetTitle().IsEmpty())
+    if (m_tag.GetTitle().empty())
       m_tag.SetTitle(m_file.GetHttpHeader().GetValue("ice-name")); // icecast
     m_tag.SetGenre(m_file.GetHttpHeader().GetValue("icy-genre"));
     if (m_tag.GetGenre().empty())
index 5537724..f1d4cce 100644 (file)
@@ -160,13 +160,13 @@ namespace XFILE
         items.SetProperty(PROPERTY_PATH_DB, videoUrl.ToString());
       }
     }
-    else if (playlist.IsMusicType() || playlist.GetType().IsEmpty())
+    else if (playlist.IsMusicType() || playlist.GetType().empty())
     {
       CMusicDatabase db;
       if (db.Open())
       {
         CSmartPlaylist plist(playlist);
-        if (playlist.GetType().Equals("mixed") || playlist.GetType().IsEmpty())
+        if (playlist.GetType().Equals("mixed") || playlist.GetType().empty())
           plist.SetType("songs");
 
         MediaType mediaType = DatabaseUtils::MediaTypeFromString(plist.GetType());
index 7eaef99..27838d8 100644 (file)
@@ -71,7 +71,7 @@ bool CSourcesDirectory::GetDirectory(const VECSOURCES &sources, CFileItemList &i
     
     CStdString strIcon;
     // We have the real DVD-ROM, set icon on disktype
-    if (share.m_iDriveType == CMediaSource::SOURCE_TYPE_DVD && share.m_strThumbnailImage.IsEmpty())
+    if (share.m_iDriveType == CMediaSource::SOURCE_TYPE_DVD && share.m_strThumbnailImage.empty())
     {
       CUtil::GetDVDDriveIcon( pItem->GetPath(), strIcon );
       // CDetectDVDMedia::SetNewDVDShareUrl() caches disc thumb as special://temp/dvdicon.tbn
index dac8c76..6067a9c 100644 (file)
@@ -162,7 +162,7 @@ CStdString CSpecialProtocol::TranslatePath(const CURL &url)
            RootDir.Equals("frameworks"))
   {
     CStdString basePath = GetPath(RootDir);
-    if (!basePath.IsEmpty())
+    if (!basePath.empty())
       translatedPath = URIUtils::AddFileToFolder(basePath, FileName);
     else
       translatedPath.clear();
@@ -250,7 +250,7 @@ void CSpecialProtocol::LogPaths()
   CLog::Log(LOGNOTICE, "special://home/ is mapped to: %s", GetPath("home").c_str());
   CLog::Log(LOGNOTICE, "special://temp/ is mapped to: %s", GetPath("temp").c_str());
   //CLog::Log(LOGNOTICE, "special://userhome/ is mapped to: %s", GetPath("userhome").c_str());
-  if (!CUtil::GetFrameworksPath().IsEmpty())
+  if (!CUtil::GetFrameworksPath().empty())
     CLog::Log(LOGNOTICE, "special://frameworks/ is mapped to: %s", GetPath("frameworks").c_str());
 }
 
index 8b32337..7a96eea 100644 (file)
@@ -87,7 +87,7 @@ bool CTuxBoxDirectory::GetDirectory(const CStdString& strPath, CFileItemList &it
       url.SetFileName(strBQRequest);
     }
   }
-  if(strFilter.IsEmpty())
+  if(strFilter.empty())
   {
     url.SetOptions("");
     url.SetFileName(strBQRequest);
@@ -145,7 +145,7 @@ bool CTuxBoxDirectory::GetDirectory(const CStdString& strPath, CFileItemList &it
         else
           result = g_tuxbox.ParseBouquets(root, items, url, strFilter, strXMLChildString);
       }
-      else if( strXMLRootString.Equals(root->Value()) && !strFilter.IsEmpty() )
+      else if( strXMLRootString.Equals(root->Value()) && !strFilter.empty() )
       {
         data.clear();
         if (enigma2)
@@ -229,7 +229,7 @@ bool CTuxBoxDirectory::GetRootAndChildString(const CStdString strPath, CStdStrin
       {
         //PopUp Context and Request SubMode with root and child string
         strBQRequest = g_tuxbox.GetSubMode(g_advancedSettings.m_iTuxBoxDefaultRootMenu, strXMLRootString, strXMLChildString);
-        if(strBQRequest.IsEmpty())
+        if(strBQRequest.empty())
         {
           strBQRequest = "xml/services?mode=0&submode=4"; //Bouquets
           strXMLRootString = StringUtils::Format("bouquets");
@@ -270,7 +270,7 @@ bool CTuxBoxDirectory::GetRootAndChildString(const CStdString strPath, CStdStrin
       }
     }
   }
-  if(strBQRequest.IsEmpty() || strXMLRootString.IsEmpty() || strXMLChildString.IsEmpty())
+  if(strBQRequest.empty() || strXMLRootString.empty() || strXMLChildString.empty())
     return false;
   else
     return true;
index 223e3ed..f00c982 100644 (file)
@@ -246,7 +246,7 @@ CUPnPDirectory::GetDirectory(const CStdString& strPath, CFileItemList &items)
         bool audio = true;
         bool image = true;
         m_strFileMask.TrimLeft("/");
-        if (!m_strFileMask.IsEmpty()) {
+        if (!m_strFileMask.empty()) {
             video = m_strFileMask.Find(".wmv") >= 0;
             audio = m_strFileMask.Find(".wma") >= 0;
             image = m_strFileMask.Find(".jpg") >= 0;
index ecab63f..cfbd653 100644 (file)
@@ -79,7 +79,7 @@ bool CVTPDirectory::GetDirectory(const CStdString& strPath, CFileItemList &items
   if(!m_session->Open(url.GetHostName(), url.GetPort()))
     return false;
 
-  if(url.GetFileName().IsEmpty())
+  if(url.GetFileName().empty())
   {
     CFileItemPtr item;
 
index ece3d1a..c2cd170 100644 (file)
@@ -60,7 +60,7 @@ bool CVideoDatabaseDirectory::GetDirectory(const CStdString& strPath, CFileItemL
     if (item->m_bIsFolder && !item->HasIcon() && !item->HasArt("thumb"))
     {
       CStdString strImage = GetIcon(item->GetPath());
-      if (!strImage.IsEmpty() && g_TextureManager.HasTexture(strImage))
+      if (!strImage.empty() && g_TextureManager.HasTexture(strImage))
         item->SetIconImage(strImage);
     }
   }
@@ -144,7 +144,7 @@ bool CVideoDatabaseDirectory::GetLabel(const CStdString& strDirectory, CStdStrin
 
   CStdString path = CLegacyPathTranslation::TranslateVideoDbPath(strDirectory);
   auto_ptr<CDirectoryNode> pNode(CDirectoryNode::ParseURL(path));
-  if (!pNode.get() || path.IsEmpty())
+  if (!pNode.get() || path.empty())
     return false;
 
   // first see if there's any filter criteria
@@ -175,12 +175,12 @@ bool CVideoDatabaseDirectory::GetLabel(const CStdString& strDirectory, CStdStrin
   if (params.GetYear() != -1)
   {
     CStdString strTemp = StringUtils::Format("%i",params.GetYear());
-    if (!strLabel.IsEmpty())
+    if (!strLabel.empty())
       strLabel += " / ";
     strLabel += strTemp;
   }
 
-  if (strLabel.IsEmpty())
+  if (strLabel.empty())
   {
     switch (pNode->GetChildType())
     {
index f712060..5bea934 100644 (file)
@@ -71,7 +71,7 @@ CDirectoryNode* CDirectoryNode::ParseURL(const CStdString& strPath)
 
   CStdStringArray Path;
   StringUtils::SplitString(strDirectory, "/", Path);
-  if (!strDirectory.IsEmpty())
+  if (!strDirectory.empty())
     Path.insert(Path.begin(), "");
 
   CDirectoryNode* pNode=NULL;
@@ -197,14 +197,14 @@ CStdString CDirectoryNode::BuildPath() const
 {
   CStdStringArray array;
 
-  if (!m_strName.IsEmpty())
+  if (!m_strName.empty())
     array.insert(array.begin(), m_strName);
 
   CDirectoryNode* pParent=m_pParent;
   while (pParent!=NULL)
   {
     const CStdString& strNodeName=pParent->GetName();
-    if (!strNodeName.IsEmpty())
+    if (!strNodeName.empty())
       array.insert(array.begin(), strNodeName);
 
     pParent=pParent->GetParent();
index 86160df..eca46e5 100644 (file)
@@ -76,11 +76,11 @@ bool CVirtualDirectory::GetDirectory(const CStdString& strPath, CFileItemList &i
   int flags = m_flags;
   if (!bUseFileDirectories)
     flags |= DIR_FLAG_NO_FILE_DIRS;
-  if (!strPath.IsEmpty() && strPath != "files://")
+  if (!strPath.empty() && strPath != "files://")
     return CDirectory::GetDirectory(strPath, items, m_strFileMask, flags, m_allowThreads);
 
   // if strPath is blank, clear the list (to avoid parent items showing up)
-  if (strPath.IsEmpty())
+  if (strPath.empty())
     items.Clear();
 
   // return the root listing
index 72315fd..3cb7656 100644 (file)
@@ -75,7 +75,7 @@ namespace XFILE
       return false;
 
     vector<std::string> baseTokens;
-    if (!strPathInZip.IsEmpty())
+    if (!strPathInZip.empty())
       StringUtils::Tokenize(strPathInZip,baseTokens,"/");
 
     for (vector<SZipEntry>::iterator ze=entries.begin();ze!=entries.end();++ze)
index b377524..f811c49 100644 (file)
@@ -324,7 +324,7 @@ bool CD3DEffect::CreateEffect()
        {
                D3DXMACRO m;
                m.Name = it->first.c_str();
-    if (it->second.IsEmpty())
+    if (it->second.empty())
       m.Definition = NULL;
     else
                  m.Definition = it->second.c_str();
index 8fcbf07..f3ffeaf 100644 (file)
@@ -44,7 +44,7 @@ bool CGUIAction::ExecuteActions(int controlID, int parentID) const
   vector<CStdString> actions;
   for (ciActions it = m_actions.begin() ; it != m_actions.end() ; ++it)
   {
-    if (it->condition.IsEmpty() || g_infoManager.EvaluateBool(it->condition))
+    if (it->condition.empty() || g_infoManager.EvaluateBool(it->condition))
     {
       if (!StringUtils::IsInteger(it->action))
         actions.push_back(it->action);
@@ -71,7 +71,7 @@ int CGUIAction::GetNavigation() const
   {
     if (StringUtils::IsInteger(it->action))
     {
-      if (it->condition.IsEmpty() || g_infoManager.EvaluateBool(it->condition))
+      if (it->condition.empty() || g_infoManager.EvaluateBool(it->condition))
         return atoi(it->action.c_str());
     }
   }
@@ -84,7 +84,7 @@ void CGUIAction::SetNavigation(int id)
   CStdString strId = StringUtils::Format("%i", id);
   for (iActions it = m_actions.begin() ; it != m_actions.end() ; ++it)
   {
-    if (StringUtils::IsInteger(it->action) && it->condition.IsEmpty())
+    if (StringUtils::IsInteger(it->action) && it->condition.empty())
     {
       it->action = strId;
       return;
@@ -99,7 +99,7 @@ bool CGUIAction::HasActionsMeetingCondition() const
 {
   for (ciActions it = m_actions.begin() ; it != m_actions.end() ; ++it)
   {
-    if (it->condition.IsEmpty() || g_infoManager.EvaluateBool(it->condition))
+    if (it->condition.empty() || g_infoManager.EvaluateBool(it->condition))
       return true;
   }
   return false;
index 7d2b640..aeb83a6 100644 (file)
@@ -256,7 +256,7 @@ bool CGUIAudioManager::Load()
       if (pFileNode && pFileNode->FirstChild())
         strFile += pFileNode->FirstChild()->Value();
 
-      if (id > 0 && !strFile.IsEmpty())
+      if (id > 0 && !strFile.empty())
       {
         CStdString filename = URIUtils::AddFileToFolder(m_strMediaDir, strFile);
         IAESound *sound = LoadSound(filename);
index 7582fcf..73c7374 100644 (file)
@@ -41,7 +41,7 @@ CGUIBorderedImage::~CGUIBorderedImage(void)
 void CGUIBorderedImage::Process(unsigned int currentTime, CDirtyRegionList &dirtyregions)
 {
   CGUIImage::Process(currentTime, dirtyregions);
-  if (!m_borderImage.GetFileName().IsEmpty() && m_texture.ReadyToRender())
+  if (!m_borderImage.GetFileName().empty() && m_texture.ReadyToRender())
   {
     CRect rect = CRect(m_texture.GetXPosition(), m_texture.GetYPosition(), m_texture.GetXPosition() + m_texture.GetWidth(), m_texture.GetYPosition() + m_texture.GetHeight());
     rect.Intersect(m_texture.GetRenderRect());
@@ -56,7 +56,7 @@ void CGUIBorderedImage::Process(unsigned int currentTime, CDirtyRegionList &dirt
 
 void CGUIBorderedImage::Render()
 {
-  if (!m_borderImage.GetFileName().IsEmpty() && m_texture.ReadyToRender())
+  if (!m_borderImage.GetFileName().empty() && m_texture.ReadyToRender())
     m_borderImage.Render();
   CGUIImage::Render();
 }
index 95a9053..ce6a310 100644 (file)
@@ -125,7 +125,7 @@ void CGUIButtonControl::ProcessText(unsigned int currentTime)
   CStdString label2(m_info2.GetLabel(m_parentID));
   changed |= m_label2.SetMaxRect(m_posX, m_posY, m_width, m_height);
   changed |= m_label2.SetText(label2);
-  if (!label2.IsEmpty())
+  if (!label2.empty())
   {
     changed |= m_label2.SetAlign(XBFONT_RIGHT | (m_label.GetLabelInfo().align & XBFONT_CENTER_Y) | XBFONT_TRUNCATED);
     changed |= m_label2.SetScrolling(HasFocus());
index 58e2cd3..5e75d3f 100644 (file)
@@ -567,7 +567,7 @@ bool CGUIControlFactory::GetInfoLabelFromElement(const TiXmlElement *element, CG
     return false;
 
   CStdString label = element->FirstChild()->Value();
-  if (label.IsEmpty() || label == "-")
+  if (label.empty() || label == "-")
     return false;
 
   CStdString fallback = element->Attribute("fallback");
@@ -1288,7 +1288,7 @@ CGUIControl* CGUIControlFactory::Create(int parentID, const CRect &rect, TiXmlEl
       texture.useLarge = true;
 
     // use a bordered texture if we have <bordersize> or <bordertexture> specified.
-    if (borderTexture.filename.IsEmpty() && borderStr.IsEmpty())
+    if (borderTexture.filename.empty() && borderStr.empty())
       control = new CGUIImage(
         parentID, id, posX, posY, width, height, texture);
     else
index 01acec3..55cabd9 100644 (file)
@@ -175,7 +175,7 @@ void CGUIControlProfilerItem::SaveToXML(TiXmlElement *parent)
     xmlControl->SetAttribute("percent", str.c_str());
   }
 
-  if (!m_strDescription.IsEmpty())
+  if (!m_strDescription.empty())
   {
     TiXmlElement *elem = new TiXmlElement("description");
     xmlControl->LinkEndChild(elem);
@@ -335,7 +335,7 @@ void CGUIControlProfiler::EndFrame(void)
 
 bool CGUIControlProfiler::SaveResults(void)
 {
-  if (m_strOutputFile.IsEmpty())
+  if (m_strOutputFile.empty())
     return false;
 
   CXBMCTinyXML doc;
index c44d05d..4646284 100644 (file)
@@ -451,7 +451,7 @@ void CGUIEditControl::ProcessText(unsigned int currentTime)
     }
 
     changed |= m_label2.SetMaxRect(m_clipRect.x1 + m_textOffset, m_posY, m_clipRect.Width() - m_textOffset, m_height);
-    if (text.IsEmpty())
+    if (text.empty())
       changed |= m_label2.SetText(m_hintInfo.GetLabel(GetParentID()));
     else
       changed |= m_label2.SetTextW(text);
index 642ebef..d594c04 100644 (file)
@@ -248,7 +248,7 @@ CStdString CGUIFadeLabelControl::GetLabel()
 
   unsigned int numTries = 0;
   CStdString label(m_infoLabels[m_currentLabel].GetLabel(m_parentID));
-  while (label.IsEmpty() && ++numTries < m_infoLabels.size())
+  while (label.empty() && ++numTries < m_infoLabels.size())
   {
     if (++m_currentLabel >= m_infoLabels.size())
       m_currentLabel = 0;
index aecb382..ae08f1a 100644 (file)
@@ -285,7 +285,7 @@ CGUIFont* GUIFontManager::GetFont(const CStdString& strFontName, bool fallback /
       return pFont;
   }
   // fall back to "font13" if we have none
-  if (fallback && !strFontName.IsEmpty() && !strFontName.Equals("-") && !strFontName.Equals("font13"))
+  if (fallback && !strFontName.empty() && !strFontName.Equals("-") && !strFontName.Equals("font13"))
     return GetFont("font13");
   return NULL;
 }
@@ -362,7 +362,7 @@ void GUIFontManager::LoadFonts(const CStdString& strFontSet)
 
         const char* unicodeAttr = ((TiXmlElement*) pChild)->Attribute("unicode");
 
-        if (foundTTF.IsEmpty() && idAttr != NULL && unicodeAttr != NULL && stricmp(unicodeAttr, "true") == 0)
+        if (foundTTF.empty() && idAttr != NULL && unicodeAttr != NULL && stricmp(unicodeAttr, "true") == 0)
           foundTTF = idAttr;
 
         // Check if this is the fontset that we want
@@ -389,7 +389,7 @@ void GUIFontManager::LoadFonts(const CStdString& strFontSet)
     if (pChild == NULL)
     {
       CLog::Log(LOGWARNING, "file doesnt have <fontset> with name '%s', defaulting to first fontset", strFontSet.c_str());
-      if (!foundTTF.IsEmpty())
+      if (!foundTTF.empty())
         LoadFonts(foundTTF);
     }
   }
@@ -531,7 +531,7 @@ bool GUIFontManager::GetFirstFontSetUnicode(CStdString& strFontSet)
     CLog::Log(LOGERROR, "file doesnt have <fontset> in <fonts>, but rather %s", strValue.c_str());
   }
 
-  return !strFontSet.IsEmpty();
+  return !strFontSet.empty();
 }
 
 bool GUIFontManager::IsFontSetUnicode(const CStdString& strFontSet)
index 90a3187..4a28c99 100644 (file)
@@ -102,7 +102,7 @@ void CGUIImage::Process(unsigned int currentTime, CDirtyRegionList &dirtyregions
   // check whether our image failed to allocate, and if so drop back to the fallback image
   if (m_texture.FailedToAlloc() && !m_texture.GetFileName().Equals(m_info.GetFallback()))
   {
-    if (!m_currentFallback.IsEmpty() && !m_texture.GetFileName().Equals(m_currentFallback))
+    if (!m_currentFallback.empty() && !m_texture.GetFileName().Equals(m_currentFallback))
       m_texture.SetFileName(m_currentFallback);
     else
       m_texture.SetFileName(m_info.GetFallback());
@@ -130,7 +130,7 @@ void CGUIImage::Process(unsigned int currentTime, CDirtyRegionList &dirtyregions
           ++i;
       }
 
-      if (m_texture.ReadyToRender() || m_texture.GetFileName().IsEmpty())
+      if (m_texture.ReadyToRender() || m_texture.GetFileName().empty())
       { // fade out the last one as well
         if (!ProcessFading(m_fadingTextures[m_fadingTextures.size() - 1], frameTime, currentTime))
           m_fadingTextures.erase(m_fadingTextures.end() - 1);
@@ -151,7 +151,7 @@ void CGUIImage::Process(unsigned int currentTime, CDirtyRegionList &dirtyregions
       }
     }
 
-    if (m_texture.ReadyToRender() || m_texture.GetFileName().IsEmpty())
+    if (m_texture.ReadyToRender() || m_texture.GetFileName().empty())
     { // fade the new one in
       m_currentFadeTime += frameTime;
       if (m_currentFadeTime > m_crossFadeTime || frameTime == 0) // for if we allocate straight away on creation
@@ -222,7 +222,7 @@ bool CGUIImage::OnMessage(CGUIMessage& message)
 
 void CGUIImage::AllocResources()
 {
-  if (m_texture.GetFileName().IsEmpty())
+  if (m_texture.GetFileName().empty())
     return;
 
   CGUIControl::AllocResources();
@@ -306,7 +306,7 @@ void CGUIImage::SetAspectRatio(const CAspectRatio &aspect)
 void CGUIImage::SetCrossFade(unsigned int time)
 {
   m_crossFadeTime = time;
-  if (!m_crossFadeTime && m_texture.IsLazyLoaded() && !m_info.GetFallback().IsEmpty())
+  if (!m_crossFadeTime && m_texture.IsLazyLoaded() && !m_info.GetFallback().empty())
     m_crossFadeTime = 1;
 }
 
@@ -324,7 +324,7 @@ void CGUIImage::SetFileName(const CStdString& strFileName, bool setConstant, con
     if (m_currentTexture.Equals(strFileName))
       return; // nothing to do - we already have this image
 
-    if (m_texture.ReadyToRender() || m_texture.GetFileName().IsEmpty())
+    if (m_texture.ReadyToRender() || m_texture.GetFileName().empty())
     { // save the current image
       m_fadingTextures.push_back(new CFadingTexture(m_texture, m_currentFadeTime));
       MarkDirtyRegion();
index ea75605..918c822 100644 (file)
@@ -88,7 +88,7 @@ bool CGUIInfoColor::Update()
 
   // Expand the infolabel, and then convert it to a color
   CStdString infoLabel(g_infoManager.GetLabel(m_info));
-  color_t color = !infoLabel.IsEmpty() ? g_colorManager.GetColor(infoLabel.c_str()) : 0;
+  color_t color = !infoLabel.empty() ? g_colorManager.GetColor(infoLabel.c_str()) : 0;
   if (m_color != color)
   {
     m_color = color;
@@ -148,9 +148,9 @@ CStdString CGUIInfoLabel::GetLabel(int contextWindow, bool preferImage, CStdStri
       CStdString infoLabel;
       if (preferImage)
         infoLabel = g_infoManager.GetImage(portion.m_info, contextWindow, fallback);
-      if (infoLabel.IsEmpty())
+      if (infoLabel.empty())
         infoLabel = g_infoManager.GetLabel(portion.m_info, contextWindow, fallback);
-      if (!infoLabel.IsEmpty())
+      if (!infoLabel.empty())
         label += portion.GetLabel(infoLabel);
     }
     else
@@ -158,7 +158,7 @@ CStdString CGUIInfoLabel::GetLabel(int contextWindow, bool preferImage, CStdStri
       label += portion.m_prefix;
     }
   }
-  if (label.IsEmpty())  // empty label, use the fallback
+  if (label.empty())  // empty label, use the fallback
     return m_fallback;
   return label;
 }
@@ -177,7 +177,7 @@ CStdString CGUIInfoLabel::GetItemLabel(const CGUIListItem *item, bool preferImag
         infoLabel = g_infoManager.GetItemImage((const CFileItem *)item, portion.m_info, fallback);
       else
         infoLabel = g_infoManager.GetItemLabel((const CFileItem *)item, portion.m_info, fallback);
-      if (!infoLabel.IsEmpty())
+      if (!infoLabel.empty())
         label += portion.GetLabel(infoLabel);
     }
     else
@@ -185,7 +185,7 @@ CStdString CGUIInfoLabel::GetItemLabel(const CGUIListItem *item, bool preferImag
       label += portion.m_prefix;
     }
   }
-  if (label.IsEmpty())
+  if (label.empty())
     return m_fallback;
   return label;
 }
@@ -335,7 +335,7 @@ void CGUIInfoLabel::Parse(const CStdString &label, int context)
   }
   while (format != NONE);
 
-  if (!work.IsEmpty())
+  if (!work.empty())
     m_info.push_back(CInfoPortion(0, work, ""));
 }
 
index 64b734e..f19e6f1 100644 (file)
@@ -103,7 +103,7 @@ bool CGUIKeyboardFactory::ShowAndGetInput(CStdString& aTextString, const CVarian
 
   if (confirmed)
   {
-    if (!allowEmptyResult && aTextString.IsEmpty())
+    if (!allowEmptyResult && aTextString.empty())
       confirmed = false;
   }
 
@@ -199,7 +199,7 @@ int CGUIKeyboardFactory::ShowAndVerifyPassword(CStdString& strPassword, const CS
   if (!ShowAndGetInput(strUserInput, strHeadingTemp, false, true, autoCloseMs))  //bool hiddenInput = false/true ? TODO: GUI Setting to enable disable this feature y/n?
     return -1; // user canceled out
 
-  if (!strPassword.IsEmpty())
+  if (!strPassword.empty())
   {
     if (strPassword == strUserInput)
       return 0;
@@ -214,7 +214,7 @@ int CGUIKeyboardFactory::ShowAndVerifyPassword(CStdString& strPassword, const CS
   }
   else
   {
-    if (!strUserInput.IsEmpty())
+    if (!strUserInput.empty())
     {
       XBMC::XBMC_MD5 md5state;
       md5state.append(strUserInput);
index e896858..1bbcf7d 100644 (file)
@@ -273,7 +273,7 @@ bool CGUILabelControl::OnMessage(CGUIMessage& message)
 
 CStdString CGUILabelControl::ShortenPath(const CStdString &path)
 {
-  if (m_width == 0 || path.IsEmpty())
+  if (m_width == 0 || path.empty())
     return path;
 
   char cDelim = '\0';
index bdd75c0..0b80593 100644 (file)
@@ -69,7 +69,7 @@ void CGUIListItem::SetLabel(const CStdString& strLabel)
   if (m_strLabel == strLabel)
     return;
   m_strLabel = strLabel;
-  if (m_sortLabel.IsEmpty())
+  if (m_sortLabel.empty())
     SetSortLabel(strLabel);
   SetInvalid();
 }
index 610bb35..4fb6ec4 100644 (file)
@@ -104,7 +104,7 @@ void CGUIMultiImage::UpdateInfo(const CGUIListItem *item)
       texturePath = m_texturePath.GetItemLabel(item, true);
     else
       texturePath = m_texturePath.GetLabel(m_parentID);
-    if (texturePath != m_currentPath && !texturePath.IsEmpty())
+    if (texturePath != m_currentPath && !texturePath.empty())
     {
       // a new path - set our current path and tell ourselves to load our directory
       m_currentPath = texturePath;
@@ -221,7 +221,7 @@ void CGUIMultiImage::LoadDirectory()
   m_files.clear();
 
   // don't load any images if our path is empty
-  if (m_currentPath.IsEmpty()) return;
+  if (m_currentPath.empty()) return;
 
   /* Check the fast cases:
    1. Picture extension
@@ -308,7 +308,7 @@ bool CGUIMultiImage::CMultiImageJob::DoWork()
     // Load in images from the directory specified
     // m_path is relative (as are all skin paths)
     CStdString realPath = g_TextureManager.GetTexturePath(m_path, true);
-    if (realPath.IsEmpty())
+    if (realPath.empty())
       return true;
 
     URIUtils::AddSlashAtEnd(realPath);
index 9287909..5a1025f 100644 (file)
@@ -180,7 +180,7 @@ bool CGUIMultiSelectTextControl::OnAction(const CAction &action)
         selected++;
       }
     }
-    if (!clickAction.IsEmpty())
+    if (!clickAction.empty())
     { // have a click action -> perform it
       CGUIMessage message(GUI_MSG_EXECUTE, m_controlID, m_parentID);
       message.SetStringParam(clickAction);
@@ -335,7 +335,7 @@ void CGUIMultiSelectTextControl::UpdateText(const CStdString &text)
 
 void CGUIMultiSelectTextControl::AddString(const CStdString &text, bool selectable, const CStdString &clickAction)
 {
-  if (!text.IsEmpty())
+  if (!text.empty())
     m_items.push_back(CSelectableString(m_label.font, text, selectable, clickAction));
 }
 
index 10b9511..39dce83 100644 (file)
@@ -82,7 +82,7 @@ void CGUIProgressControl::Render()
   {
     m_guiBackground.Render();
 
-    if (m_guiLeft.GetFileName().IsEmpty() && m_guiRight.GetFileName().IsEmpty())
+    if (m_guiLeft.GetFileName().empty() && m_guiRight.GetFileName().empty())
     {
       if (m_bReveal && !m_guiMidClipRect.IsEmpty())
       {
@@ -228,7 +228,7 @@ bool CGUIProgressControl::UpdateLayout(void)
   float posX = m_guiBackground.GetXPosition();
   float posY = m_guiBackground.GetYPosition();
 
-  if (m_guiLeft.GetFileName().IsEmpty() && m_guiRight.GetFileName().IsEmpty())
+  if (m_guiLeft.GetFileName().empty() && m_guiRight.GetFileName().empty())
   { // rendering without left and right image - fill the mid image completely
     float width = m_fPercent * m_width * 0.01f;
     float offset = fabs(fScaleY * 0.5f * (m_guiMid.GetTextureHeight() - m_guiBackground.GetTextureHeight()));
index 92f9692..334d73e 100644 (file)
@@ -591,7 +591,7 @@ void CGUISliderControl::SetInfo(int iInfo)
 
 CStdString CGUISliderControl::GetDescription() const
 {
-  if (!m_textValue.IsEmpty())
+  if (!m_textValue.empty())
     return m_textValue;
   CStdString description;
   if (m_iType == SPIN_CONTROL_TYPE_FLOAT)
index eb678c3..9088b72 100644 (file)
@@ -62,7 +62,7 @@ CGUIStaticItem::CGUIStaticItem(const TiXmlElement *item, int parentID) : CFileIt
     {
       CStdString name = property->Attribute("name");
       CGUIInfoLabel prop;
-      if (!name.IsEmpty() && CGUIControlFactory::GetInfoLabelFromElement(property, prop, parentID))
+      if (!name.empty() && CGUIControlFactory::GetInfoLabelFromElement(property, prop, parentID))
       {
         SetProperty(name, prop.GetLabel(parentID, true).c_str());
         if (!prop.IsConstant())
index dff4ef7..0e81a52 100644 (file)
@@ -281,7 +281,7 @@ void CGUITextLayout::BidiTransform(vector<CGUIString> &lines, bool forceLTRReadi
       character_t style = *it & 0xffff0000;
       if (style != sectionStyle)
       {
-        if (!sectionText.IsEmpty())
+        if (!sectionText.empty())
         { // style has changed, bidi flip text
           CStdStringW sectionFlipped = BidiFlip(sectionText, forceLTRReadingOrder);
           for (unsigned int j = 0; j < sectionFlipped.size(); j++)
@@ -294,7 +294,7 @@ void CGUITextLayout::BidiTransform(vector<CGUIString> &lines, bool forceLTRReadi
     }
 
     // handle the last section
-    if (!sectionText.IsEmpty())
+    if (!sectionText.empty())
     {
       CStdStringW sectionFlipped = BidiFlip(sectionText, forceLTRReadingOrder);
       for (unsigned int j = 0; j < sectionFlipped.size(); j++)
index 2f120a8..433c173 100644 (file)
@@ -289,7 +289,7 @@ void CGUITextureBase::Render(float left, float top, float right, float bottom, f
 
 bool CGUITextureBase::AllocResources()
 {
-  if (m_info.filename.IsEmpty())
+  if (m_info.filename.empty())
     return false;
 
   if (m_texture.size())
@@ -349,7 +349,7 @@ bool CGUITextureBase::AllocResources()
   m_frameHeight = (float)m_texture.m_height;
 
   // load the diffuse texture (if necessary)
-  if (!m_info.diffuse.IsEmpty())
+  if (!m_info.diffuse.empty())
   {
     m_diffuse = g_TextureManager.Load(m_info.diffuse);
   }
index e9cf5e6..a8ab387 100644 (file)
@@ -326,7 +326,7 @@ void CGUIWindowManager::PreviousWindow()
 void CGUIWindowManager::ChangeActiveWindow(int newWindow, const CStdString& strPath)
 {
   vector<CStdString> params;
-  if (!strPath.IsEmpty())
+  if (!strPath.empty())
     params.push_back(strPath);
   ActivateWindow(newWindow, params, true);
 }
@@ -334,7 +334,7 @@ void CGUIWindowManager::ChangeActiveWindow(int newWindow, const CStdString& strP
 void CGUIWindowManager::ActivateWindow(int iWindowID, const CStdString& strPath)
 {
   vector<CStdString> params;
-  if (!strPath.IsEmpty())
+  if (!strPath.empty())
     params.push_back(strPath);
   ActivateWindow(iWindowID, params, false);
 }
index 8e36d67..0c54885 100644 (file)
@@ -41,7 +41,7 @@ CLocalizeStrings::~CLocalizeStrings(void)
 
 CStdString CLocalizeStrings::ToUTF8(const CStdString& strEncoding, const CStdString& str)
 {
-  if (strEncoding.IsEmpty())
+  if (strEncoding.empty())
     return str;
 
   CStdString ret;
@@ -113,7 +113,7 @@ bool CLocalizeStrings::LoadPO(const CStdString &filename, CStdString &encoding,
 
       if (bSourceLanguage && !PODoc.GetMsgid().empty())
       {
-        if (bStrInMem && (m_strings[id + offset].strOriginal.IsEmpty() ||
+        if (bStrInMem && (m_strings[id + offset].strOriginal.empty() ||
             PODoc.GetMsgid() == m_strings[id + offset].strOriginal))
           continue;
         else if (bStrInMem)
index ff308e9..c4e50d2 100644 (file)
@@ -151,7 +151,7 @@ std::string CStereoscopicsManager::DetectStereoModeByString(const std::string &n
   StringUtils::ToUpper(searchString);
 
   CStdString tag( g_advancedSettings.m_stereoscopicflags_sbs );
-  if (stereoMode.empty() && !tag.IsEmpty())
+  if (stereoMode.empty() && !tag.empty())
   {
     StringUtils::ToUpper(tag);
     StringUtils::SplitString(tag, "|", tags);
@@ -160,7 +160,7 @@ std::string CStereoscopicsManager::DetectStereoModeByString(const std::string &n
   }
 
   tag = g_advancedSettings.m_stereoscopicflags_tab;
-  if (stereoMode.empty() && !tag.IsEmpty())
+  if (stereoMode.empty() && !tag.empty())
   {
     StringUtils::ToUpper(tag);
     StringUtils::SplitString(tag, "|", tags);
@@ -184,7 +184,7 @@ RENDER_STEREO_MODE CStereoscopicsManager::GetStereoModeByUserChoice(const CStdSt
 
   CGUIDialogSelect* pDlgSelect = (CGUIDialogSelect*)g_windowManager.GetWindow(WINDOW_DIALOG_SELECT);
   pDlgSelect->Reset();
-  if (heading.IsEmpty())
+  if (heading.empty())
     pDlgSelect->SetHeading(g_localizeStrings.Get(36528).c_str());
   else
     pDlgSelect->SetHeading(heading.c_str());
@@ -220,7 +220,7 @@ RENDER_STEREO_MODE CStereoscopicsManager::GetStereoModeOfPlayingVideo(void)
   RENDER_STEREO_MODE mode = RENDER_STEREO_MODE_OFF;
 
   CStdString playerMode = g_infoManager.GetLabel(VIDEOPLAYER_STEREOSCOPIC_MODE);
-  if (!playerMode.IsEmpty())
+  if (!playerMode.empty())
   {
     int convertedMode = ConvertVideoToGuiStereoMode(playerMode);
     if (convertedMode > -1)
index fba1350..2a3d60d 100644 (file)
@@ -60,7 +60,7 @@ bool CTextureBundleXBT::OpenBundle()
     // if we are the theme bundle, we only load if the user has chosen
     // a valid theme (or the skin has a default one)
     CStdString theme = CSettings::Get().GetString("lookandfeel.skintheme");
-    if (!theme.IsEmpty() && theme.CompareNoCase("SKINDEFAULT"))
+    if (!theme.empty() && theme.CompareNoCase("SKINDEFAULT"))
     {
       CStdString themeXBT(URIUtils::ReplaceExtension(theme, ".xbt"));
       strPath = URIUtils::AddFileToFolder(g_graphicsContext.GetMediaDir(), "media");
index 8f23c47..30e41e7 100644 (file)
@@ -131,7 +131,7 @@ bool CTextureBundleXPR::OpenBundle()
     // if we are the theme bundle, we only load if the user has chosen
     // a valid theme (or the skin has a default one)
     CStdString theme = CSettings::Get().GetString("lookandfeel.skintheme");
-    if (!theme.IsEmpty() && theme.CompareNoCase("SKINDEFAULT"))
+    if (!theme.empty() && theme.CompareNoCase("SKINDEFAULT"))
     {
       CStdString themeXPR(URIUtils::ReplaceExtension(theme, ".xpr"));
       strPath = URIUtils::AddFileToFolder(g_graphicsContext.GetMediaDir(), "media");
index 07a6868..b14fc5a 100644 (file)
@@ -272,7 +272,7 @@ bool CGUITextureManager::HasTexture(const CStdString &textureName, CStdString *p
   if (path)
     *path = fullPath;
 
-  return !fullPath.IsEmpty();
+  return !fullPath.empty();
 }
 
 const CTextureArray& CGUITextureManager::Load(const CStdString& strTextureName, bool checkBundleOnly /*= false */)
@@ -564,7 +564,7 @@ void CGUITextureManager::SetTexturePath(const CStdString &texturePath)
 void CGUITextureManager::AddTexturePath(const CStdString &texturePath)
 {
   CSingleLock lock(m_section);
-  if (!texturePath.IsEmpty())
+  if (!texturePath.empty())
     m_texturePaths.push_back(texturePath);
 }
 
index 627e52b..8a4c86c 100644 (file)
@@ -1190,7 +1190,7 @@ CStdString CButtonTranslator::TranslateWindow(int windowID)
 int CButtonTranslator::TranslateWindow(const CStdString &window)
 {
   CStdString strWindow(window);
-  if (strWindow.IsEmpty()) 
+  if (strWindow.empty()) 
     return WINDOW_INVALID;
   strWindow.ToLower();
   // eliminate .xml
index d1d7697..4a73ad2 100644 (file)
@@ -71,7 +71,7 @@ void CIrssMessage::SetDataAsBytes(char* data, int size)
 
 void CIrssMessage::SetDataAsString(const CStdString& data)
 {
-  if (!data || data.IsEmpty())
+  if (!data || data.empty())
   {
     FreeData();
   }
index 6df9368..92059a5 100644 (file)
@@ -142,7 +142,7 @@ void CAnnouncementManager::Announce(AnnouncementFlag flag, const char *sender, c
       item->SetProperty(LOOKUP_PROPERTY, false);
 
       CStdString title = item->GetVideoInfoTag()->m_strTitle;
-      if (title.IsEmpty())
+      if (title.empty())
         title = item->GetLabel();
       object["item"]["title"] = title;
 
@@ -198,7 +198,7 @@ void CAnnouncementManager::Announce(AnnouncementFlag flag, const char *sender, c
       item->SetProperty(LOOKUP_PROPERTY, false);
 
       CStdString title = item->GetMusicInfoTag()->GetTitle();
-      if (title.IsEmpty())
+      if (title.empty())
         title = item->GetLabel();
       object["item"]["title"] = title;
 
index 3e3cbcc..5c17169 100644 (file)
@@ -354,13 +354,13 @@ int CBuiltins::Execute(const CStdString& execString)
       if (params.size() >= 2)
         sync = params[1].Equals("sync");
 
-      if (!strSaveToPath.IsEmpty())
+      if (!strSaveToPath.empty())
       {
         if (CDirectory::Exists(strSaveToPath))
         {
           CStdString file = CUtil::GetNextFilename(URIUtils::AddFileToFolder(strSaveToPath, "screenshot%03d.png"), 999);
 
-          if (!file.IsEmpty())
+          if (!file.empty())
           {
             CScreenShot::TakeScreenshot(file, sync);
           }
@@ -1488,7 +1488,7 @@ int CBuiltins::Execute(const CStdString& execString)
 
     if (params.size() > 2)
       path=params[2];
-    if (singleFile || !path.IsEmpty() ||
+    if (singleFile || !path.empty() ||
         CGUIDialogFileBrowser::ShowAndGetDirectory(shares,
                                  g_localizeStrings.Get(661), path, true))
     {
@@ -1745,7 +1745,7 @@ int CBuiltins::Execute(const CStdString& execString)
   {
     CApplicationMessenger::Get().StartAndroidActivity(params);
   }
-  else if (execute.Equals("SetStereoMode") && !parameter.IsEmpty())
+  else if (execute.Equals("SetStereoMode") && !parameter.empty())
   {
     CAction action = CStereoscopicsManager::Get().ConvertActionCommandToAction(execute, parameter);
     if (action.GetID() != ACTION_NONE)
index ab75642..4174ed9 100644 (file)
@@ -79,7 +79,7 @@ void InfoExpression::Parse(const CStdString &expression)
     if (GetOperator(expression[i]))
     {
       // cleanup any operand, translate and put into our expression list
-      if (!operand.IsEmpty())
+      if (!operand.empty())
       {
         unsigned int info = g_infoManager.Register(operand, m_context);
         if (info)
index 68582c8..3a952f9 100644 (file)
@@ -279,9 +279,9 @@ void CFileItemHandler::HandleFileItem(const char *ID, bool allowFile, const char
     {
       if (allowFile)
       {
-        if (item->HasVideoInfoTag() && !item->GetVideoInfoTag()->GetPath().IsEmpty())
+        if (item->HasVideoInfoTag() && !item->GetVideoInfoTag()->GetPath().empty())
           object["file"] = item->GetVideoInfoTag()->GetPath().c_str();
-        if (item->HasMusicInfoTag() && !item->GetMusicInfoTag()->GetURL().IsEmpty())
+        if (item->HasMusicInfoTag() && !item->GetMusicInfoTag()->GetURL().empty())
           object["file"] = item->GetMusicInfoTag()->GetURL().c_str();
 
         if (!object.isMember("file"))
index a84428c..c7ff80d 100644 (file)
@@ -95,7 +95,7 @@ namespace XBMCAddon
           for (int i=0; i < (int)pPlayList->size(); ++i)
           {
             CFileItemPtr playListItem =(*pPlayList)[i];
-            if (playListItem->GetLabel().IsEmpty())
+            if (playListItem->GetLabel().empty())
               playListItem->SetLabel(URIUtils::GetFileName(playListItem->GetPath()));
 
             this->pPlayList->Add(playListItem);
index e2fd194..01a129e 100644 (file)
@@ -332,7 +332,7 @@ void XBPython::OnAbortRequested(const CStdString &ID)
   {
     if (CHECK_FOR_ENTRY(m_vecMonitorCallbackList,(*it)))
     {
-      if (ID.IsEmpty())
+      if (ID.empty())
         (*it)->OnAbortRequested();
       else if ((*it)->GetId() == ID)
         (*it)->OnAbortRequested();
@@ -450,7 +450,7 @@ bool XBPython::InitializeEngine()
          was used to compile the various Python object files (i.e. .pyo,
          .pyc, etc.). */
         // check if we are running as real xbmc.app or just binary
-      if (!CUtil::GetFrameworksPath(true).IsEmpty())
+      if (!CUtil::GetFrameworksPath(true).empty())
       {
         // using external python, it's build looking for xxx/lib/python2.6
         // so point it to frameworks which is where python2.6 is located
index f7a96b1..d7a5259 100644 (file)
@@ -65,7 +65,7 @@ CStdString CAlbum::GetGenreString() const
 
 bool CAlbum::operator<(const CAlbum &a) const
 {
-  if (strMusicBrainzAlbumID.IsEmpty() && a.strMusicBrainzAlbumID.IsEmpty())
+  if (strMusicBrainzAlbumID.empty() && a.strMusicBrainzAlbumID.empty())
   {
     if (strAlbum < a.strAlbum) return true;
     if (strAlbum > a.strAlbum) return false;
index fc9c739..e43634b 100644 (file)
@@ -36,7 +36,7 @@ public:
   long idArtist;
   bool operator<(const CArtist& a) const
   {
-    if (strMusicBrainzArtistID.IsEmpty() && a.strMusicBrainzArtistID.IsEmpty())
+    if (strMusicBrainzArtistID.empty() && a.strMusicBrainzArtistID.empty())
     {
       if (strArtist < a.strArtist) return true;
       if (strArtist > a.strArtist) return false;
index 0526af1..f2038e6 100644 (file)
@@ -69,17 +69,17 @@ VECSOURCES& CGUIViewStateWindowMusic::GetSources()
 CGUIViewStateMusicSearch::CGUIViewStateMusicSearch(const CFileItemList& items) : CGUIViewStateWindowMusic(items)
 {
   CStdString strTrackLeft=CSettings::Get().GetString("musicfiles.librarytrackformat");
-  if (strTrackLeft.IsEmpty())
+  if (strTrackLeft.empty())
     strTrackLeft = CSettings::Get().GetString("musicfiles.trackformat");
   CStdString strTrackRight=CSettings::Get().GetString("musicfiles.librarytrackformatright");
-  if (strTrackRight.IsEmpty())
+  if (strTrackRight.empty())
     strTrackRight = CSettings::Get().GetString("musicfiles.trackformatright");
 
   CStdString strAlbumLeft = g_advancedSettings.m_strMusicLibraryAlbumFormat;
-  if (strAlbumLeft.IsEmpty())
+  if (strAlbumLeft.empty())
     strAlbumLeft = "%B"; // album
   CStdString strAlbumRight = g_advancedSettings.m_strMusicLibraryAlbumFormatRight;
-  if (strAlbumRight.IsEmpty())
+  if (strAlbumRight.empty())
     strAlbumRight = "%A"; // artist
 
   SortAttribute sortAttribute = SortAttributeNone;
@@ -107,17 +107,17 @@ CGUIViewStateMusicDatabase::CGUIViewStateMusicDatabase(const CFileItemList& item
   NODE_TYPE NodeType=dir.GetDirectoryChildType(items.GetPath());
 
   CStdString strTrackLeft=CSettings::Get().GetString("musicfiles.librarytrackformat");
-  if (strTrackLeft.IsEmpty())
+  if (strTrackLeft.empty())
     strTrackLeft = CSettings::Get().GetString("musicfiles.trackformat");
   CStdString strTrackRight=CSettings::Get().GetString("musicfiles.librarytrackformatright");
-  if (strTrackRight.IsEmpty())
+  if (strTrackRight.empty())
     strTrackRight = CSettings::Get().GetString("musicfiles.trackformatright");
 
   CStdString strAlbumLeft = g_advancedSettings.m_strMusicLibraryAlbumFormat;
-  if (strAlbumLeft.IsEmpty())
+  if (strAlbumLeft.empty())
     strAlbumLeft = "%B"; // album
   CStdString strAlbumRight = g_advancedSettings.m_strMusicLibraryAlbumFormatRight;
-  if (strAlbumRight.IsEmpty())
+  if (strAlbumRight.empty())
     strAlbumRight = "%A"; // artist
 
   CLog::Log(LOGDEBUG,"Album format left  = [%s]", strAlbumLeft.c_str());
@@ -366,10 +366,10 @@ CGUIViewStateMusicSmartPlaylist::CGUIViewStateMusicSmartPlaylist(const CFileItem
   else if (items.GetContent() == "albums") 
   {
     CStdString strAlbumLeft = g_advancedSettings.m_strMusicLibraryAlbumFormat;
-    if (strAlbumLeft.IsEmpty())
+    if (strAlbumLeft.empty())
       strAlbumLeft = "%B"; // album
     CStdString strAlbumRight = g_advancedSettings.m_strMusicLibraryAlbumFormatRight;
-    if (strAlbumRight.IsEmpty())
+    if (strAlbumRight.empty())
       strAlbumRight = "%A"; // artist
 
     // album
@@ -598,10 +598,10 @@ VECSOURCES& CGUIViewStateWindowMusicSongs::GetSources()
 CGUIViewStateWindowMusicPlaylist::CGUIViewStateWindowMusicPlaylist(const CFileItemList& items) : CGUIViewStateWindowMusic(items)
 {
   CStdString strTrackLeft=CSettings::Get().GetString("musicfiles.nowplayingtrackformat");
-  if (strTrackLeft.IsEmpty())
+  if (strTrackLeft.empty())
     strTrackLeft = CSettings::Get().GetString("musicfiles.trackformat");
   CStdString strTrackRight=CSettings::Get().GetString("musicfiles.nowplayingtrackformatright");
-  if (strTrackRight.IsEmpty())
+  if (strTrackRight.empty())
     strTrackRight = CSettings::Get().GetString("musicfiles.trackformatright");
 
   AddSortMethod(SortByNone, 551, LABEL_MASKS(strTrackLeft, strTrackRight, "%L", ""));  // Userdefined, Userdefined | FolderName, empty
index 990302d..d82dfd5 100644 (file)
@@ -348,7 +348,7 @@ int CMusicDatabase::AddSong(const int idAlbum,
   try
   {
     // We need at least the title
-    if (strTitle.IsEmpty())
+    if (strTitle.empty())
       return -1;
 
     if (NULL == m_pDB.get()) return -1;
@@ -389,7 +389,7 @@ int CMusicDatabase::AddSong(const int idAlbum,
                     iTrack, iDuration, iYear,
                     crc, strFileName.c_str());
 
-      if (strMusicBrainzTrackID.IsEmpty())
+      if (strMusicBrainzTrackID.empty())
         strSQL += PrepareSQL(",NULL");
       else
         strSQL += PrepareSQL(",'%s'", strMusicBrainzTrackID.c_str());
@@ -470,7 +470,7 @@ int CMusicDatabase::UpdateSong(int idSong,
                         strTitle.c_str(),
                         iTrack, iDuration, iYear,
                         crc, strFileName.c_str());
-    if (strMusicBrainzTrackID.IsEmpty())
+    if (strMusicBrainzTrackID.empty())
       strSQL += PrepareSQL(", strMusicBrainzTrackID = NULL");
     else
       strSQL += PrepareSQL(", strMusicBrainzTrackID = '%s'", strMusicBrainzTrackID.c_str());
@@ -513,7 +513,7 @@ int CMusicDatabase::AddAlbum(const CStdString& strAlbum, const CStdString& strMu
     {
       m_pDS->close();
       // doesnt exists, add it
-      if (strMusicBrainzAlbumID.IsEmpty())
+      if (strMusicBrainzAlbumID.empty())
         strSQL=PrepareSQL("insert into album (idAlbum, strAlbum, strMusicBrainzAlbumID, strArtists, strGenres, iYear, bCompilation) values( NULL, '%s', NULL, '%s', '%s', %i, %i)",
                           strAlbum.c_str(),
                           strArtist.c_str(),
@@ -564,7 +564,7 @@ int CMusicDatabase::AddGenre(const CStdString& strGenre1)
     CStdString strGenre = strGenre1;
     strGenre.Trim();
 
-    if (strGenre.IsEmpty())
+    if (strGenre.empty())
       strGenre=g_localizeStrings.Get(13205); // Unknown
 
     if (NULL == m_pDB.get()) return -1;
@@ -1067,7 +1067,7 @@ CAlbum CMusicDatabase::GetAlbumFromDataset(const dbiplus::sql_record* const reco
   CAlbum album;
   album.idAlbum = record->at(album_idAlbum).get_asInt();
   album.strAlbum = record->at(album_strAlbum).get_asString();
-  if (album.strAlbum.IsEmpty())
+  if (album.strAlbum.empty())
     album.strAlbum = g_localizeStrings.Get(1050);
   album.strMusicBrainzAlbumID = record->at(album_strMusicBrainzAlbumID).get_asString();
   album.artist = StringUtils::Split(record->at(album_strArtists).get_asString(), g_advancedSettings.m_musicItemSeparator);
@@ -2091,7 +2091,7 @@ bool CMusicDatabase::CleanupSongsByIds(const CStdString &strSongIds)
     }
     m_pDS->close();
 
-    if ( ! strSongsToDelete.IsEmpty() )
+    if ( ! strSongsToDelete.empty() )
     {
       strSongsToDelete = "(" + strSongsToDelete.TrimRight(",") + ")";
       // ok, now delete these songs + all references to them from the linked tables
@@ -2229,7 +2229,7 @@ bool CMusicDatabase::CleanupPaths()
     }
     m_pDS->close();
 
-    if ( ! deleteSQL.IsEmpty() )
+    if ( ! deleteSQL.empty() )
     {
       deleteSQL = "DELETE FROM path WHERE idPath IN (" + deleteSQL.TrimRight(',') + ")";
       // do the deletion, and drop our temp table
@@ -2545,7 +2545,7 @@ bool CMusicDatabase::LookupCDDBInfo(bool bRequery/*=false*/)
           if (strTitle == "") break;
 
           CStdString strArtist = cddb.getInexactArtist(i);
-          if (!strArtist.IsEmpty())
+          if (!strArtist.empty())
             strTitle += " - " + strArtist;
 
           pDlgSelect->Add(strTitle);
@@ -2624,7 +2624,7 @@ void CMusicDatabase::DeleteCDDBInfo()
       cddb.getDiskArtist(strDiskArtist);
 
       CStdString str;
-      if (strDiskArtist.IsEmpty())
+      if (strDiskArtist.empty())
         str = strDiskTitle;
       else
         str = strDiskTitle + " - " + strDiskArtist;
@@ -4000,7 +4000,7 @@ bool CMusicDatabase::GetArtistPath(int idArtist, CStdString &basePath)
     while (!m_pDS2->eof())
     {
       CStdString path = m_pDS2->fv("strPath").get_asString();
-      if (basePath.IsEmpty())
+      if (basePath.empty())
         basePath = path;
       else
         URIUtils::GetCommonPath(basePath,path);
@@ -4056,7 +4056,7 @@ int CMusicDatabase::GetAlbumByName(const CStdString& strAlbum, const CStdString&
     if (NULL == m_pDS.get()) return false;
 
     CStdString strSQL;
-    if (strArtist.IsEmpty())
+    if (strArtist.empty())
       strSQL=PrepareSQL("SELECT idAlbum FROM album WHERE album.strAlbum LIKE '%s'", strAlbum.c_str());
     else
       strSQL=PrepareSQL("SELECT album.idAlbum FROM album WHERE album.strAlbum LIKE '%s' AND album.strArtists LIKE '%s'", strAlbum.c_str(),strArtist.c_str());
@@ -4206,7 +4206,7 @@ bool CMusicDatabase::SetPathHash(const CStdString &path, const CStdString &hash)
     if (NULL == m_pDB.get()) return false;
     if (NULL == m_pDS.get()) return false;
 
-    if (hash.IsEmpty())
+    if (hash.empty())
     { // this is an empty folder - we need only add it to the path table
       // if the path actually exists
       if (!CDirectory::Exists(path))
@@ -4376,7 +4376,7 @@ bool CMusicDatabase::SetSongRating(const CStdString &filePath, char rating)
 {
   try
   {
-    if (filePath.IsEmpty()) return false;
+    if (filePath.empty()) return false;
     if (NULL == m_pDB.get()) return false;
     if (NULL == m_pDS.get()) return false;
 
index b348797..85425f3 100644 (file)
@@ -58,7 +58,7 @@ CMusicInfoLoader::~CMusicInfoLoader()
 void CMusicInfoLoader::OnLoaderStart()
 {
   // Load previously cached items from HD
-  if (!m_strCacheFileName.IsEmpty())
+  if (!m_strCacheFileName.empty())
     LoadCache(m_strCacheFileName, *m_mapFileItems);
   else
   {
@@ -218,7 +218,7 @@ void CMusicInfoLoader::OnLoaderFinish()
   m_mapFileItems->Clear();
 
   // Save loaded items to HD
-  if (!m_strCacheFileName.IsEmpty())
+  if (!m_strCacheFileName.empty())
     SaveCache(m_strCacheFileName, *m_pVecItems);
   else if (!m_bStop && (m_databaseHits > 1 || m_tagReads > 0))
     m_pVecItems->Save();
index a916cba..7755b84 100644 (file)
@@ -178,14 +178,14 @@ bool CMusicThumbLoader::FillThumb(CFileItem &item, bool folderThumbs /* = true *
   if (item.HasArt("thumb"))
     return true;
   CStdString thumb = GetCachedImage(item, "thumb");
-  if (thumb.IsEmpty())
+  if (thumb.empty())
   {
     thumb = item.GetUserMusicThumb(false, folderThumbs);
-    if (!thumb.IsEmpty())
+    if (!thumb.empty())
       SetCachedImage(item, "thumb", thumb);
   }
   item.SetArt("thumb", thumb);
-  return !thumb.IsEmpty();
+  return !thumb.empty();
 }
 
 bool CMusicThumbLoader::FillLibraryArt(CFileItem &item)
index 971b2f9..8698759 100644 (file)
@@ -56,7 +56,7 @@ CSong::CSong(CFileItem& item)
   iDuration = tag.GetDuration();
   bCompilation = tag.GetCompilation();
   embeddedArt = tag.GetCoverArtInfo();
-  strFileName = tag.GetURL().IsEmpty() ? item.GetPath() : tag.GetURL();
+  strFileName = tag.GetURL().empty() ? item.GetPath() : tag.GetURL();
   strThumb = item.GetUserMusicThumb(true);
   iStartOffset = item.m_lStartOffset;
   iEndOffset = item.m_lEndOffset;
index b8a2404..fe3d889 100644 (file)
@@ -302,7 +302,7 @@ void CGUIDialogMusicInfo::Update()
 
 void CGUIDialogMusicInfo::SetLabel(int iControl, const CStdString& strLabel)
 {
-  if (strLabel.IsEmpty())
+  if (strLabel.empty())
   {
     SET_CONTROL_LABEL(iControl, (iControl == CONTROL_TEXTAREA) ? (m_bArtistInfo?547:414) : 416);
   }
@@ -474,7 +474,7 @@ void CGUIDialogMusicInfo::OnGetFanart()
   database.GetArtistPath(m_artist.idArtist,strArtistPath);
   CFileItem item(strArtistPath,true);
   CStdString strLocal = item.GetLocalFanart();
-  if (!strLocal.IsEmpty())
+  if (!strLocal.empty())
   {
     CFileItemPtr itemLocal(new CFileItem("fanart://Local",false));
     itemLocal->SetArt("thumb", strLocal);
@@ -569,7 +569,7 @@ void CGUIDialogMusicInfo::AddItemPathToFileBrowserSources(VECSOURCES &sources, c
   else
     itemDir = item.GetPath();
 
-  if (!itemDir.IsEmpty() && CDirectory::Exists(itemDir))
+  if (!itemDir.empty() && CDirectory::Exists(itemDir))
   {
     CMediaSource itemSource;
     itemSource.strName = g_localizeStrings.Get(36041);
index e9b2a52..adc946c 100644 (file)
@@ -246,7 +246,7 @@ void CMusicInfoScanner::Start(const CStdString& strDirectory, int flags)
   m_pathsToScan.clear();
   m_flags = flags;
 
-  if (strDirectory.IsEmpty())
+  if (strDirectory.empty())
   { // scan all paths in the database.  We do this by scanning all paths in the db, and crossing them off the list as
     // we go.
     m_musicDatabase.Open();
@@ -270,7 +270,7 @@ void CMusicInfoScanner::FetchAlbumInfo(const CStdString& strDirectory,
   m_pathsToScan.clear();
 
   CFileItemList items;
-  if (strDirectory.IsEmpty())
+  if (strDirectory.empty())
   {
     m_musicDatabase.Open();
     m_musicDatabase.GetAlbumsNav("musicdb://albums/", items);
@@ -314,7 +314,7 @@ void CMusicInfoScanner::FetchArtistInfo(const CStdString& strDirectory,
   m_pathsToScan.clear();
   CFileItemList items;
 
-  if (strDirectory.IsEmpty())
+  if (strDirectory.empty())
   {
     m_musicDatabase.Open();
     m_musicDatabase.GetArtistsNav("musicdb://artists/", items, false, -1);
@@ -404,7 +404,7 @@ bool CMusicInfoScanner::DoScan(const CStdString& strDirectory)
   CStdString dbHash;
   if ((m_flags & SCAN_RESCAN) || !m_musicDatabase.GetPathHash(strDirectory, dbHash) || dbHash != hash)
   { // path has changed - rescan
-    if (dbHash.IsEmpty())
+    if (dbHash.empty())
       CLog::Log(LOGDEBUG, "%s Scanning dir '%s' as not in the database", __FUNCTION__, strDirectory.c_str());
     else
       CLog::Log(LOGDEBUG, "%s Rescanning dir '%s' due to change", __FUNCTION__, strDirectory.c_str());
@@ -1399,7 +1399,7 @@ INFO_RET CMusicInfoScanner::DownloadArtistInfo(const CArtist& artist, ADDON::Scr
             // set the label to artist
             CFileItem item(scraper.GetArtist(i).GetArtist());
             CStdString strTemp=scraper.GetArtist(i).GetArtist().strArtist;
-            if (!scraper.GetArtist(i).GetArtist().strBorn.IsEmpty())
+            if (!scraper.GetArtist(i).GetArtist().strBorn.empty())
               strTemp += " ("+scraper.GetArtist(i).GetArtist().strBorn+")";
             if (!scraper.GetArtist(i).GetArtist().genre.empty())
             {
@@ -1544,19 +1544,19 @@ map<string, string> CMusicInfoScanner::GetArtistArtwork(const CArtist& artist)
   // check thumb
   CStdString strFolder;
   CStdString thumb;
-  if (!artist.strPath.IsEmpty())
+  if (!artist.strPath.empty())
   {
     strFolder = artist.strPath;
-    for (int i = 0; i < 3 && thumb.IsEmpty(); ++i)
+    for (int i = 0; i < 3 && thumb.empty(); ++i)
     {
       CFileItem item(strFolder, true);
       thumb = item.GetUserMusicThumb(true);
       strFolder = URIUtils::GetParentPath(strFolder);
     }
   }
-  if (thumb.IsEmpty())
+  if (thumb.empty())
     thumb = CScraperUrl::GetThumbURL(artist.thumbURL.GetFirstThumb());
-  if (!thumb.IsEmpty())
+  if (!thumb.empty())
   {
     CTextureCache::Get().BackgroundCacheImage(thumb);
     artwork.insert(make_pair("thumb", thumb));
@@ -1564,19 +1564,19 @@ map<string, string> CMusicInfoScanner::GetArtistArtwork(const CArtist& artist)
 
   // check fanart
   CStdString fanart;
-  if (!artist.strPath.IsEmpty())
+  if (!artist.strPath.empty())
   {
     strFolder = artist.strPath;
-    for (int i = 0; i < 3 && fanart.IsEmpty(); ++i)
+    for (int i = 0; i < 3 && fanart.empty(); ++i)
     {
       CFileItem item(strFolder, true);
       fanart = item.GetLocalFanart();
       strFolder = URIUtils::GetParentPath(strFolder);
     }
   }
-  if (fanart.IsEmpty())
+  if (fanart.empty())
     fanart = artist.fanart.GetImageURL();
-  if (!fanart.IsEmpty())
+  if (!fanart.empty())
   {
     CTextureCache::Get().BackgroundCacheImage(fanart);
     artwork.insert(make_pair("fanart", fanart));
index c2744cf..844c43f 100644 (file)
@@ -386,7 +386,7 @@ void CKaraokeLyricsText::Render()
   m_karaokeLayout->GetTextExtent(textWidth, textHeight);
   m_karaokeLayout->RenderOutline(x, y, 0, m_colorLyricsOutline, XBFONT_CENTER_X, maxWidth);
 
-  if ( !m_currentPreamble.IsEmpty() )
+  if ( !m_currentPreamble.empty() )
   {
     float pretextWidth, pretextHeight;
     m_preambleLayout->GetTextExtent(pretextWidth, pretextHeight);
@@ -577,7 +577,7 @@ void CKaraokeLyricsText::rescanLyrics()
   }
 
   // Prepare a new first lyric entry with song name and artist.
-  if ( m_songName.IsEmpty() )
+  if ( m_songName.empty() )
   {
     m_songName = URIUtils::GetFileName( getSongFile() );
     URIUtils::RemoveExtension( m_songName );
@@ -595,7 +595,7 @@ void CKaraokeLyricsText::rescanLyrics()
     ltitle.timing = 0;
     ltitle.text = m_songName;
 
-    if ( !m_artist.IsEmpty() )
+    if ( !m_artist.empty() )
       ltitle.text += "[CR][CR]" + m_artist;
 
     newlyrics.push_back( ltitle );
@@ -736,7 +736,7 @@ bool CKaraokeLyricsText::HasBackground()
 
 bool CKaraokeLyricsText::HasVideo()
 {
-  return m_videoFile.IsEmpty() ? false : true;
+  return m_videoFile.empty() ? false : true;
 }
 
 void CKaraokeLyricsText::GetVideoParameters(CStdString & path, int64_t & offset)
index f7a32ed..3a9c682 100644 (file)
@@ -315,11 +315,11 @@ void CKaraokeLyricsTextKAR::parseMIDI()
             // Keywords
             if ( tempbuf[0] == '@' && tempbuf[1] == 'T' && strlen( tempbuf + 2 ) > 0 )
             {
-              if ( m_songName.IsEmpty() )
+              if ( m_songName.empty() )
                 m_songName = convertText( tempbuf + 2 );
               else
               {
-                if ( !m_artist.IsEmpty() )
+                if ( !m_artist.empty() )
                   m_artist += "[CR]";
 
                 m_artist += convertText( tempbuf + 2 );
index df92d5b..d861e7a 100644 (file)
@@ -68,7 +68,7 @@ void CKaraokeWindowBackground::Init(CGUIWindow * wnd)
   // Init visialisation variables
   CStdString defBkgType = g_advancedSettings.m_karaokeDefaultBackgroundType;
 
-  if ( defBkgType.IsEmpty() || defBkgType == "none" )
+  if ( defBkgType.empty() || defBkgType == "none" )
   {
     CLog::Log( LOGDEBUG, "Karaoke default background is set to none" );
     m_defaultMode = BACKGROUND_NONE;
@@ -78,13 +78,13 @@ void CKaraokeWindowBackground::Init(CGUIWindow * wnd)
     CLog::Log( LOGDEBUG, "Karaoke default background is visualisation" );
     m_defaultMode = BACKGROUND_VISUALISATION;
   }
-  else if ( defBkgType == "image" && !g_advancedSettings.m_karaokeDefaultBackgroundFilePath.IsEmpty() )
+  else if ( defBkgType == "image" && !g_advancedSettings.m_karaokeDefaultBackgroundFilePath.empty() )
   {
     CLog::Log( LOGDEBUG, "Karaoke default background is image %s", g_advancedSettings.m_karaokeDefaultBackgroundFilePath.c_str() );
     m_defaultMode = BACKGROUND_IMAGE;
     m_path = g_advancedSettings.m_karaokeDefaultBackgroundFilePath;
   }
-  else if ( defBkgType == "video" && !g_advancedSettings.m_karaokeDefaultBackgroundFilePath.IsEmpty() )
+  else if ( defBkgType == "video" && !g_advancedSettings.m_karaokeDefaultBackgroundFilePath.empty() )
   {
     CLog::Log( LOGDEBUG, "Karaoke default background is video %s", g_advancedSettings.m_karaokeDefaultBackgroundFilePath.c_str() );
     m_defaultMode = BACKGROUND_VIDEO;
index 4106942..eb27ffc 100644 (file)
@@ -88,7 +88,7 @@ bool CMusicInfoTagLoaderCDDA::Load(const CStdString& strFileName, CMusicInfoTag&
 
           // Artist: Use track artist or disc artist
           CStdString strArtist = cddb.getTrackArtist(iTrack);
-          if (strArtist.IsEmpty())
+          if (strArtist.empty())
             cddb.getDiskArtist(strArtist);
           tag.SetArtist(strArtist);
 
@@ -135,7 +135,7 @@ bool CMusicInfoTagLoaderCDDA::Load(const CStdString& strFileName, CMusicInfoTag&
 
         // Artist: Use track artist or disc artist
         CStdString strArtist = ti.cdtext[CDTEXT_PERFORMER];
-        if (strArtist.IsEmpty())
+        if (strArtist.empty())
           strArtist = discCDText[CDTEXT_PERFORMER];
         tag.SetArtist(strArtist);
 
@@ -146,7 +146,7 @@ bool CMusicInfoTagLoaderCDDA::Load(const CStdString& strFileName, CMusicInfoTag&
 
         // Genre: use track or disc genre
         CStdString strGenre = ti.cdtext[CDTEXT_GENRE];
-        if (strGenre.IsEmpty())
+        if (strGenre.empty())
           strGenre = discCDText[CDTEXT_GENRE];
         tag.SetGenre( strGenre );
 
index 5adf0ca..ad53464 100644 (file)
@@ -63,7 +63,7 @@ IMusicInfoTagLoader* CMusicInfoTagLoaderFactory::CreateLoader(const CStdString&
   strExtension.ToLower();
   strExtension.TrimLeft('.');
 
-  if (strExtension.IsEmpty())
+  if (strExtension.empty())
     return NULL;
 
   if (strExtension == "aac" ||
index 6e49307..56c48c6 100644 (file)
@@ -55,10 +55,10 @@ bool CMusicInfoTagLoaderMidi::Load(const CStdString & strFileName, CMusicInfoTag
 
   URIUtils::RemoveSlashAtEnd(path );
 
-  if ( !path.IsEmpty() )
+  if ( !path.empty() )
   {
     CStdString artist = URIUtils::GetFileName( path );
-    if ( !artist.IsEmpty() )
+    if ( !artist.empty() )
       tag.SetArtist( artist );
   }
 
index eea751a..e641368 100644 (file)
@@ -97,10 +97,10 @@ bool CTagLoaderTagLib::Load(const CStdString& strFileName, CMusicInfoTag& tag, c
   strExtension.ToLower();
   strExtension.TrimLeft('.');
 
-  if (strExtension.IsEmpty())
+  if (strExtension.empty())
   {
     strExtension = fallbackFileExtension;
-    if (strExtension.IsEmpty())
+    if (strExtension.empty())
       return false;
     strExtension.ToLower();
   }
@@ -237,7 +237,7 @@ bool CTagLoaderTagLib::Load(const CStdString& strFileName, CMusicInfoTag& tag, c
   if (flacFile)
     SetFlacArt(flacFile, art, tag);
 
-  if (!tag.GetTitle().IsEmpty() || !tag.GetArtist().empty() || !tag.GetAlbum().IsEmpty())
+  if (!tag.GetTitle().empty() || !tag.GetArtist().empty() || !tag.GetAlbum().empty())
     tag.SetLoaded();
   tag.SetURL(strFileName);
 
index d6ba301..8ca6877 100644 (file)
@@ -345,7 +345,7 @@ void CGUIWindowMusicBase::OnInfo(CFileItem *pItem, bool bShowInfo)
     CFileItemPtr pItem = items[i];
     pItem->LoadMusicTag();
     if (pItem->HasMusicInfoTag() && pItem->GetMusicInfoTag()->Loaded() &&
-       !pItem->GetMusicInfoTag()->GetAlbum().IsEmpty())
+       !pItem->GetMusicInfoTag()->GetAlbum().empty())
     {
       if (m_dlgProgress && bShowInfo)
         m_dlgProgress->Close();
@@ -1029,7 +1029,7 @@ void CGUIWindowMusicBase::UpdateThumb(const CAlbum &album, const CStdString &pat
   // Save this thumb as the directory thumb if it's the only album in the folder (files view nicety)
   // We do this by grabbing all the songs in the folder, and checking to see whether they come
   // from the same album.
-  if (saveDirThumb && CFile::Exists(albumThumb) && !albumPath.IsEmpty() && !URIUtils::IsCDDA(albumPath))
+  if (saveDirThumb && CFile::Exists(albumThumb) && !albumPath.empty() && !URIUtils::IsCDDA(albumPath))
   {
     CFileItemList items;
     GetDirectory(albumPath, items);
index 0557484..a381712 100644 (file)
@@ -105,7 +105,7 @@ bool CGUIWindowMusicNav::OnMessage(CGUIMessage& message)
       m_rootDir.AllowNonLocalSources(false);
 
       // is this the first time the window is opened?
-      if (m_vecItems->GetPath() == "?" && message.GetStringParam().IsEmpty())
+      if (m_vecItems->GetPath() == "?" && message.GetStringParam().empty())
         message.SetStringParam(CSettings::Get().GetString("mymusic.defaultlibview"));
       
       DisplayEmptyDatabaseMessage(false); // reset message state
@@ -294,7 +294,7 @@ bool CGUIWindowMusicNav::GetDirectory(const CStdString &strDirectory, CFileItemL
   if (m_bDisplayEmptyDatabaseMessage)
     return true;
 
-  if (strDirectory.IsEmpty())
+  if (strDirectory.empty())
     AddSearchFolder();
 
   bool bResult = CGUIWindowMusicBase::GetDirectory(strDirectory, items);
@@ -597,7 +597,7 @@ bool CGUIWindowMusicNav::OnContextButton(int itemNumber, CONTEXT_BUTTON button)
         return true;
       }
 
-      if (item->HasVideoInfoTag() && !item->GetVideoInfoTag()->m_strTitle.IsEmpty())
+      if (item->HasVideoInfoTag() && !item->GetVideoInfoTag()->m_strTitle.empty())
       {
         CGUIWindowVideoNav* pWindow = (CGUIWindowVideoNav*)g_windowManager.GetWindow(WINDOW_VIDEO_NAV);
         if (pWindow)
@@ -768,7 +768,7 @@ void CGUIWindowMusicNav::OnSearchUpdate()
 {
   CStdString search(GetProperty("search").asString());
   CURL::Encode(search);
-  if (!search.IsEmpty())
+  if (!search.empty())
   {
     CStdString path = "musicsearch://" + search + "/";
     m_history.ClearSearchHistory();
index a8b908c..94856b2 100644 (file)
@@ -447,10 +447,10 @@ void CGUIWindowMusicPlayList::OnItemLoaded(CFileItem* pItem)
   { // set label 1+2 from tags
     if (m_guiState.get()) m_hideExtensions = m_guiState->HideExtensions();
     CStdString strTrackLeft=CSettings::Get().GetString("musicfiles.nowplayingtrackformat");
-    if (strTrackLeft.IsEmpty())
+    if (strTrackLeft.empty())
       strTrackLeft = CSettings::Get().GetString("musicfiles.trackformat");
     CStdString strTrackRight=CSettings::Get().GetString("musicfiles.nowplayingtrackformatright");
-    if (strTrackRight.IsEmpty())
+    if (strTrackRight.empty())
       strTrackRight = CSettings::Get().GetString("musicfiles.trackformatright");
     CLabelFormatter formatter(strTrackLeft, strTrackRight);
     formatter.FormatLabels(pItem);
@@ -486,7 +486,7 @@ bool CGUIWindowMusicPlayList::Update(const CStdString& strDirectory, bool update
   if (!CGUIWindowMusicBase::Update(strDirectory, updateFilterPath))
     return false;
 
-  if (m_vecItems->GetContent().IsEmpty())
+  if (m_vecItems->GetContent().empty())
     m_vecItems->SetContent("songs");
 
   m_musicInfoLoader.Load(*m_vecItems);
index c67da93..04ceecb 100644 (file)
@@ -141,7 +141,7 @@ bool CGUIWindowMusicPlaylistEditor::OnMessage(CGUIMessage& message)
 bool CGUIWindowMusicPlaylistEditor::GetDirectory(const CStdString &strDirectory, CFileItemList &items)
 {
   items.Clear();
-  if (strDirectory.IsEmpty())
+  if (strDirectory.empty())
   { // root listing - list files:// and musicdb://
     CFileItemPtr files(new CFileItem("files://", true));
     files->SetLabel(g_localizeStrings.Get(744));
index d10a94b..00f1832 100644 (file)
@@ -83,7 +83,7 @@ bool CGUIWindowMusicSongs::OnMessage(CGUIMessage& message)
       // the window translator does it by using a virtual window id (5)
 
       // is this the first time the window is opened?
-      if (m_vecItems->GetPath() == "?" && message.GetStringParam().IsEmpty())
+      if (m_vecItems->GetPath() == "?" && message.GetStringParam().empty())
         message.SetStringParam(CMediaSourceSettings::Get().GetDefaultSource("music"));
 
       return CGUIWindowMusicBase::OnMessage(message);
@@ -203,7 +203,7 @@ bool CGUIWindowMusicSongs::GetDirectory(const CStdString &strDirectory, CFileIte
   items.FilterCueItems();
 
   CStdString label;
-  if (items.GetLabel().IsEmpty() && m_rootDir.IsSource(items.GetPath(), CMediaSourceSettings::Get().GetSources("music"), &label)) 
+  if (items.GetLabel().empty() && m_rootDir.IsSource(items.GetPath(), CMediaSourceSettings::Get().GetSources("music"), &label)) 
     items.SetLabel(label);
 
   return true;
@@ -471,7 +471,7 @@ bool CGUIWindowMusicSongs::Update(const CStdString &strDirectory, bool updateFil
   if (!CGUIMediaWindow::Update(strDirectory, updateFilterPath))
     return false;
 
-  if (m_vecItems->GetContent().IsEmpty())
+  if (m_vecItems->GetContent().empty())
     m_vecItems->SetContent("files");
   m_thumbLoader.Load(*m_vecItems);
 
index 3c9e8b0..4e344cb 100644 (file)
@@ -690,7 +690,7 @@ int CAirPlayServer::CTCPClient::ProcessRequest( CStdString& responseHeader,
   int status = AIRPLAY_STATUS_OK;
   bool needAuth = false;
   
-  if (m_sessionId.IsEmpty())
+  if (m_sessionId.empty())
     m_sessionId = "00000000-0000-0000-0000-000000000000";
 
   if (ServerInstance->m_usePassword && !m_bAuthenticated)
index 56b76fb..cb459da 100644 (file)
@@ -76,7 +76,7 @@ bool CDNSNameCache::Lookup(const CStdString& strHostName, CStdString& strIpAddre
     pclose(fp);
   }
 
-  if (!strIpAddress.IsEmpty())
+  if (!strIpAddress.empty())
   {
     g_DNSCache.Add(strHostName, strIpAddress);
     return true;
index 40bf650..e99e2de 100644 (file)
@@ -317,7 +317,7 @@ void CGUIDialogNetworkSetup::UpdateButtons()
 
   // TODO: FIX BETTER DAAP SUPPORT
   // server browse should be disabled if we are in DAAP, FTP, HTTP, HTTPS, RSS, HTSP, VTP, TUXBOX, DAV or DAVS
-  CONTROL_ENABLE_ON_CONDITION(CONTROL_SERVER_BROWSE, !m_server.IsEmpty() || !(m_protocol == NET_PROTOCOL_FTP ||
+  CONTROL_ENABLE_ON_CONDITION(CONTROL_SERVER_BROWSE, !m_server.empty() || !(m_protocol == NET_PROTOCOL_FTP ||
                                                                               m_protocol == NET_PROTOCOL_HTTP ||
                                                                               m_protocol == NET_PROTOCOL_HTTPS ||
                                                                               m_protocol == NET_PROTOCOL_DAV ||
@@ -368,13 +368,13 @@ CStdString CGUIDialogNetworkSetup::ConstructPath() const
   else if (m_protocol == NET_PROTOCOL_AFP)
     url.SetProtocol("afp");
     
-  if (!m_username.IsEmpty())
+  if (!m_username.empty())
   {
     url.SetUserName(m_username);
-    if (!m_password.IsEmpty())
+    if (!m_password.empty())
       url.SetPassword(m_password);
   }
-  if(!m_server.IsEmpty())
+  if(!m_server.empty())
     url.SetHostName(m_server);
   if (((m_protocol == NET_PROTOCOL_FTP) ||
        (m_protocol == NET_PROTOCOL_HTTP) ||
@@ -382,18 +382,18 @@ CStdString CGUIDialogNetworkSetup::ConstructPath() const
        (m_protocol == NET_PROTOCOL_DAV) ||
        (m_protocol == NET_PROTOCOL_DAVS) ||
        (m_protocol == NET_PROTOCOL_RSS) ||
-       (m_protocol == NET_PROTOCOL_DAAP && !m_server.IsEmpty()) ||
+       (m_protocol == NET_PROTOCOL_DAAP && !m_server.empty()) ||
        (m_protocol == NET_PROTOCOL_HTSP) ||
        (m_protocol == NET_PROTOCOL_VTP) ||
        (m_protocol == NET_PROTOCOL_MYTH) ||
        (m_protocol == NET_PROTOCOL_TUXBOX) ||
        (m_protocol == NET_PROTOCOL_SFTP) ||
        (m_protocol == NET_PROTOCOL_NFS))
-      && !m_port.IsEmpty() && atoi(m_port.c_str()) > 0)
+      && !m_port.empty() && atoi(m_port.c_str()) > 0)
   {
     url.SetPort(atoi(m_port));
   }
-  if (!m_path.IsEmpty())
+  if (!m_path.empty())
     url.SetFileName(m_path);
   return url.Get();
 }
index eca6c47..878d9c5 100644 (file)
@@ -333,7 +333,7 @@ void CWakeOnAccess::WakeUpHost(const CURL& url)
 {
   CStdString hostName = url.GetHostName();
 
-  if (!hostName.IsEmpty())
+  if (!hostName.empty())
     WakeUpHost (hostName, url.Get());
 }
 
@@ -474,7 +474,7 @@ static void AddHost (const CStdString& host, vector<string>& hosts)
     if (host.Equals((*it).c_str()))
       return; // allready there ..
 
-  if (!host.IsEmpty())
+  if (!host.empty())
     hosts.push_back(host);
 }
 
index 0291297..8bdc760 100644 (file)
@@ -552,7 +552,7 @@ void Xcddb::parseData(const char *buffer)
     {
       CStdString strExtd(strValue);
 
-      if (m_strYear.IsEmpty())
+      if (m_strYear.empty())
       {
         // Extract Year from extended info
         // as a fallback
@@ -561,7 +561,7 @@ void Xcddb::parseData(const char *buffer)
           g_charsetConverter.unknownToUTF8(strExtd.Mid(iPos + 6, 4), m_strYear);
       }
 
-      if (m_strGenre.IsEmpty())
+      if (m_strGenre.empty())
       {
         // Extract ID3 Genre
         // as a fallback
index 803d58b..9da86e6 100644 (file)
@@ -790,7 +790,7 @@ std::vector<NetworkAccessPoint> CNetworkInterfaceLinux::GetAccessPoints(void)
          case SIOCGIWAP:
          {
             // This event marks a new access point, so push back the old information
-            if (!macAddress.IsEmpty())
+            if (!macAddress.empty())
                result.push_back(NetworkAccessPoint(essId, macAddress, signalLevel, encryption, channel));
             unsigned char* mac = (unsigned char*)iwe->u.ap_addr.sa_data;
             // macAddress is big-endian, write in byte chunks
@@ -878,7 +878,7 @@ std::vector<NetworkAccessPoint> CNetworkInterfaceLinux::GetAccessPoints(void)
       pos += iwe->len;
    }
 
-   if (!macAddress.IsEmpty())
+   if (!macAddress.empty())
       result.push_back(NetworkAccessPoint(essId, macAddress, signalLevel, encryption, channel));
 
    free(res_buf);
index 9fce935..46692c2 100644 (file)
@@ -385,7 +385,7 @@ CUPnP::CUPnP() :
     if (NPT_SUCCEEDED(PLT_UPnPMessageHelper::GetIPAddresses(list)) && list.GetItemCount()) {
         m_IP = (*(list.GetFirstItem())).ToString();
     }
-    else if(m_IP.IsEmpty())
+    else if(m_IP.empty())
         m_IP = "localhost";
 
     // start upnp monitoring
index 235795f..4e3100d 100644 (file)
@@ -97,9 +97,9 @@ GetMimeType(const CFileItem& item,
             const PLT_HttpRequestContext* context /* = NULL */)
 {
     CStdString path = item.GetPath();
-    if (item.HasVideoInfoTag() && !item.GetVideoInfoTag()->GetPath().IsEmpty()) {
+    if (item.HasVideoInfoTag() && !item.GetVideoInfoTag()->GetPath().empty()) {
         path = item.GetVideoInfoTag()->GetPath();
-    } else if (item.HasMusicInfoTag() && !item.GetMusicInfoTag()->GetURL().IsEmpty()) {
+    } else if (item.HasMusicInfoTag() && !item.GetMusicInfoTag()->GetURL().empty()) {
         path = item.GetMusicInfoTag()->GetURL();
     }
 
@@ -203,7 +203,7 @@ PopulateObjectFromTag(CMusicInfoTag&         tag,
                       PLT_MediaItemResource* resource,  /* = NULL */
                       EClientQuirks          quirks)
 {
-    if (!tag.GetURL().IsEmpty() && file_path)
+    if (!tag.GetURL().empty() && file_path)
       *file_path = tag.GetURL();
 
     std::vector<std::string> genres = tag.GetGenre();
@@ -249,7 +249,7 @@ PopulateObjectFromTag(CVideoInfoTag&         tag,
     // some usefull buffers
     CStdStringArray strings;
 
-    if (!tag.m_strFileNameAndPath.IsEmpty() && file_path)
+    if (!tag.m_strFileNameAndPath.empty() && file_path)
       *file_path = tag.m_strFileNameAndPath;
 
     if (tag.m_iDbId != -1 ) {
@@ -541,7 +541,7 @@ BuildObject(CFileItem&                    item,
 
     // set a title for the object
     if (object->m_Title.IsEmpty()) {
-        if (!item.GetLabel().IsEmpty()) {
+        if (!item.GetLabel().empty()) {
             CStdString title = item.GetLabel();
             if (item.IsPlayList() || !item.m_bIsFolder) URIUtils::RemoveExtension(title);
             object->m_Title = title;
index 027c272..0f81865 100644 (file)
@@ -308,7 +308,7 @@ CUPnPServer::Build(CFileItemPtr                  item,
                 }
 
 
-                if (item->GetLabel().IsEmpty()) {
+                if (item->GetLabel().empty()) {
                     /* if no label try to grab it from node type */
                     CStdString label;
                     if (CMusicDatabaseDirectory::GetLabel((const char*)path, label)) {
@@ -347,13 +347,13 @@ CUPnPServer::Build(CFileItemPtr                  item,
                 }
 
                 // try to grab title from tag
-                if (item->HasVideoInfoTag() && !item->GetVideoInfoTag()->m_strTitle.IsEmpty()) {
+                if (item->HasVideoInfoTag() && !item->GetVideoInfoTag()->m_strTitle.empty()) {
                     item->SetLabel(item->GetVideoInfoTag()->m_strTitle);
                     item->SetLabelPreformated(true);
                 }
 
                 // try to grab it from the folder
-                if (item->GetLabel().IsEmpty()) {
+                if (item->GetLabel().empty()) {
                     CStdString label;
                     if (CVideoDatabaseDirectory::GetLabel((const char*)path, label)) {
                         item->SetLabel(label);
@@ -1192,7 +1192,7 @@ bool
 CUPnPServer::SortItems(CFileItemList& items, const char* sort_criteria)
 {
   CStdString criteria(sort_criteria);
-  if (criteria.IsEmpty()) {
+  if (criteria.empty()) {
     return false;
   }
 
index f445b84..e6acc41 100644 (file)
@@ -470,7 +470,7 @@ void CPeripherals::GetSettingsFromMappingsFile(TiXmlElement *xmlNode, map<CStdSt
   {
     CSetting *setting = NULL;
     CStdString strKey(currentNode->Attribute("key"));
-    if (strKey.IsEmpty())
+    if (strKey.empty())
       continue;
 
     CStdString strSettingsType(currentNode->Attribute("type"));
@@ -506,7 +506,7 @@ void CPeripherals::GetSettingsFromMappingsFile(TiXmlElement *xmlNode, map<CStdSt
     else if (strSettingsType.Equals("enum"))
     {
       CStdString strEnums(currentNode->Attribute("lvalues"));
-      if (!strEnums.IsEmpty())
+      if (!strEnums.empty())
       {
         vector< pair<int,int> > enums;
         vector<std::string> valuesVec;
index 6a34475..461a4fc 100644 (file)
@@ -119,7 +119,7 @@ bool CPeripheralBusUSB::PerformDeviceScan(PeripheralScanResults &results)
   udev_list_entry_foreach(dev_list_entry, devices)
   {
     strPath = udev_list_entry_get_name(dev_list_entry);
-    if (strPath.IsEmpty())
+    if (strPath.empty())
       bContinue = false;
 
     if (bContinue)
@@ -138,7 +138,7 @@ bool CPeripheralBusUSB::PerformDeviceScan(PeripheralScanResults &results)
     if (bContinue)
     {
       strClass = udev_device_get_sysattr_value(dev, "bDeviceClass");
-      if (strClass.IsEmpty())
+      if (strClass.empty())
         bContinue = false;
     }
 
index 67edb26..ffc48b7 100644 (file)
@@ -400,9 +400,9 @@ bool CPeripheral::SetSetting(const CStdString &strKey, const CStdString &strValu
       }
     }
     else if ((*it).second->GetType() == SettingTypeInteger)
-      bChanged = SetSetting(strKey, (int) (strValue.IsEmpty() ? 0 : atoi(strValue.c_str())));
+      bChanged = SetSetting(strKey, (int) (strValue.empty() ? 0 : atoi(strValue.c_str())));
     else if ((*it).second->GetType() == SettingTypeNumber)
-      bChanged = SetSetting(strKey, (float) (strValue.IsEmpty() ? 0 : atof(strValue.c_str())));
+      bChanged = SetSetting(strKey, (float) (strValue.empty() ? 0 : atof(strValue.c_str())));
     else if ((*it).second->GetType() == SettingTypeBool)
       bChanged = SetSetting(strKey, strValue.Equals("1"));
   }
index ac4b244..0245fcf 100644 (file)
@@ -233,9 +233,9 @@ bool CPeripheralCecAdapter::InitialiseFeature(const PeripheralFeature feature)
   if (feature == FEATURE_CEC && !m_bStarted && GetSettingBool("enabled"))
   {
     // hide settings that have an override set
-    if (!GetSettingString("wake_devices_advanced").IsEmpty())
+    if (!GetSettingString("wake_devices_advanced").empty())
       SetSettingVisible("wake_devices", false);
-    if (!GetSettingString("standby_devices_advanced").IsEmpty())
+    if (!GetSettingString("standby_devices_advanced").empty())
       SetSettingVisible("standby_devices", false);
 
     SetConfigurationFromSettings();
@@ -600,7 +600,7 @@ void CPeripheralCecAdapter::SetMenuLanguage(const char *strLanguage)
   else if (!strcmp(strLanguage, "tur"))
     strGuiLanguage = "Turkish";
 
-  if (!strGuiLanguage.IsEmpty())
+  if (!strGuiLanguage.empty())
   {
     CApplicationMessenger::Get().SetGUILanguage(strGuiLanguage);
     CLog::Log(LOGDEBUG, "%s - language set to '%s'", __FUNCTION__, strGuiLanguage.c_str());
@@ -1315,7 +1315,7 @@ void CPeripheralCecAdapter::SetConfigurationFromSettings(void)
   // read the devices to wake when starting
   CStdString strWakeDevices = CStdString(GetSettingString("wake_devices_advanced")).Trim();
   m_configuration.wakeDevices.Clear();
-  if (!strWakeDevices.IsEmpty())
+  if (!strWakeDevices.empty())
     ReadLogicalAddresses(strWakeDevices, m_configuration.wakeDevices);
   else
     ReadLogicalAddresses(GetSettingInt("wake_devices"), m_configuration.wakeDevices);
@@ -1323,7 +1323,7 @@ void CPeripheralCecAdapter::SetConfigurationFromSettings(void)
   // read the devices to power off when stopping
   CStdString strStandbyDevices = CStdString(GetSettingString("standby_devices_advanced")).Trim();
   m_configuration.powerOffDevices.Clear();
-  if (!strStandbyDevices.IsEmpty())
+  if (!strStandbyDevices.empty())
     ReadLogicalAddresses(strStandbyDevices, m_configuration.powerOffDevices);
   else
     ReadLogicalAddresses(GetSettingInt("standby_devices"), m_configuration.powerOffDevices);
@@ -1349,7 +1349,7 @@ void CPeripheralCecAdapter::ReadLogicalAddresses(const CStdString &strString, ce
   for (size_t iPtr = 0; iPtr < strString.size(); iPtr++)
   {
     CStdString strDevice = CStdString(strString.substr(iPtr, 1)).Trim();
-    if (!strDevice.IsEmpty())
+    if (!strDevice.empty())
     {
       int iDevice(0);
       if (sscanf(strDevice.c_str(), "%x", &iDevice) == 1 && iDevice >= 0 && iDevice <= 0xF)
@@ -1384,7 +1384,7 @@ bool CPeripheralCecAdapter::WriteLogicalAddresses(const cec_logical_addresses& a
   bool bChanged(false);
 
   // only update the advanced setting if it was set by the user
-  if (!GetSettingString(strAdvancedSettingName).IsEmpty())
+  if (!GetSettingString(strAdvancedSettingName).empty())
   {
     CStdString strPowerOffDevices;
     for (unsigned int iPtr = CECDEVICE_TV; iPtr <= CECDEVICE_BROADCAST; iPtr++)
index 6587f88..f64668a 100644 (file)
@@ -26,6 +26,6 @@ using namespace PERIPHERALS;
 CPeripheralDisk::CPeripheralDisk(const PeripheralScanResult& scanResult) :
   CPeripheral(scanResult)
 {
-  m_strDeviceName = scanResult.m_strDeviceName.IsEmpty() ? g_localizeStrings.Get(35003) : scanResult.m_strDeviceName;
+  m_strDeviceName = scanResult.m_strDeviceName.empty() ? g_localizeStrings.Get(35003) : scanResult.m_strDeviceName;
   m_features.push_back(FEATURE_DISK);
 }
index 0718692..7cc8047 100644 (file)
@@ -30,13 +30,13 @@ CPeripheralHID::CPeripheralHID(const PeripheralScanResult& scanResult) :
   CPeripheral(scanResult),
   m_bInitialised(false)
 {
-  m_strDeviceName = scanResult.m_strDeviceName.IsEmpty() ? g_localizeStrings.Get(35001) : scanResult.m_strDeviceName;
+  m_strDeviceName = scanResult.m_strDeviceName.empty() ? g_localizeStrings.Get(35001) : scanResult.m_strDeviceName;
   m_features.push_back(FEATURE_HID);
 }
 
 CPeripheralHID::~CPeripheralHID(void)
 {
-  if (!m_strKeymap.IsEmpty() && !GetSettingBool("do_not_use_custom_keymap"))
+  if (!m_strKeymap.empty() && !GetSettingBool("do_not_use_custom_keymap"))
   {
     CLog::Log(LOGDEBUG, "%s - switching active keymapping to: default", __FUNCTION__);
     CButtonTranslator::GetInstance().RemoveDevice(m_strKeymap);
@@ -52,7 +52,7 @@ bool CPeripheralHID::InitialiseFeature(const PeripheralFeature feature)
     if (HasSetting("keymap"))
       m_strKeymap = GetSettingString("keymap");
 
-    if (m_strKeymap.IsEmpty())
+    if (m_strKeymap.empty())
     {
       m_strKeymap = StringUtils::Format("v%sp%s", VendorIdAsString(), ProductIdAsString());
       SetSetting("keymap", m_strKeymap);
@@ -61,7 +61,7 @@ bool CPeripheralHID::InitialiseFeature(const PeripheralFeature feature)
     if (!IsSettingVisible("keymap"))
       SetSettingVisible("do_not_use_custom_keymap", false);
 
-    if (!m_strKeymap.IsEmpty())
+    if (!m_strKeymap.empty())
     {
       bool bKeymapEnabled(!GetSettingBool("do_not_use_custom_keymap"));
       if (bKeymapEnabled)
index 4e8ca2e..0e413aa 100644 (file)
@@ -28,6 +28,6 @@ using namespace std;
 CPeripheralNIC::CPeripheralNIC(const PeripheralScanResult& scanResult) :
   CPeripheral(scanResult)
 {
-  m_strDeviceName = scanResult.m_strDeviceName.IsEmpty() ? g_localizeStrings.Get(35002) : scanResult.m_strDeviceName;
+  m_strDeviceName = scanResult.m_strDeviceName.empty() ? g_localizeStrings.Get(35002) : scanResult.m_strDeviceName;
   m_features.push_back(FEATURE_NIC);
 }
index dd64dea..a66bd01 100644 (file)
@@ -49,7 +49,7 @@ bool CPeripheralNyxboard::LookupSymAndUnicode(XBMC_keysym &keysym, uint8_t *key,
     strCommand = GetSettingString("flip_remote");
   }
 
-  if (!strCommand.IsEmpty())
+  if (!strCommand.empty())
   {
     CLog::Log(LOGDEBUG, "%s - executing command '%s'", __FUNCTION__, strCommand.c_str());
     if (g_application.ExecuteXBMCAction(strCommand))
index 77a78ea..8d626e9 100644 (file)
@@ -100,7 +100,7 @@ void CGUIDialogPictureInfo::UpdatePictureInfo()
       continue;
 
     CStdString picInfo = g_infoManager.GetLabel(info);
-    if (!picInfo.IsEmpty())
+    if (!picInfo.empty())
     {
       CFileItemPtr item(new CFileItem(g_localizeStrings.Get(SLIDE_STRING_BASE + info)));
       item->SetLabel2(picInfo);
index eea59f5..2e3db60 100644 (file)
@@ -108,7 +108,7 @@ bool CGUIWindowPictures::OnMessage(CGUIMessage& message)
   case GUI_MSG_WINDOW_INIT:
     {
       // is this the first time accessing this window?
-      if (m_vecItems->GetPath() == "?" && message.GetStringParam().IsEmpty())
+      if (m_vecItems->GetPath() == "?" && message.GetStringParam().empty())
         message.SetStringParam(CMediaSourceSettings::Get().GetDefaultSource("pictures"));
 
       m_dlgProgress = (CGUIDialogProgress*)g_windowManager.GetWindow(WINDOW_DIALOG_PROGRESS);
@@ -311,7 +311,7 @@ bool CGUIWindowPictures::GetDirectory(const CStdString &strDirectory, CFileItemL
     return false;
 
   CStdString label;
-  if (items.GetLabel().IsEmpty() && m_rootDir.IsSource(items.GetPath(), CMediaSourceSettings::Get().GetSources("pictures"), &label)) 
+  if (items.GetLabel().empty() && m_rootDir.IsSource(items.GetPath(), CMediaSourceSettings::Get().GetSources("pictures"), &label)) 
     items.SetLabel(label);
 
   return true;
index f82e50f..3138914 100644 (file)
@@ -505,7 +505,7 @@ void CGUIWindowSlideShow::Process(unsigned int currentTime, CDirtyRegionList &re
   { // load first image
     CFileItemPtr item = m_slides->Get(m_iCurrentSlide);
     CStdString picturePath = GetPicturePath(item.get());
-    if (!picturePath.IsEmpty())
+    if (!picturePath.empty())
     {
       if (item->IsVideo())
         CLog::Log(LOGDEBUG, "Loading the thumb %s for current video %d: %s", picturePath.c_str(), m_iCurrentSlide, item->GetPath().c_str());
@@ -533,7 +533,7 @@ void CGUIWindowSlideShow::Process(unsigned int currentTime, CDirtyRegionList &re
     m_iLastFailedNextSlide = -1;
     CFileItemPtr item = m_slides->Get(m_iNextSlide);
     CStdString picturePath = GetPicturePath(item.get());
-    if (!picturePath.IsEmpty() && (!item->IsVideo() || !m_bSlideShow || m_bPause))
+    if (!picturePath.empty() && (!item->IsVideo() || !m_bSlideShow || m_bPause))
     {
       if (item->IsVideo())
         CLog::Log(LOGDEBUG, "Loading the thumb %s for next video %d: %s", picturePath.c_str(), m_iNextSlide, item->GetPath().c_str());
@@ -1233,7 +1233,7 @@ void CGUIWindowSlideShow::RunSlideShow(const CStdString &strPath,
   if ((!bNotRandom && CSettings::Get().GetBool("slideshow.shuffle")) || bRandom)
     Shuffle();
 
-  if (!beginSlidePath.IsEmpty())
+  if (!beginSlidePath.empty())
     Select(beginSlidePath);
 
   if (startSlideShow)
@@ -1263,7 +1263,7 @@ void CGUIWindowSlideShow::AddItems(const CStdString &strPath, path_set *recursiv
 
   // fetch directory and sort accordingly
   CFileItemList items;
-  if (!CDirectory::GetDirectory(strPath, items, m_strExtensions.IsEmpty()?g_advancedSettings.m_pictureExtensions:m_strExtensions,DIR_FLAG_NO_FILE_DIRS,true))
+  if (!CDirectory::GetDirectory(strPath, items, m_strExtensions.empty()?g_advancedSettings.m_pictureExtensions:m_strExtensions,DIR_FLAG_NO_FILE_DIRS,true))
     return;
 
   items.Sort(method, order, sortAttributes);
@@ -1296,12 +1296,12 @@ CStdString CGUIWindowSlideShow::GetPicturePath(CFileItem *item)
   if (isVideo)
   {
     picturePath = item->GetArt("thumb");
-    if (picturePath.IsEmpty() && !item->HasProperty("nothumb"))
+    if (picturePath.empty() && !item->HasProperty("nothumb"))
     {
       CPictureThumbLoader thumbLoader;
       thumbLoader.LoadItem(item);
       picturePath = item->GetArt("thumb");
-      if (picturePath.IsEmpty())
+      if (picturePath.empty())
         item->SetProperty("nothumb", true);
     }
   }
index 4750a9b..6c1e7d7 100644 (file)
@@ -52,7 +52,7 @@ bool CPictureInfoTag::Load(const CStdString &path)
   m_isLoaded = false;
 
   DllLibExif exifDll;
-  if (path.IsEmpty() || !exifDll.Load())
+  if (path.empty() || !exifDll.Load())
     return false;
 
   if (exifDll.process_jpeg(path.c_str(), &m_exifInfo, &m_iptcInfo))
@@ -281,7 +281,7 @@ void CPictureInfoTag::GetStringFromArchive(CArchive &ar, char *string, size_t le
   CStdString temp;
   ar >> temp;
   length = min((size_t)temp.GetLength(), length - 1);
-  if (!temp.IsEmpty())
+  if (!temp.empty())
     memcpy(string, temp.c_str(), length);
   string[length] = 0;
 }
index 4f24700..d60b830 100644 (file)
@@ -104,7 +104,7 @@ bool CPictureThumbLoader::LoadItemCached(CFileItem* pItem)
   { // folder, zip, cbz, rar, cbr, playlist may have a previously cached image
     thumb = GetCachedImage(*pItem, "thumb");
   }
-  if (!thumb.IsEmpty())
+  if (!thumb.empty())
   {
     CTextureCache::Get().BackgroundCacheImage(thumb);
     pItem->SetArt("thumb", thumb);
index 3eb8737..1d67d48 100644 (file)
@@ -106,7 +106,7 @@ bool CPlayListPLS::Load(const CStdString &strFile)
       break;
 
     // if there is something else before playlist marker, this isn't a pls file
-    if(!strLine.IsEmpty())
+    if(!strLine.empty())
       return false;
   }
 
@@ -364,7 +364,7 @@ bool CPlayListASX::LoadData(istream& stream)
           value = pRef->Attribute("href");
           if (value != "")
           {
-            if(title.IsEmpty())
+            if(title.empty())
               title = value;
 
             CLog::Log(LOGINFO, "Adding element %s, %s", title.c_str(), value.c_str());
index 0486033..134ae60 100644 (file)
@@ -117,14 +117,14 @@ bool CPlayListXML::Load( const CStdString& strFileName )
     CStdString lockpass = GetString( pSet, "lockpassword" );
 
     // If url is empty, it doesn't make any sense
-    if ( !url.IsEmpty() )
+    if ( !url.empty() )
     {
        // If the name is empty, use url
-       if ( name.IsEmpty() )
+       if ( name.empty() )
          name = url;
 
        // Append language to the name, and also set as metadata
-       if ( !lang.IsEmpty() )
+       if ( !lang.empty() )
          name += " [" + lang + "]";
 
        CStdString info = name;
@@ -132,21 +132,21 @@ bool CPlayListXML::Load( const CStdString& strFileName )
        newItem->SetPath(url);
 
        // Set language as metadata
-       if ( !lang.IsEmpty() )
+       if ( !lang.empty() )
          newItem->SetProperty("language", lang.c_str() );
 
        // Set category as metadata
-       if ( !category.IsEmpty() )
+       if ( !category.empty() )
          newItem->SetProperty("category", category.c_str() );
 
        // Set channel as extra info and as metadata
-       if ( !channel.IsEmpty() )
+       if ( !channel.empty() )
        {
          newItem->SetProperty("remotechannel", channel.c_str() );
          newItem->SetExtraInfo( "Channel: " + channel );
        }
 
-       if ( !lockpass.IsEmpty() )
+       if ( !lockpass.empty() )
        {
          newItem->m_strLockCode = lockpass;
          newItem->m_iHasLock = 2;
index c030af8..d8807af 100644 (file)
@@ -830,7 +830,7 @@ CStdString CSmartPlaylistRule::FormatWhereClause(const CStdString &negate, const
       query = field + " IS NULL OR " + field + parameter;
     }
   }
-  if (query.IsEmpty())
+  if (query.empty())
     query = CDatabaseQueryRule::FormatWhereClause(negate, oper, param, db, strType);
   return query;
 }
@@ -871,7 +871,7 @@ CStdString CSmartPlaylistRuleCombination::GetWhereClause(const CDatabase &db, co
     if ((*it)->m_field == FieldPlaylist)
     {
       CStdString playlistFile = CSmartPlaylistDirectory::GetPlaylistByName((*it)->m_parameter.at(0), strType);
-      if (!playlistFile.IsEmpty() && referencedPlaylists.find(playlistFile) == referencedPlaylists.end())
+      if (!playlistFile.empty() && referencedPlaylists.find(playlistFile) == referencedPlaylists.end())
       {
         referencedPlaylists.insert(playlistFile);
         CSmartPlaylist playlist;
@@ -879,7 +879,7 @@ CStdString CSmartPlaylistRuleCombination::GetWhereClause(const CDatabase &db, co
         {
           CStdString playlistQuery;
           // only playlists of same type will be part of the query
-          if (playlist.GetType().Equals(strType) || (playlist.GetType().Equals("mixed") && (strType == "songs" || strType == "musicvideos")) || playlist.GetType().IsEmpty())
+          if (playlist.GetType().Equals(strType) || (playlist.GetType().Equals("mixed") && (strType == "songs" || strType == "musicvideos")) || playlist.GetType().empty())
           {
             playlist.SetType(strType);
             playlistQuery = playlist.GetWhereClause(db, referencedPlaylists);
@@ -897,7 +897,7 @@ CStdString CSmartPlaylistRuleCombination::GetWhereClause(const CDatabase &db, co
     else
       currentRule = (*it)->GetWhereClause(db, strType);
     // if we don't get a rule, we add '1' or '0' so the query is still valid and doesn't fail
-    if (currentRule.IsEmpty())
+    if (currentRule.empty())
       currentRule = m_type == CombinationAnd ? "'1'" : "'0'";
     rule += currentRule;
     rule += ")";
index e2911d0..5678750 100644 (file)
@@ -37,10 +37,10 @@ CProfile::CLock::CLock(LockType type, const CStdString &password)
 
 void CProfile::CLock::Validate()
 {
-  if (mode != LOCK_MODE_EVERYONE && (code == "-" || code.IsEmpty()))
+  if (mode != LOCK_MODE_EVERYONE && (code == "-" || code.empty()))
     mode = LOCK_MODE_EVERYONE;
   
-  if (code.IsEmpty() || mode == LOCK_MODE_EVERYONE)
+  if (code.empty() || mode == LOCK_MODE_EVERYONE)
     code = "-";
 }
 
@@ -63,7 +63,7 @@ void CProfile::setDate()
 {
   CStdString strDate = g_infoManager.GetDate(true);
   CStdString strTime = g_infoManager.GetTime();
-  if (strDate.IsEmpty() || strTime.IsEmpty())
+  if (strDate.empty() || strTime.empty())
     setDate("-");
   else
     setDate(strDate+" - "+strTime);
index c6f6a80..9478f75 100644 (file)
@@ -76,10 +76,10 @@ void CGUIDialogLockSettings::CreateSettings()
   if (m_bGetUser)
   {
     AddButton(1,20142);
-    if (!m_strUser.IsEmpty())
+    if (!m_strUser.empty())
       m_settings[0].name = StringUtils::Format("%s (%s)",g_localizeStrings.Get(20142).c_str(),m_strUser.c_str());
     AddButton(2,12326);
-    if (!m_locks.code.IsEmpty())
+    if (!m_locks.code.empty())
       m_settings[1].name = StringUtils::Format("%s (%s)",g_localizeStrings.Get(12326).c_str(),g_localizeStrings.Get(20141).c_str());
     if (m_saveUserDetails)
       AddBool(3, 13423, m_saveUserDetails);
index 595cdde..ffc579d 100644 (file)
@@ -82,7 +82,7 @@ void CGUIDialogProfileSettings::SetupPage()
   SET_CONTROL_LABEL(1001,m_strDirectory);
   CGUIImage *pImage = (CGUIImage*)GetControl(2);
   if (pImage)
-    pImage->SetFileName(!m_strThumb.IsEmpty() ? m_strThumb : m_strDefaultImage);
+    pImage->SetFileName(!m_strThumb.empty() ? m_strThumb : m_strDefaultImage);
 }
 
 void CGUIDialogProfileSettings::CreateSettings()
@@ -154,7 +154,7 @@ void CGUIDialogProfileSettings::OnSettingChanged(SettingInfo &setting)
     VECSOURCES shares;
     g_mediaManager.GetLocalDrives(shares);
     CFileItemList items;
-    if (!m_strThumb.IsEmpty())
+    if (!m_strThumb.empty())
     {
       CFileItemPtr item(new CFileItem("thumb://Current", false));
       item->SetArt("thumb", m_strThumb);
@@ -176,7 +176,7 @@ void CGUIDialogProfileSettings::OnSettingChanged(SettingInfo &setting)
       {
         pImage->SetFileName("");
         pImage->SetInvalid();
-        pImage->SetFileName(!m_strThumb.IsEmpty() ? m_strThumb : m_strDefaultImage);
+        pImage->SetFileName(!m_strThumb.empty() ? m_strThumb : m_strDefaultImage);
       }
     }
   }
@@ -226,7 +226,7 @@ bool CGUIDialogProfileSettings::OnProfilePath(CStdString &dir, bool isDefault)
   share.strPath = "special://masterprofile/profiles/";
   shares.push_back(share);
   CStdString strDirectory;
-  if (dir.IsEmpty())
+  if (dir.empty())
     strDirectory = share.strPath;
   else
     strDirectory = URIUtils::AddFileToFolder("special://masterprofile/", dir);
@@ -272,7 +272,7 @@ bool CGUIDialogProfileSettings::ShowForProfile(unsigned int iProfile, bool first
     dialog->m_strDirectory.clear();
     dialog->m_strThumb.clear();
     // prompt for a name
-    if (!CGUIKeyboardFactory::ShowAndGetInput(dialog->m_strName,g_localizeStrings.Get(20093),false) || dialog->m_strName.IsEmpty())
+    if (!CGUIKeyboardFactory::ShowAndGetInput(dialog->m_strName,g_localizeStrings.Get(20093),false) || dialog->m_strName.empty())
       return false;
     // create a default path
     CStdString defaultDir = URIUtils::AddFileToFolder("profiles",CUtil::MakeLegalFileName(dialog->m_strName));
@@ -307,7 +307,7 @@ bool CGUIDialogProfileSettings::ShowForProfile(unsigned int iProfile, bool first
   {
     if (iProfile >= CProfilesManager::Get().GetNumberOfProfiles())
     {
-      if (dialog->m_strName.IsEmpty() || dialog->m_strDirectory.IsEmpty())
+      if (dialog->m_strName.empty() || dialog->m_strDirectory.empty())
         return false;
       /*CStdString strLabel;
       strLabel.Format(g_localizeStrings.Get(20047),dialog->m_strName);
index f64ccaa..608b11f 100644 (file)
@@ -253,7 +253,7 @@ bool CGUIWindowSettingsProfile::GetAutoLoginProfileChoice(int &iProfile)
     CFileItemPtr item(new CFileItem(profile->getName()));
     item->SetProperty("Addon.Summary", locked); // lock setting
     CStdString thumb = profile->getThumb();
-    if (thumb.IsEmpty())
+    if (thumb.empty())
       thumb = "unknown-user.png";
     item->SetIconImage(thumb);
     items.Add(item);
index 98cbe94..62afe6e 100644 (file)
@@ -65,7 +65,7 @@ bool CGUIWindowPrograms::OnMessage(CGUIMessage& message)
       m_dlgProgress = (CGUIDialogProgress*)g_windowManager.GetWindow(WINDOW_DIALOG_PROGRESS);
 
       // is this the first time accessing this window?
-      if (m_vecItems->GetPath() == "?" && message.GetStringParam().IsEmpty())
+      if (m_vecItems->GetPath() == "?" && message.GetStringParam().empty())
         message.SetStringParam(CMediaSourceSettings::Get().GetDefaultSource("programs"));
 
       return CGUIMediaWindow::OnMessage(message);
index 54bc0ea..977eba2 100644 (file)
@@ -580,7 +580,7 @@ bool CPVRDatabase::DeleteChannelsFromGroup(const CPVRChannelGroup &group, const
     for (unsigned int iChannelPtr = 0; iChannelPtr + iDeletedChannels < channelsToDelete.size() && iChannelPtr < 50; iChannelPtr++)
       strChannelsToDelete.AppendFormat(", %d", channelsToDelete.at(iDeletedChannels + iChannelPtr));
 
-    if (!strChannelsToDelete.IsEmpty())
+    if (!strChannelsToDelete.empty())
     {
       strChannelsToDelete = strChannelsToDelete.Right(strChannelsToDelete.length() - 2);
       strWhereClause = FormatSQL("idGroup = %u AND idChannel IN (%s)", group.GroupID(), strChannelsToDelete.c_str());
@@ -794,7 +794,7 @@ bool CPVRDatabase::PersistGroupMembers(CPVRChannelGroup &group)
           member.channel->ChannelID(), group.GroupID(), member.iChannelNumber);
 
       CStdString strValue = GetSingleValue("map_channelgroups_channels", "idChannel", strWhereClause);
-      if (strValue.IsEmpty())
+      if (strValue.empty())
       {
         strQuery = FormatSQL("REPLACE INTO map_channelgroups_channels ("
             "idGroup, idChannel, iChannelNumber) "
@@ -825,7 +825,7 @@ bool CPVRDatabase::DeleteClients()
 bool CPVRDatabase::Delete(const CPVRClient &client)
 {
   /* invalid client uid */
-  if (client.ID().IsEmpty())
+  if (client.ID().empty())
   {
     CLog::Log(LOGERROR, "PVR - %s - invalid client uid", __FUNCTION__);
     return false;
@@ -840,7 +840,7 @@ int CPVRDatabase::GetClientId(const CStdString &strClientUid)
   CStdString strWhereClause = FormatSQL("sUid = '%s'", strClientUid.c_str());
   CStdString strValue = GetSingleValue("clients", "idClient", strWhereClause);
 
-  if (strValue.IsEmpty())
+  if (strValue.empty())
     return -1;
 
   return atol(strValue.c_str());
@@ -855,7 +855,7 @@ bool CPVRDatabase::ResetEPG(void)
 bool CPVRDatabase::Persist(CPVRChannelGroup &group)
 {
   bool bReturn(false);
-  if (group.GroupName().IsEmpty())
+  if (group.GroupName().empty())
   {
     CLog::Log(LOGERROR, "%s - empty group name", __FUNCTION__);
     return bReturn;
@@ -897,7 +897,7 @@ int CPVRDatabase::Persist(const AddonPtr client)
   int iReturn(-1);
 
   /* invalid client uid or name */
-  if (client->Name().IsEmpty() || client->ID().IsEmpty())
+  if (client->Name().empty() || client->ID().empty())
   {
     CLog::Log(LOGERROR, "PVR - %s - invalid client uid or name", __FUNCTION__);
     return iReturn;
index a2b3f90..c373b35 100644 (file)
@@ -558,7 +558,7 @@ void CPVRGUIInfo::CharInfoFrontendStatus(CStdString &strValue) const
 
 void CPVRGUIInfo::CharInfoBackendName(CStdString &strValue) const
 {
-  if (m_strBackendName.IsEmpty())
+  if (m_strBackendName.empty())
     strValue = StringUtils::Format("%s", g_localizeStrings.Get(13205).c_str());
   else
     strValue = StringUtils::Format("%s", m_strBackendName.c_str());
@@ -566,7 +566,7 @@ void CPVRGUIInfo::CharInfoBackendName(CStdString &strValue) const
 
 void CPVRGUIInfo::CharInfoBackendVersion(CStdString &strValue) const
 {
-  if (m_strBackendVersion.IsEmpty())
+  if (m_strBackendVersion.empty())
     strValue = StringUtils::Format("%s", g_localizeStrings.Get(13205).c_str());
   else
     strValue = StringUtils::Format("%s",  m_strBackendVersion.c_str());
@@ -574,7 +574,7 @@ void CPVRGUIInfo::CharInfoBackendVersion(CStdString &strValue) const
 
 void CPVRGUIInfo::CharInfoBackendHost(CStdString &strValue) const
 {
-  if (m_strBackendHost.IsEmpty())
+  if (m_strBackendHost.empty())
     strValue = StringUtils::Format("%s", g_localizeStrings.Get(13205).c_str());
   else
     strValue = StringUtils::Format("%s", m_strBackendHost.c_str());
@@ -582,7 +582,7 @@ void CPVRGUIInfo::CharInfoBackendHost(CStdString &strValue) const
 
 void CPVRGUIInfo::CharInfoBackendDiskspace(CStdString &strValue) const
 {
-  if (m_strBackendDiskspace.IsEmpty())
+  if (m_strBackendDiskspace.empty())
     strValue = StringUtils::Format("%s", g_localizeStrings.Get(13205).c_str());
   else
     strValue = StringUtils::Format("%s", m_strBackendDiskspace.c_str());
@@ -590,7 +590,7 @@ void CPVRGUIInfo::CharInfoBackendDiskspace(CStdString &strValue) const
 
 void CPVRGUIInfo::CharInfoBackendChannels(CStdString &strValue) const
 {
-  if (m_strBackendChannels.IsEmpty())
+  if (m_strBackendChannels.empty())
     strValue = StringUtils::Format("%s", g_localizeStrings.Get(13205).c_str());
   else
     strValue = StringUtils::Format("%s", m_strBackendChannels.c_str());
@@ -598,7 +598,7 @@ void CPVRGUIInfo::CharInfoBackendChannels(CStdString &strValue) const
 
 void CPVRGUIInfo::CharInfoBackendTimers(CStdString &strValue) const
 {
-  if (m_strBackendTimers.IsEmpty())
+  if (m_strBackendTimers.empty())
     strValue = StringUtils::Format("%s", g_localizeStrings.Get(13205).c_str());
   else
     strValue = StringUtils::Format("%s", m_strBackendTimers.c_str());
@@ -606,7 +606,7 @@ void CPVRGUIInfo::CharInfoBackendTimers(CStdString &strValue) const
 
 void CPVRGUIInfo::CharInfoBackendRecordings(CStdString &strValue) const
 {
-  if (m_strBackendRecordings.IsEmpty())
+  if (m_strBackendRecordings.empty())
     strValue = StringUtils::Format("%s", g_localizeStrings.Get(13205).c_str());
   else
     strValue = StringUtils::Format("%s", m_strBackendRecordings.c_str());
@@ -614,7 +614,7 @@ void CPVRGUIInfo::CharInfoBackendRecordings(CStdString &strValue) const
 
 void CPVRGUIInfo::CharInfoPlayingClientName(CStdString &strValue) const
 {
-  if (m_strPlayingClientName.IsEmpty())
+  if (m_strPlayingClientName.empty())
     strValue = StringUtils::Format("%s", g_localizeStrings.Get(13205).c_str());
   else
     strValue = StringUtils::Format("%s", m_strPlayingClientName.c_str());
index 7792753..bd6b262 100644 (file)
@@ -472,7 +472,7 @@ bool CPVRManager::SetWakeupCommand(void)
     return false;
 
   const CStdString strWakeupCommand = CSettings::Get().GetString("pvrpowermanagement.setwakeupcmd");
-  if (!strWakeupCommand.IsEmpty() && m_timers)
+  if (!strWakeupCommand.empty() && m_timers)
   {
     time_t iWakeupTime;
     const CDateTime nextEvent = m_timers->GetNextEventTime();
index e3f77d5..36d4146 100644 (file)
@@ -1322,7 +1322,7 @@ bool CPVRClient::OpenStream(const CPVRChannel &channel, bool bIsSwitchingChannel
   {
     CLog::Log(LOGDEBUG, "add-on '%s' can not play channel '%s'", GetFriendlyName().c_str(), channel.ChannelName().c_str());
   }
-  else if (!channel.StreamURL().IsEmpty())
+  else if (!channel.StreamURL().empty())
   {
     CLog::Log(LOGDEBUG, "opening live stream on url '%s'", channel.StreamURL().c_str());
     bReturn = true;
index 0435a34..5b5706e 100644 (file)
@@ -310,9 +310,9 @@ bool CPVRClients::SwitchChannel(const CPVRChannel &channel)
       // different backend
       currentChannel->ClientID() != channel.ClientID() ||
       // stream URL should always be opened as a new file
-      !channel.StreamURL().IsEmpty() || !currentChannel->StreamURL().IsEmpty())
+      !channel.StreamURL().empty() || !currentChannel->StreamURL().empty())
   {
-    if (channel.StreamURL().IsEmpty())
+    if (channel.StreamURL().empty())
     {
       CloseStream();
       bSwitchSuccessful = OpenStream(channel, true);
index e0fb7eb..171c617 100644 (file)
@@ -104,7 +104,7 @@ CPVRChannel::CPVRChannel(const PVR_CHANNEL &channel, unsigned int iClientId)
   m_bEPGCreated             = false;
   m_bChanged                = false;
 
-  if (m_strChannelName.IsEmpty())
+  if (m_strChannelName.empty())
     m_strChannelName = StringUtils::Format("%s %d", g_localizeStrings.Get(19029).c_str(), m_iUniqueId);
 
   UpdateEncryptionName();
@@ -209,9 +209,9 @@ bool CPVRChannel::UpdateFromClient(const CPVRChannel &channel)
   SetClientChannelName(channel.ClientChannelName());
 
   CSingleLock lock(m_critSection);
-  if (m_strChannelName.IsEmpty())
+  if (m_strChannelName.empty())
     SetChannelName(channel.ClientChannelName());
-  if (m_strIconPath.IsEmpty()||(!m_strIconPath.Equals(channel.IconPath()) && !IsUserSetIcon()))
+  if (m_strIconPath.empty()||(!m_strIconPath.Equals(channel.IconPath()) && !IsUserSetIcon()))
     SetIconPath(channel.IconPath());
 
   return m_bChanged;
@@ -312,7 +312,7 @@ bool CPVRChannel::SetIconPath(const CStdString &strIconPath, bool bIsUserSetIcon
 
     /* did the user change the icon? */
     if (bIsUserSetIcon)
-      m_bIsUserSetIcon = !m_strIconPath.IsEmpty();
+      m_bIsUserSetIcon = !m_strIconPath.empty();
          
     return true;
   }
@@ -324,7 +324,7 @@ bool CPVRChannel::SetChannelName(const CStdString &strChannelName)
 {
   CStdString strName(strChannelName);
 
-  if (strName.IsEmpty())
+  if (strName.empty())
     strName = StringUtils::Format(g_localizeStrings.Get(19085).c_str(), ClientChannelNumber());
 
   CSingleLock lock(m_critSection);
@@ -378,8 +378,8 @@ bool CPVRChannel::SetLastWatched(time_t iLastWatched)
 bool CPVRChannel::IsEmpty() const
 {
   CSingleLock lock(m_critSection);
-  return (m_strFileNameAndPath.IsEmpty() ||
-          m_strStreamURL.IsEmpty());
+  return (m_strFileNameAndPath.empty() ||
+          m_strStreamURL.empty());
 }
 
 /********** Client related channel methods **********/
@@ -684,7 +684,7 @@ bool CPVRChannel::SetEPGScraper(const CStdString &strScraper)
 
   if (m_strEPGScraper != strScraper)
   {
-    bool bCleanEPG = !m_strEPGScraper.IsEmpty() || strScraper.IsEmpty();
+    bool bCleanEPG = !m_strEPGScraper.empty() || strScraper.empty();
 
     /* update the scraper name */
     m_strEPGScraper = StringUtils::Format("%s", strScraper.c_str());
index 4ebefbd..fadb06d 100644 (file)
@@ -256,7 +256,7 @@ void CPVRChannelGroup::SearchAndSetChannelIcons(bool bUpdateDb /* = false */)
     PVRChannelGroupMember groupMember = m_members.at(ptr);
 
     /* skip if an icon is already set */
-    if (!groupMember.channel->IconPath().IsEmpty())
+    if (!groupMember.channel->IconPath().empty())
       continue;
 
     CStdString strBasePath = CSettings::Get().GetString("pvrmenu.iconpath");
index c2486bf..b7601a5 100644 (file)
@@ -61,7 +61,7 @@ bool CPVRChannelGroups::GetGroupsFromClients(void)
 
 bool CPVRChannelGroups::Update(const CPVRChannelGroup &group, bool bSaveInDb)
 {
-  if (group.GroupName().IsEmpty() && group.GroupID() <= 0)
+  if (group.GroupName().empty() && group.GroupID() <= 0)
     return true;
 
   CPVRChannelGroupPtr updateGroup;
index a493486..6e70801 100644 (file)
@@ -500,7 +500,7 @@ bool CGUIDialogPVRChannelManager::OnClickButtonNewChannel(CGUIMessage &message)
       CStdString strURL = "";
       if (CGUIKeyboardFactory::ShowAndGetInput(strURL, g_localizeStrings.Get(19214), false))
       {
-        if (!strURL.IsEmpty())
+        if (!strURL.empty())
         {
           CPVRChannel *newchannel = new CPVRChannel(m_bIsRadio);
           newchannel->SetChannelName(g_localizeStrings.Get(19204));
index 1b6b756..6c80d75 100644 (file)
@@ -395,7 +395,7 @@ void CGUIDialogPVRTimerSettings::OnOkay()
   CPVRTimerInfoTag* tag = m_timerItem->GetPVRTimerInfoTag();
 
   // Set the timer's title to the channel name if it's 'New Timer' or empty
-  if (tag->m_strTitle == g_localizeStrings.Get(19056) || tag->m_strTitle.IsEmpty())
+  if (tag->m_strTitle == g_localizeStrings.Get(19056) || tag->m_strTitle.empty())
   {
     CPVRChannelPtr channel = g_PVRChannelGroups->GetByUniqueID(tag->m_iClientChannelUid, tag->m_iClientId);
     if (channel)
index 8ad5286..7955168 100644 (file)
@@ -280,7 +280,7 @@ void CPVRRecording::Update(const CPVRRecording &tag)
 
 void CPVRRecording::UpdatePath(void)
 {
-  if (!m_strStreamURL.IsEmpty())
+  if (!m_strStreamURL.empty())
   {
     m_strFileNameAndPath = m_strStreamURL;
   }
@@ -292,9 +292,9 @@ void CPVRRecording::UpdatePath(void)
     CStdString strChannel;
     strTitle.Replace('/',' ');
 
-    if (!m_strDirectory.IsEmpty())
+    if (!m_strDirectory.empty())
       strDirectory = StringUtils::Format("%s/", m_strDirectory.c_str());
-    if (!m_strChannelName.IsEmpty())
+    if (!m_strChannelName.empty())
       strChannel = StringUtils::Format(" (%s)", m_strChannelName.c_str());
     m_strFileNameAndPath = StringUtils::Format("pvr://recordings/%s%s, TV%s, %s.pvr", strDirectory.c_str(), strTitle.c_str(), strChannel.c_str(), strDatetime.c_str());
   }
index 111a3f3..e822587 100644 (file)
@@ -69,7 +69,7 @@ const CStdString CPVRRecordings::GetDirectoryFromPath(const CStdString &strPath,
   CStdString strUseBase = TrimSlashes(strBase);
 
   /* strip the base or return an empty value if it doesn't fit or match */
-  if (!strUseBase.IsEmpty())
+  if (!strUseBase.empty())
   {
     /* adding "/" to make sure that base matches the complete folder name and not only parts of it */
     if (strUsePath.GetLength() <= strUseBase.GetLength() || strUsePath.Left(strUseBase.GetLength() + 1) != strUseBase + "/")
@@ -111,13 +111,13 @@ void CPVRRecordings::GetContents(const CStdString &strDirectory, CFileItemList *
     pFileItem->m_dateTime = current->RecordingTimeAsLocalTime();
     pFileItem->SetPath(current->m_strFileNameAndPath);
 
-    if (!current->m_strIconPath.IsEmpty())
+    if (!current->m_strIconPath.empty())
       pFileItem->SetIconImage(current->m_strIconPath);
 
-    if (!current->m_strThumbnailPath.IsEmpty())
+    if (!current->m_strThumbnailPath.empty())
       pFileItem->SetArt("thumb", current->m_strThumbnailPath);
 
-    if (!current->m_strFanartPath.IsEmpty())
+    if (!current->m_strFanartPath.empty())
       pFileItem->SetArt("fanart", current->m_strFanartPath);
 
     pFileItem->SetOverlayImage(CGUIListItem::ICON_OVERLAY_UNWATCHED, pFileItem->GetPVRRecordingInfoTag()->m_playCount > 0);
@@ -136,7 +136,7 @@ void CPVRRecordings::GetSubDirectories(const CStdString &strBase, CFileItemList
   {
     CPVRRecording *current = m_recordings.at(iRecordingPtr);
     const CStdString strCurrent = GetDirectoryFromPath(current->m_strDirectory, strUseBase);
-    if (strCurrent.IsEmpty())
+    if (strCurrent.empty())
       continue;
 
     CStdString strFilePath;
index 6488790..92721c3 100644 (file)
@@ -333,7 +333,7 @@ bool CPVRTimerInfoTag::UpdateEntry(const CPVRTimerInfoTag &tag)
   m_iGenreSubType     = tag.m_iGenreSubType;
   m_strSummary        = tag.m_strSummary;
 
-  if (m_strSummary.IsEmpty())
+  if (m_strSummary.empty())
     UpdateSummary();
 
   return true;
@@ -549,7 +549,7 @@ void CPVRTimerInfoTag::QueueNotification(void) const
     CStdString strMessage;
     GetNotificationText(strMessage);
 
-    if (!strMessage.IsEmpty())
+    if (!strMessage.empty())
       CGUIDialogKaiToast::QueueNotification(CGUIDialogKaiToast::Info, g_localizeStrings.Get(19166), strMessage);
   }
 }
index b999599..9ffaf5b 100644 (file)
@@ -456,7 +456,7 @@ bool CGUIWindowPVRChannels::OnContextButtonSetThumb(CFileItem *item, CONTEXT_BUT
     CFileItemList items;
     CPVRChannel *channel = item->GetPVRChannelInfoTag();
 
-    if (!channel->IconPath().IsEmpty())
+    if (!channel->IconPath().empty())
     {
       /* add the current thumb, if available */
       CFileItemPtr current(new CFileItem("thumb://Current", false));
index e349b6e..c501ee8 100644 (file)
@@ -479,7 +479,7 @@ bool CGUIWindowPVRCommon::ActionDeleteRecording(CFileItem *item)
 
   /* check if the recording tag is valid */
   CPVRRecording *recTag = (CPVRRecording *) item->GetPVRRecordingInfoTag();
-  if (!recTag || recTag->m_strRecordingId.IsEmpty())
+  if (!recTag || recTag->m_strRecordingId.empty())
     return bReturn;
 
   /* show a confirmation dialog */
@@ -707,7 +707,7 @@ bool CGUIWindowPVRCommon::PlayFile(CFileItem *item, bool bPlayMinimized /* = fal
       if (channel && (g_PVRManager.IsPlayingTV() || g_PVRManager.IsPlayingRadio()) &&
          (channel->IsRadio() == g_PVRManager.IsPlayingRadio()))
       {
-        if (channel->StreamURL().IsEmpty())
+        if (channel->StreamURL().empty())
           bSwitchSuccessful = g_application.m_pPlayer->SwitchChannel(*channel);
       }
 
index 12667f2..2aecdcf 100644 (file)
@@ -116,7 +116,7 @@ void CGUIWindowPVRRecordings::GetContextButtons(int itemNumber, CContextButtons
     buttons.Add(CONTEXT_BUTTON_FIND, 19003);      /* Find similar program */
     buttons.Add(CONTEXT_BUTTON_PLAY_ITEM, 12021); /* Play this recording */
     CStdString resumeString = GetResumeString(*pItem);
-    if (!resumeString.IsEmpty())
+    if (!resumeString.empty())
     {
       buttons.Add(CONTEXT_BUTTON_RESUME_ITEM, resumeString);
     }
@@ -277,7 +277,7 @@ bool CGUIWindowPVRRecordings::OnClickList(CGUIMessage &message)
     {
       int choice = CONTEXT_BUTTON_PLAY_ITEM;
       CStdString resumeString = GetResumeString(*pItem);
-      if (!resumeString.IsEmpty())
+      if (!resumeString.empty())
       {
         CContextButtons choices;
         choices.Add(CONTEXT_BUTTON_RESUME_ITEM, resumeString);
index 54264b7..77263b7 100644 (file)
@@ -439,7 +439,7 @@ bool CAdvancedSettings::Load()
   ParseSettingsFile(CProfilesManager::Get().GetUserDataItem("advancedsettings.xml"));
 
   // Add the list of disc stub extensions (if any) to the list of video extensions
-  if (!m_discStubExtensions.IsEmpty())
+  if (!m_discStubExtensions.empty())
     m_videoExtensions += "|" + m_discStubExtensions;
 
   return true;
@@ -1015,7 +1015,7 @@ void CAdvancedSettings::ParseSettingsFile(const CStdString &file)
       if (pTo)
         strTo = pTo->FirstChild()->Value();
 
-      if (!strFrom.IsEmpty() && !strTo.IsEmpty())
+      if (!strFrom.empty() && !strTo.empty())
       {
         CLog::Log(LOGDEBUG,"  Registering substition pair:");
         CLog::Log(LOGDEBUG,"    From: [%s]", strFrom.c_str());
@@ -1025,7 +1025,7 @@ void CAdvancedSettings::ParseSettingsFile(const CStdString &file)
       else
       {
         // error message about missing tag
-        if (strFrom.IsEmpty())
+        if (strFrom.empty())
           CLog::Log(LOGERROR,"  Missing <from> tag");
         else
           CLog::Log(LOGERROR,"  Missing <to> tag");
index 8984f8f..0e613b0 100644 (file)
@@ -349,7 +349,7 @@ bool CMediaManager::IsDiscInDrive(const CStdString& devicePath)
   else
     return false;
 #else
-  if(URIUtils::IsDVD(devicePath) || devicePath.IsEmpty())
+  if(URIUtils::IsDVD(devicePath) || devicePath.empty())
     return MEDIA_DETECT::CDetectDVDMedia::IsDiscInDrive();   // TODO: switch all ports to use auto sources
   else
     return true; // Assume other paths to be mounted already
@@ -384,7 +384,7 @@ bool CMediaManager::IsAudio(const CStdString& devicePath)
 bool CMediaManager::HasOpticalDrive()
 {
 #ifdef HAS_DVD_DRIVE
-  if (!m_strFirstAvailDrive.IsEmpty())
+  if (!m_strFirstAvailDrive.empty())
     return true;
 #endif
   return false;
@@ -504,17 +504,17 @@ CStdString CMediaManager::GetDiskUniqueId(const CStdString& devicePath)
   if (pInfo == NULL)
     return "";
 
-  if (mediaPath.IsEmpty() && pInfo->IsAudio(1))
+  if (mediaPath.empty() && pInfo->IsAudio(1))
     mediaPath = "cdda://local/";
 
-  if (mediaPath.IsEmpty() && (pInfo->IsISOUDF(1) || pInfo->IsISOHFS(1) || pInfo->IsIso9660(1) || pInfo->IsIso9660Interactive(1)))
+  if (mediaPath.empty() && (pInfo->IsISOUDF(1) || pInfo->IsISOHFS(1) || pInfo->IsIso9660(1) || pInfo->IsIso9660Interactive(1)))
     mediaPath = "iso9660://";
 
-  if (mediaPath.IsEmpty())
+  if (mediaPath.empty())
     mediaPath = devicePath;
 
 #ifdef TARGET_WINDOWS
-  if (mediaPath.IsEmpty() || mediaPath.CompareNoCase("iso9660://") == 0)
+  if (mediaPath.empty() || mediaPath.CompareNoCase("iso9660://") == 0)
   {
     mediaPath = g_mediaManager.TranslateDevicePath("");
     URIUtils::AddSlashAtEnd(mediaPath);
index c0c56d7..2bedae5 100644 (file)
@@ -69,7 +69,7 @@ std::string CWin32StorageProvider::GetFirstOpticalDeviceFileName()
 
 bool CWin32StorageProvider::Eject(CStdString mountpath)
 {
-  if (!mountpath.IsEmpty())
+  if (!mountpath.empty())
   {
     return CWIN32Util::EjectDrive(mountpath[0]);
   }
index 193b512..727f1b2 100644 (file)
@@ -114,7 +114,7 @@ bool CXBMCTestUtils::SetReferenceFileBasePath()
 {
   CStdString xbmcPath;
   CUtil::GetHomePath(xbmcPath);
-  if (xbmcPath.IsEmpty())
+  if (xbmcPath.empty())
     return false;
 
   /* Set xbmc path and xbmcbin path */
index df0cfcf..008fae9 100644 (file)
@@ -109,7 +109,7 @@ void CAlarmClock::Stop(const CStdString& strName, bool bSilent /* false */)
                                      static_cast<int>(remaining)/60,
                                      static_cast<int>(remaining)%60);
   }
-  if (iter->second.m_strCommand.IsEmpty() || iter->second.m_fSecs > iter->second.watch.GetElapsedSeconds())
+  if (iter->second.m_strCommand.empty() || iter->second.m_fSecs > iter->second.watch.GetElapsedSeconds())
   {
     if(!bSilent)
       CGUIDialogKaiToast::QueueNotification(CGUIDialogKaiToast::Info, strAlarmClock, strMessage);
index 2b639f6..9844987 100644 (file)
@@ -520,10 +520,10 @@ bool CCPUInfo::getTemperature(CTemperature& temperature)
 
   temperature.SetState(CTemperature::invalid);
 
-  if (cmd.IsEmpty() && m_fProcTemperature == NULL)
+  if (cmd.empty() && m_fProcTemperature == NULL)
     return false;
 
-  if (!cmd.IsEmpty())
+  if (!cmd.empty())
   {
     p = popen (cmd.c_str(), "r");
     if (p)
index abe966b..d7fa45b 100644 (file)
@@ -356,9 +356,9 @@ CStdString CEdenVideoArtUpdater::GetCachedEpisodeThumb(const CFileItem &item)
 
 CStdString CEdenVideoArtUpdater::GetCachedVideoThumb(const CFileItem &item)
 {
-  if (item.m_bIsFolder && !item.GetVideoInfoTag()->m_strPath.IsEmpty())
+  if (item.m_bIsFolder && !item.GetVideoInfoTag()->m_strPath.empty())
     return GetThumb(item.GetVideoInfoTag()->m_strPath, CProfilesManager::Get().GetVideoThumbFolder(), true);
-  else if (!item.GetVideoInfoTag()->m_strFileNameAndPath.IsEmpty())
+  else if (!item.GetVideoInfoTag()->m_strFileNameAndPath.empty())
   {
     CStdString path = item.GetVideoInfoTag()->m_strFileNameAndPath;
     if (URIUtils::IsStack(path))
index 653d20d..a1da905 100644 (file)
@@ -141,7 +141,7 @@ bool CFanart::ParseColors(const CStdString &colorsIn, CStdString &colorsOut)
   // Essentially we read the colors in using the proper format, and store them in our own fixed temporary format (3 DWORDS), and then
   // write them back in in the specified format.
 
-  if (colorsIn.IsEmpty())
+  if (colorsIn.empty())
     return false;
 
   // check for the TVDB RGB triplets "|68,69,59|69,70,58|78,78,68|"
index 4fb075b..901eba9 100644 (file)
@@ -180,7 +180,7 @@ bool CFileOperationJob::DoProcess(FileAction action, CFileItemList & items, cons
       }
 
       CStdString strnewDestFile;
-      if(!strDestFile.IsEmpty()) // only do this if we have a destination
+      if(!strDestFile.empty()) // only do this if we have a destination
         strnewDestFile = URIUtils::AddFileToFolder(strDestFile, strFileName);
 
       if (pItem->m_bIsFolder)
index 8773160..9b52e78 100644 (file)
@@ -122,12 +122,12 @@ CStdString CLabelFormatter::GetContent(unsigned int label, const CFileItem *item
   for (unsigned int i = 0; i < m_dynamicContent[label].size(); i++)
   {
     dynamicRight = GetMaskContent(m_dynamicContent[label][i], item);
-    if ((i == 0 || !dynamicLeft.IsEmpty()) && !dynamicRight.IsEmpty())
+    if ((i == 0 || !dynamicLeft.empty()) && !dynamicRight.empty())
       strLabel += m_staticContent[label][i];
     strLabel += dynamicRight;
     dynamicLeft = dynamicRight;
   }
-  if (!dynamicLeft.IsEmpty())
+  if (!dynamicLeft.empty())
     strLabel += m_staticContent[label][m_dynamicContent[label].size()];
 
   return strLabel;
@@ -136,7 +136,7 @@ CStdString CLabelFormatter::GetContent(unsigned int label, const CFileItem *item
 void CLabelFormatter::FormatLabel(CFileItem *item) const
 {
   CStdString maskedLabel = GetContent(0, item);
-  if (!maskedLabel.IsEmpty())
+  if (!maskedLabel.empty())
     item->SetLabel(maskedLabel);
   else if (!item->m_bIsFolder && m_hideFileExtensions)
     item->RemoveExtension();
@@ -179,7 +179,7 @@ CStdString CLabelFormatter::GetMaskContent(const CMaskString &mask, const CFileI
       value = movie->m_strTitle;
     break;
   case 'Z':
-    if (movie && !movie->m_strShowTitle.IsEmpty())
+    if (movie && !movie->m_strShowTitle.empty())
       value = movie->m_strShowTitle;
     break;
   case 'B':
@@ -324,7 +324,7 @@ CStdString CLabelFormatter::GetMaskContent(const CMaskString &mask, const CFileI
       value = pic->GetDateTimeTaken().GetAsLocalizedDate();
     break;
   }
-  if (!value.IsEmpty())
+  if (!value.empty())
     return mask.m_prefix + value + mask.m_postfix;
   return "";
 }
index 266b9a5..a51b445 100644 (file)
@@ -528,9 +528,9 @@ string CMime::GetMimeType(const string &extension)
 string CMime::GetMimeType(const CFileItem &item)
 {
   CStdString path = item.GetPath();
-  if (item.HasVideoInfoTag() && !item.GetVideoInfoTag()->GetPath().IsEmpty())
+  if (item.HasVideoInfoTag() && !item.GetVideoInfoTag()->GetPath().empty())
     path = item.GetVideoInfoTag()->GetPath();
-  else if (item.HasMusicInfoTag() && !item.GetMusicInfoTag()->GetURL().IsEmpty())
+  else if (item.HasMusicInfoTag() && !item.GetMusicInfoTag()->GetURL().empty())
     path = item.GetMusicInfoTag()->GetURL();
 
   return GetMimeType(URIUtils::GetExtension(path));
index d85dd93..97ff833 100644 (file)
@@ -181,7 +181,7 @@ void CRssReader::Process()
       }
       http.Cancel();
     }
-    if (!strXML.IsEmpty() && m_pObserver)
+    if (!strXML.empty() && m_pObserver)
     {
       // erase any <content:encoded> tags (also unsupported by tinyxml)
       int iStart = strXML.Find("<content:encoded>");
index 14dff31..2fc2875 100644 (file)
@@ -118,7 +118,7 @@ bool CScraperUrl::ParseElement(const TiXmlElement* element)
 
 bool CScraperUrl::ParseString(CStdString strUrl)
 {
-  if (strUrl.IsEmpty())
+  if (strUrl.empty())
     return false;
 
   CXBMCTinyXML doc;
@@ -201,7 +201,7 @@ bool CScraperUrl::Get(const SUrlEntry& scrURL, std::string& strHTML, XFILE::CCur
   if (scrURL.m_isgz)
     http.SetContentEncoding("gzip");
 
-  if (!scrURL.m_cache.IsEmpty())
+  if (!scrURL.m_cache.empty())
   {
     strCachePath = URIUtils::AddFileToFolder(g_advancedSettings.m_cachePath,
                               "scrapers/" + cacheContext + "/" + scrURL.m_cache);
@@ -255,7 +255,7 @@ bool CScraperUrl::Get(const SUrlEntry& scrURL, std::string& strHTML, XFILE::CCur
       strHTML = converted;
   }
 
-  if (!scrURL.m_cache.IsEmpty())
+  if (!scrURL.m_cache.empty())
   {
     CStdString strCachePath = URIUtils::AddFileToFolder(g_advancedSettings.m_cachePath,
                               "scrapers/" + cacheContext + "/" + scrURL.m_cache);
@@ -271,7 +271,7 @@ bool CScraperUrl::Get(const SUrlEntry& scrURL, std::string& strHTML, XFILE::CCur
 // <TAG><url>...</url>...</TAG> (parsed by ParseElement) or <url>...</url> (ditto)
 bool CScraperUrl::ParseEpisodeGuide(CStdString strUrls)
 {
-  if (strUrls.IsEmpty())
+  if (strUrls.empty())
     return false;
 
   // ok, now parse the xml file
@@ -297,7 +297,7 @@ bool CScraperUrl::ParseEpisodeGuide(CStdString strUrls)
 
 CStdString CScraperUrl::GetThumbURL(const CScraperUrl::SUrlEntry &entry)
 {
-  if (entry.m_spoof.IsEmpty())
+  if (entry.m_spoof.empty())
     return entry.m_url;
   CStdString spoof = entry.m_spoof;
   CURL::Encode(spoof);
index 824c003..d9cbb61 100644 (file)
@@ -229,7 +229,7 @@ void CScreenShot::TakeScreenshot()
     }
   }
 
-  if (strDir.IsEmpty())
+  if (strDir.empty())
   {
     strDir = "special://temp/";
     if (!savingScreenshots)
@@ -241,11 +241,11 @@ void CScreenShot::TakeScreenshot()
   }
   URIUtils::RemoveSlashAtEnd(strDir);
 
-  if (!strDir.IsEmpty())
+  if (!strDir.empty())
   {
     CStdString file = CUtil::GetNextFilename(URIUtils::AddFileToFolder(strDir, "screenshot%03d.png"), 999);
 
-    if (!file.IsEmpty())
+    if (!file.empty())
     {
       TakeScreenshot(file, false);
       if (savingScreenshots)
@@ -263,7 +263,7 @@ void CScreenShot::TakeScreenshot()
           }
         }
 
-        if (!newDir.IsEmpty())
+        if (!newDir.empty())
         {
           for (unsigned int i = 0; i < screenShots.size(); i++)
           {
index 174154e..2c248b2 100644 (file)
@@ -79,7 +79,7 @@ void CSplash::Show(const CStdString& message)
   m_image->FreeResources();
 
   // render message
-  if (!message.IsEmpty())
+  if (!message.empty())
   {
     if (!m_layoutWasLoading)
     {
@@ -122,7 +122,7 @@ void CSplash::Process()
 
 bool CSplash::Start()
 {
-  if (m_ImageName.IsEmpty() || !CFile::Exists(m_ImageName))
+  if (m_ImageName.empty() || !CFile::Exists(m_ImageName))
   {
     CLog::Log(LOGDEBUG, "Splash image %s not found", m_ImageName.c_str());
     return false;
index b576e21..92671e9 100644 (file)
@@ -2847,11 +2847,6 @@ public:
     return GetLength();
   }
 
-  bool IsEmpty() const
-  {
-    return this->empty();
-  }
-
   MYTYPE Left(int nCount) const
   {
         // Range check the count.
index e6995e4..2d15f3a 100644 (file)
@@ -630,9 +630,9 @@ CStdString StringUtils::SecondsToTimeString(long lSeconds, TIME_FORMAT format)
   else if (format & TIME_FORMAT_H)
     strHMS.AppendFormat("%i", hh);
   if (format & TIME_FORMAT_MM)
-    strHMS.AppendFormat(strHMS.IsEmpty() ? "%02.2i" : ":%02.2i", mm);
+    strHMS.AppendFormat(strHMS.empty() ? "%02.2i" : ":%02.2i", mm);
   if (format & TIME_FORMAT_SS)
-    strHMS.AppendFormat(strHMS.IsEmpty() ? "%02.2i" : ":%02.2i", ss);
+    strHMS.AppendFormat(strHMS.empty() ? "%02.2i" : ":%02.2i", ss);
   return strHMS;
 }
 
index e24021d..5c522bc 100644 (file)
@@ -268,7 +268,7 @@ bool CSysInfo::GetDiskSpace(const CStdString drive,int& iTotal, int& iTotalFree,
   ULARGE_INTEGER ULTotal= { { 0 } };
   ULARGE_INTEGER ULTotalFree= { { 0 } };
 
-  if( !drive.IsEmpty() && !drive.Equals("*") )
+  if( !drive.empty() && !drive.Equals("*") )
   {
 #ifdef TARGET_WINDOWS
     UINT uidriveType = GetDriveType(( drive + ":\\" ));
@@ -707,7 +707,7 @@ CStdString CSysInfo::GetLinuxDistro()
 
     fclose(os_release);
 
-    if (!result.IsEmpty())
+    if (!result.empty())
       return result;
   }
 
@@ -717,12 +717,12 @@ CStdString CSysInfo::GetLinuxDistro()
     if (fread(buffer, sizeof(char), sizeof(buffer), pipe) > 0 && !ferror(pipe))
       result = buffer;
     pclose(pipe);
-    if (!result.IsEmpty())
+    if (!result.empty())
       return result.Trim();
   }
 
   FILE* file = NULL;
-  for (int i = 0; result.IsEmpty() && release_file[i]; i++)
+  for (int i = 0; result.empty() && release_file[i]; i++)
   {
     file = fopen(release_file[i], "r");
     if (file)
@@ -730,7 +730,7 @@ CStdString CSysInfo::GetLinuxDistro()
       if (fgets(buffer, sizeof(buffer), file))
       {
         result = buffer;
-        if (!result.IsEmpty())
+        if (!result.empty())
           return result.Trim();
       }
       fclose(file);
index c185ac2..5f625c1 100644 (file)
@@ -42,7 +42,7 @@ bool CTextSearch::IsValid(void) const
 
 bool CTextSearch::Search(const CStdString &strHaystack) const
 {
-  if (strHaystack.IsEmpty() || !IsValid())
+  if (strHaystack.empty() || !IsValid())
     return false;
 
   CStdString strSearch(strHaystack);
index a2e7829..0862884 100644 (file)
@@ -110,9 +110,9 @@ void CTuxBoxService::Process()
     if(g_tuxbox.GetHttpXML(url,"currentservicedata"))
     {
       CLog::Log(LOGDEBUG, "%s - receive current service data was successful", __FUNCTION__);
-      if(!strCurrentServiceName.IsEmpty()&&
+      if(!strCurrentServiceName.empty()&&
         !strCurrentServiceName.Equals("NULL") &&
-        !g_tuxbox.sCurSrvData.service_name.IsEmpty() &&
+        !g_tuxbox.sCurSrvData.service_name.empty() &&
         !g_tuxbox.sCurSrvData.service_name.Equals("-") &&
         !g_tuxbox.vVideoSubChannel.mode)
       {
@@ -174,7 +174,7 @@ bool CTuxBoxUtil::ParseBouquets(TiXmlElement *root, CFileItemList &items, CURL &
     CLog::Log(LOGWARNING, "%s - No %s found", __FUNCTION__, strChild.c_str());
     return false;
   }
-  if (strFilter.IsEmpty())
+  if (strFilter.empty())
   {
     pNode = pRootElement->FirstChild(strChild.c_str());
     if (!pNode)
@@ -233,7 +233,7 @@ bool CTuxBoxUtil::ParseBouquetsEnigma2(TiXmlElement *root, CFileItemList &items,
     CLog::Log(LOGWARNING, "%s - No %s found", __FUNCTION__, strChild.c_str());
     return false;
   }
-  if (strFilter.IsEmpty())
+  if (strFilter.empty())
   {
     pNode = pRootElement->FirstChildElement("e2bouquet");
     if (!pNode)
@@ -279,7 +279,7 @@ bool CTuxBoxUtil::ParseChannels(TiXmlElement *root, CFileItemList &items, CURL &
     CLog::Log(LOGWARNING, "%s - No %ss found", __FUNCTION__,strChild.c_str());
     return false;
   }
-  if(!strFilter.IsEmpty())
+  if(!strFilter.empty())
   {
     pNode = pRootElement->FirstChild(strChild.c_str());
     if (!pNode)
@@ -365,7 +365,7 @@ bool CTuxBoxUtil::ParseChannelsEnigma2(TiXmlElement *root, CFileItemList &items,
     CLog::Log(LOGWARNING, "%s - No %ss found", __FUNCTION__,strChild.c_str());
     return false;
   }
-  if(!strFilter.IsEmpty())
+  if(!strFilter.empty())
   {
     pNode = pRootElement->FirstChild(strChild.c_str());
     if (!pNode)
@@ -523,7 +523,7 @@ bool CTuxBoxUtil::GetZapUrl(const CStdString& strPath, CFileItem &items )
 {
   CURL url(strPath);
   CStdString strOptions = url.GetOptions();
-  if (strOptions.IsEmpty())
+  if (strOptions.empty())
     return false;
 
   if (url.HasOption("path"))
@@ -724,7 +724,7 @@ bool CTuxBoxUtil::SetAudioChannel( const CStdString& strPath, const AUDIOCHANNEL
 bool CTuxBoxUtil::GetHttpXML(CURL url,CStdString strRequestType)
 {
   // Check and Set URL Request Option
-  if(!strRequestType.IsEmpty())
+  if(!strRequestType.empty())
   {
     if(strRequestType.Equals("streaminfo"))
     {
@@ -1509,7 +1509,7 @@ CStdString CTuxBoxUtil::GetPicon(CStdString strServiceName)
     CLog::Log(LOGDEBUG, "%s PictureIcon Detection is Disabled! Using default icon", __FUNCTION__);
     return "";
   }
-  if (strServiceName.IsEmpty())
+  if (strServiceName.empty())
   {
     CLog::Log(LOGDEBUG, "%s Service Name is Empty! Can not detect a PictureIcon. Using default icon!", __FUNCTION__);
     return "";
index bceccde..63d53ed 100644 (file)
@@ -240,11 +240,11 @@ CStdStringArray URIUtils::SplitPath(const CStdString& strPath)
   // we start with the root path
   CStdString dir = url.GetWithoutFilename();
   
-  if (!dir.IsEmpty())
+  if (!dir.empty())
     dirs.insert(dirs.begin(), dir);
 
   // we don't need empty token on the end
-  if (dirs.size() > 1 && dirs.back().IsEmpty())
+  if (dirs.size() > 1 && dirs.back().empty())
     dirs.erase(dirs.end() - 1);
 
   return dirs;
@@ -303,7 +303,7 @@ bool URIUtils::GetParentPath(const CStdString& strPath, CStdString& strParent)
 
   CURL url(strPath);
   CStdString strFile = url.GetFileName();
-  if ( URIUtils::ProtocolHasParentInHostname(url.GetProtocol()) && strFile.IsEmpty())
+  if ( URIUtils::ProtocolHasParentInHostname(url.GetProtocol()) && strFile.empty())
   {
     strFile = url.GetHostName();
     return GetParentPath(strFile, strParent);
@@ -337,19 +337,19 @@ bool URIUtils::GetParentPath(const CStdString& strPath, CStdString& strParent)
   }
   else if (url.GetProtocol() == "plugin")
   {
-    if (!url.GetOptions().IsEmpty())
+    if (!url.GetOptions().empty())
     {
       url.SetOptions("");
       strParent = url.Get();
       return true;
     }
-    if (!url.GetFileName().IsEmpty())
+    if (!url.GetFileName().empty())
     {
       url.SetFileName("");
       strParent = url.Get();
       return true;
     }
-    if (!url.GetHostName().IsEmpty())
+    if (!url.GetHostName().empty())
     {
       url.SetHostName("");
       strParent = url.Get();
@@ -588,7 +588,7 @@ bool URIUtils::IsHD(const CStdString& strFileName)
   if (ProtocolHasParentInHostname(url.GetProtocol()))
     return IsHD(url.GetHostName());
 
-  return url.GetProtocol().IsEmpty() || url.GetProtocol() == "file";
+  return url.GetProtocol().empty() || url.GetProtocol() == "file";
 }
 
 bool URIUtils::IsDVD(const CStdString& strFile)
@@ -763,7 +763,7 @@ bool URIUtils::IsInternetStream(const CURL& url, bool bStrictCheck /* = false */
 {
   CStdString strProtocol = url.GetProtocol();
   
-  if (strProtocol.IsEmpty())
+  if (strProtocol.empty())
     return false;
 
   // there's nothing to stop internet streams from being stacked
@@ -949,7 +949,7 @@ bool URIUtils::HasSlashAtEnd(const std::string& strFile, bool checkURL /* = fals
   {
     CURL url(strFile);
     CStdString file = url.GetFileName();
-    return file.IsEmpty() || HasSlashAtEnd(file, false);
+    return file.empty() || HasSlashAtEnd(file, false);
   }
   char kar = strFile.c_str()[strFile.size() - 1];
 
@@ -972,7 +972,7 @@ void URIUtils::RemoveSlashAtEnd(std::string& strFolder)
       strFolder = url.Get();
       return;
     }
-    if(url.GetHostName().IsEmpty())
+    if(url.GetHostName().empty())
       return;
   }
 
@@ -1033,7 +1033,7 @@ CStdString URIUtils::AddFileToFolder(const CStdString& strFolder,
   }
 
   CStdString strResult = strFolder;
-  if (!strResult.IsEmpty())
+  if (!strResult.empty())
     AddSlashAtEnd(strResult);
 
   // Remove any slash at the start of the file
@@ -1077,7 +1077,7 @@ void URIUtils::CreateArchivePath(CStdString& strUrlPath,
 
   strUrlPath = strType+"://";
 
-  if( !strPwd.IsEmpty() )
+  if( !strPwd.empty() )
   {
     strBuffer = strPwd;
     CURL::Encode(strBuffer);
index b9edcd5..4094150 100644 (file)
@@ -131,7 +131,7 @@ void CWeatherJob::LocalizeOverviewToken(CStdString &token)
 {
   // This routine is case-insensitive. 
   CStdString strLocStr = "";
-  if (!token.IsEmpty())
+  if (!token.empty())
   {
     ilocalizedTokens i;
     i = m_localizedTokens.find(token);
@@ -299,7 +299,7 @@ void CWeatherJob::LoadLocalizedToken()
             (LOCALIZED_TOKEN_FIRSTID4 <= id && id <= LOCALIZED_TOKEN_LASTID4))
         {
           CStdString utf8Label(pChild->FirstChild()->Value());
-          if (!utf8Label.IsEmpty())
+          if (!utf8Label.empty())
             m_localizedTokens.insert(make_pair(utf8Label, id));
         }
       }
@@ -433,7 +433,7 @@ bool CWeather::IsFetched()
 {
   // call GetInfo() to make sure that we actually start up
   GetInfo(0);
-  return !m_info.lastUpdateTime.IsEmpty();
+  return !m_info.lastUpdateTime.empty();
 }
 
 const day_forecast &CWeather::GetForecast(int day) const
index 2d1e1d7..4748808 100644 (file)
@@ -176,7 +176,7 @@ bool XMLUtils::GetAdditiveString(const TiXmlNode* pRootNode, const char* strTag,
       bResult = true;
       strTemp = node->FirstChild()->Value();
       const char* clear=node->Attribute("clear");
-      if (strStringValue.IsEmpty() || (clear && strcasecmp(clear,"true")==0))
+      if (strStringValue.empty() || (clear && strcasecmp(clear,"true")==0))
         strStringValue = strTemp;
       else
         strStringValue += strSeparator+strTemp;
@@ -272,7 +272,7 @@ void XMLUtils::SetAdditiveString(TiXmlNode* pRootNode, const char *strTag, const
 {
   CStdStringArray list;
   StringUtils::SplitString(strValue,strSeparator,list);
-  for (unsigned int i=0;i<list.size() && !list[i].IsEmpty();++i)
+  for (unsigned int i=0;i<list.size() && !list[i].empty();++i)
     SetString(pRootNode,strTag,list[i]);
 }
 
index 9aa97be..246f4eb 100644 (file)
@@ -66,7 +66,7 @@ void XBMC::XBMC_MD5::getDigest(CStdString& digest)
 
 CStdString XBMC::XBMC_MD5::GetMD5(const CStdString &text)
 {
-  if (text.IsEmpty())
+  if (text.empty())
     return "";
   XBMC_MD5 state;
   CStdString digest;
index 9bb116b..d31256f 100644 (file)
@@ -798,7 +798,7 @@ bool CVideoDatabase::SetPathHash(const CStdString &path, const CStdString &hash)
     if (NULL == m_pDB.get()) return false;
     if (NULL == m_pDS.get()) return false;
 
-    if (hash.IsEmpty())
+    if (hash.empty())
     { // this is an empty folder - we need only add it to the path table
       // if the path actually exists
       if (!CDirectory::Exists(path))
@@ -1340,14 +1340,14 @@ int CVideoDatabase::AddActor(const CStdString& strActor, const CStdString& thumb
       idActor = m_pDS->fv("idActor").get_asInt();
       m_pDS->close();
       // update the thumb url's
-      if (!thumbURLs.IsEmpty())
+      if (!thumbURLs.empty())
       {
         strSQL=PrepareSQL("update actors set strThumb='%s' where idActor=%i",thumbURLs.c_str(),idActor);
         m_pDS->exec(strSQL.c_str());
       }
     }
     // add artwork
-    if (!thumb.IsEmpty())
+    if (!thumb.empty())
       SetArtForItem(idActor, "actor", "thumb", thumb);
     return idActor;
   }
@@ -1710,7 +1710,7 @@ void CVideoDatabase::GetMusicVideosByArtist(const CStdString& strArtist, CFileIt
     if (NULL == m_pDS.get()) return ;
 
     CStdString strSQL;
-    if (strArtist.IsEmpty())  // TODO: SMARTPLAYLISTS what is this here for???
+    if (strArtist.empty())  // TODO: SMARTPLAYLISTS what is this here for???
       strSQL=PrepareSQL("select distinct * from musicvideoview join artistlinkmusicvideo on artistlinkmusicvideo.idMVideo=musicvideoview.idMVideo join actors on actors.idActor=artistlinkmusicvideo.idArtist");
     else
       strSQL=PrepareSQL("select * from musicvideoview join artistlinkmusicvideo on artistlinkmusicvideo.idMVideo=musicvideoview.idMVideo join actors on actors.idActor=artistlinkmusicvideo.idArtist where actors.strActor='%s'", strArtist.c_str());
@@ -2342,7 +2342,7 @@ int CVideoDatabase::GetSeasonId(int showID, int season)
 {
   CStdString sql = PrepareSQL("idShow=%i AND season=%i", showID, season);
   CStdString id = GetSingleValue("seasons", "idSeason", sql);
-  if (id.IsEmpty())
+  if (id.empty())
     return -1;
   return strtol(id.c_str(), NULL, 10);
 }
@@ -5271,7 +5271,7 @@ bool CVideoDatabase::GetMusicVideoAlbumsNav(const CStdString& strBaseDir, CFileI
 
       for (it=mapAlbums.begin();it != mapAlbums.end();++it)
       {
-        if (!it->second.first.IsEmpty())
+        if (!it->second.first.empty())
         {
           CFileItemPtr pItem(new CFileItem(it->second.first));
 
@@ -6377,7 +6377,7 @@ void CVideoDatabase::Stack(CFileItemList& items, VIDEODB_CONTENT_TYPE type, bool
               pItem->GetVideoInfoTag()->m_lastPlayed = jItem->GetVideoInfoTag()->m_lastPlayed;
 
             // check for fanart if not already set
-            if (strFanArt.IsEmpty())
+            if (strFanArt.empty())
               strFanArt = jItem->GetArt("fanart");
 
             // remove duplicate entry
@@ -6392,7 +6392,7 @@ void CVideoDatabase::Stack(CFileItemList& items, VIDEODB_CONTENT_TYPE type, bool
         {
           pItem->GetVideoInfoTag()->m_playCount = (pItem->GetVideoInfoTag()->m_iEpisode == (int)pItem->GetProperty("watchedepisodes").asInteger()) ? 1 : 0;
           pItem->SetOverlayImage(CGUIListItem::ICON_OVERLAY_UNWATCHED, (pItem->GetVideoInfoTag()->m_playCount > 0) && (pItem->GetVideoInfoTag()->m_iEpisode > 0));
-          if (!strFanArt.IsEmpty())
+          if (!strFanArt.empty())
             pItem->SetArt("fanart", strFanArt);
         }
         // increment i to j which is the next item
@@ -6459,7 +6459,7 @@ void CVideoDatabase::Stack(CFileItemList& items, VIDEODB_CONTENT_TYPE type, bool
                 iPlayCount += jTag->m_playCount;
 
                 // episodes dont have fanart yet
-                //if (strFanArt.IsEmpty())
+                //if (strFanArt.empty())
                 //  strFanArt = jItem->GetArt("fanart");
 
                 paths.push_back(jFileNameAndPath);
@@ -6485,7 +6485,7 @@ void CVideoDatabase::Stack(CFileItemList& items, VIDEODB_CONTENT_TYPE type, bool
           pItem->SetOverlayImage(CGUIListItem::ICON_OVERLAY_UNWATCHED, (pItem->GetVideoInfoTag()->m_playCount > 0) && (pItem->GetVideoInfoTag()->m_iEpisode > 0));
 
           // episodes dont have fanart yet
-          //if (!strFanArt.IsEmpty())
+          //if (!strFanArt.empty())
           //  pItem->SetArt("fanart", strFanArt);
         }
         // increment i to j which is the next item
@@ -6785,7 +6785,7 @@ int CVideoDatabase::GetSeasonForEpisode(int idEpisode)
   char column[5];
   sprintf(column, "c%0d", VIDEODB_ID_EPISODE_SEASON);
   CStdString id = GetSingleValue("episode", column, PrepareSQL("idEpisode=%i", idEpisode));
-  if (id.IsEmpty())
+  if (id.empty())
     return -1;
   return atoi(id.c_str());
 }
@@ -6867,7 +6867,7 @@ ScraperPtr CVideoDatabase::GetScraperForPath(const CStdString& strPath, SScanSet
   foundDirectly = false;
   try
   {
-    if (strPath.IsEmpty() || !m_pDB.get() || !m_pDS.get()) return ScraperPtr();
+    if (strPath.empty() || !m_pDB.get() || !m_pDS.get()) return ScraperPtr();
 
     ScraperPtr scraper;
     CStdString strPath2;
@@ -7239,7 +7239,7 @@ void CVideoDatabase::GetMusicVideoArtistsByName(const CStdString& strSearch, CFi
     if (NULL == m_pDS.get()) return;
 
     CStdString strLike;
-    if (!strSearch.IsEmpty())
+    if (!strSearch.empty())
       strLike = "and actors.strActor like '%%%s%%'";
     if (CProfilesManager::Get().GetMasterProfile().getLockMode() != LOCK_MODE_EVERYONE && !g_passwordManager.bMasterUser)
       strSQL=PrepareSQL("select actors.idActor,actors.strActor,path.strPath from artistlinkmusicvideo,actors,musicvideo,files,path where actors.idActor=artistlinkmusicvideo.idArtist and artistlinkmusicvideo.idMVideo=musicvideo.idMVideo and files.idFile=musicvideo.idFile and files.idPath=path.idPath "+strLike,strSearch.c_str());
@@ -7320,7 +7320,7 @@ void CVideoDatabase::GetMusicVideoAlbumsByName(const CStdString& strSearch, CFil
     if (NULL == m_pDS.get()) return;
 
     CStdString strLike;
-    if (!strSearch.IsEmpty())
+    if (!strSearch.empty())
     {
       strLike = StringUtils::Format("and musicvideo.c%02d",VIDEODB_ID_MUSICVIDEO_ALBUM);
       strLike += "like '%%s%%%'";
@@ -7329,7 +7329,7 @@ void CVideoDatabase::GetMusicVideoAlbumsByName(const CStdString& strSearch, CFil
       strSQL=PrepareSQL("select distinct musicvideo.c%02d,musicvideo.idMVideo,path.strPath from musicvideo,files,path where files.idFile=musicvideo.idFile and files.idPath=path.idPath"+strLike,VIDEODB_ID_MUSICVIDEO_ALBUM,strSearch.c_str());
     else
     {
-      if (!strLike.IsEmpty())
+      if (!strLike.empty())
         strLike = "where "+strLike.Mid(4);
       strSQL=PrepareSQL("select distinct musicvideo.c%02d,musicvideo.idMVideo from musicvideo"+strLike,VIDEODB_ID_MUSICVIDEO_ALBUM,strSearch.c_str());
     }
@@ -7562,7 +7562,7 @@ int CVideoDatabase::GetMatchingMusicVideo(const CStdString& strArtist, const CSt
     if (NULL == m_pDS.get()) return -1;
 
     CStdString strSQL;
-    if (strAlbum.IsEmpty() && strTitle.IsEmpty())
+    if (strAlbum.empty() && strTitle.empty())
     { // we want to return matching artists only
       if (CProfilesManager::Get().GetMasterProfile().getLockMode() != LOCK_MODE_EVERYONE && !g_passwordManager.bMasterUser)
         strSQL=PrepareSQL("select distinct actors.idActor,path.strPath from artistlinkmusicvideo,actors,musicvideo,files,path where actors.idActor=artistlinkmusicvideo.idArtist and artistlinkmusicvideo.idMVideo=musicvideo.idMVideo and files.idFile=musicvideo.idFile and files.idPath=path.idPath and actors.strActor like '%s'",strArtist.c_str());
@@ -8095,7 +8095,7 @@ void CVideoDatabase::CleanDatabase(CGUIDialogProgressBarHandle* handle, const se
     }
     m_pDS->close();
 
-    if ( ! filesToDelete.IsEmpty() )
+    if ( ! filesToDelete.empty() )
     {
       filesToDelete.TrimRight(",");
       // now grab them movies
@@ -8137,7 +8137,7 @@ void CVideoDatabase::CleanDatabase(CGUIDialogProgressBarHandle* handle, const se
       progress->Progress();
     }
 
-    if ( ! filesToDelete.IsEmpty() )
+    if ( ! filesToDelete.empty() )
     {
       filesToDelete = "(" + filesToDelete + ")";
       CLog::Log(LOGDEBUG, "%s: Cleaning files table", __FUNCTION__);
@@ -8161,7 +8161,7 @@ void CVideoDatabase::CleanDatabase(CGUIDialogProgressBarHandle* handle, const se
       m_pDS->exec(sql.c_str());
     }
 
-    if ( ! moviesToDelete.IsEmpty() )
+    if ( ! moviesToDelete.empty() )
     {
       moviesToDelete = "(" + moviesToDelete.TrimRight(",") + ")";
 
@@ -8194,7 +8194,7 @@ void CVideoDatabase::CleanDatabase(CGUIDialogProgressBarHandle* handle, const se
       m_pDS->exec(sql.c_str());
     }
 
-    if ( ! episodesToDelete.IsEmpty() )
+    if ( ! episodesToDelete.empty() )
     {
       episodesToDelete = "(" + episodesToDelete.TrimRight(",") + ")";
 
@@ -8226,7 +8226,7 @@ void CVideoDatabase::CleanDatabase(CGUIDialogProgressBarHandle* handle, const se
       m_pDS->next();
     }
     m_pDS->close();
-    if (!strIds.IsEmpty())
+    if (!strIds.empty())
     {
       strIds.TrimRight(",");
       sql = PrepareSQL("delete from path where idPath in (%s)",strIds.c_str());
@@ -8256,7 +8256,7 @@ void CVideoDatabase::CleanDatabase(CGUIDialogProgressBarHandle* handle, const se
       m_pDS->next();
     }
     m_pDS->close();
-    if (!showsToDelete.IsEmpty())
+    if (!showsToDelete.empty())
     {
       sql = "delete from tvshow where idShow in (" + showsToDelete.TrimRight(",") + ")";
       m_pDS->exec(sql.c_str());
@@ -8288,7 +8288,7 @@ void CVideoDatabase::CleanDatabase(CGUIDialogProgressBarHandle* handle, const se
     sql = "delete from movielinktvshow where idMovie not in (select distinct idMovie from movie)";
     m_pDS->exec(sql.c_str());
 
-    if ( ! musicVideosToDelete.IsEmpty() )
+    if ( ! musicVideosToDelete.empty() )
     {
       musicVideosToDelete = "(" + musicVideosToDelete.TrimRight(",") + ")";
 
@@ -8964,7 +8964,7 @@ void CVideoDatabase::ExportActorThumbs(const CStdString &strDir, const CVideoInf
   {
     CFileItem item;
     item.SetLabel(iter->strName);
-    if (!iter->thumb.IsEmpty())
+    if (!iter->thumb.empty())
     {
       CStdString thumbFile(GetSafeFile(strPath, iter->strName));
       CTextureCache::Get().Export(iter->thumb, thumbFile, overwrite);
@@ -9075,7 +9075,7 @@ void CVideoDatabase::ImportFromXML(const CStdString &path)
       {
         info.Load(movie);
         CFileItem item(info);
-        bool useFolders = info.m_basePath.IsEmpty() ? LookupByFolders(item.GetPath()) : false;
+        bool useFolders = info.m_basePath.empty() ? LookupByFolders(item.GetPath()) : false;
         CStdString filename = info.m_strTitle;
         if (info.m_iYear > 0)
           filename.AppendFormat("_%i", info.m_iYear);
@@ -9090,7 +9090,7 @@ void CVideoDatabase::ImportFromXML(const CStdString &path)
       {
         info.Load(movie);
         CFileItem item(info);
-        bool useFolders = info.m_basePath.IsEmpty() ? LookupByFolders(item.GetPath()) : false;
+        bool useFolders = info.m_basePath.empty() ? LookupByFolders(item.GetPath()) : false;
         CStdString filename = StringUtils::Join(info.m_artist, g_advancedSettings.m_videoItemSeparator) + "." + info.m_strTitle;
         if (info.m_iYear > 0)
           filename.AppendFormat("_%i", info.m_iYear);
@@ -9109,7 +9109,7 @@ void CVideoDatabase::ImportFromXML(const CStdString &path)
         URIUtils::AddSlashAtEnd(info.m_strPath);
         DeleteTvShow(info.m_strPath);
         CFileItem showItem(info);
-        bool useFolders = info.m_basePath.IsEmpty() ? LookupByFolders(showItem.GetPath(), true) : false;
+        bool useFolders = info.m_basePath.empty() ? LookupByFolders(showItem.GetPath(), true) : false;
         CFileItem artItem(showItem);
         CStdString artPath(GetSafeFile(tvshowsDir, info.m_strTitle));
         artItem.SetPath(artPath);
index 6c2a381..3daacc0 100644 (file)
@@ -171,7 +171,7 @@ namespace VIDEO
     m_pathsToScan.clear();
     m_pathsToClean.clear();
 
-    if (strDirectory.IsEmpty())
+    if (strDirectory.empty())
     { // scan all paths in the database.  We do this by scanning all paths in the db, and crossing them off the list as
       // we go.
       m_database.Open();
@@ -264,7 +264,7 @@ namespace VIDEO
       }
 
       CStdString fastHash = GetFastHash(strDirectory);
-      if (m_database.GetPathHash(strDirectory, dbHash) && !fastHash.IsEmpty() && fastHash == dbHash)
+      if (m_database.GetPathHash(strDirectory, dbHash) && !fastHash.empty() && fastHash == dbHash)
       { // fast hashes match - no need to process anything
         CLog::Log(LOGDEBUG, "VideoInfoScanner: Skipping dir '%s' due to no change (fasthash)", CURL::GetRedacted(strDirectory).c_str());
         hash = fastHash;
@@ -276,16 +276,16 @@ namespace VIDEO
         items.Stack();
         // compute hash
         GetPathHash(items, hash);
-        if (hash != dbHash && !hash.IsEmpty())
+        if (hash != dbHash && !hash.empty())
         {
-          if (dbHash.IsEmpty())
+          if (dbHash.empty())
             CLog::Log(LOGDEBUG, "VideoInfoScanner: Scanning dir '%s' as not in the database", CURL::GetRedacted(strDirectory).c_str());
           else
             CLog::Log(LOGDEBUG, "VideoInfoScanner: Rescanning dir '%s' due to change (%s != %s)", CURL::GetRedacted(strDirectory).c_str(), dbHash.c_str(), hash.c_str());
         }
         else
         { // they're the same or the hash is empty (dir empty/dir not retrievable)
-          if (hash.IsEmpty() && !dbHash.IsEmpty())
+          if (hash.empty() && !dbHash.empty())
           {
             CLog::Log(LOGDEBUG, "VideoInfoScanner: Skipping dir '%s' as it's empty or doesn't exist - adding to clean list", CURL::GetRedacted(strDirectory).c_str());
             m_pathsToClean.insert(m_database.GetPathId(strDirectory));
@@ -297,7 +297,7 @@ namespace VIDEO
             OnDirectoryScanned(strDirectory);
         }
         // update the hash to a fast hash if needed
-        if (CanFastHash(items) && !fastHash.IsEmpty())
+        if (CanFastHash(items) && !fastHash.empty())
           hash = fastHash;
       }
     }
@@ -828,7 +828,7 @@ namespace VIDEO
      * Next preference is the episode title. If it exists use that for matching the TV Show
      * information.
      */
-    if (!tag->m_strTitle.IsEmpty())
+    if (!tag->m_strTitle.empty())
     {
       EPISODE episode;
       episode.strPath = item->GetPath();
@@ -1057,7 +1057,7 @@ namespace VIDEO
       art["thumb"] = "";
 
     CVideoInfoTag &movieDetails = *pItem->GetVideoInfoTag();
-    if (movieDetails.m_basePath.IsEmpty())
+    if (movieDetails.m_basePath.empty())
       movieDetails.m_basePath = pItem->GetBaseMoviePath(videoFolder);
     movieDetails.m_parentPathID = m_database.AddPath(URIUtils::GetParentPath(movieDetails.m_basePath));
 
@@ -1084,7 +1084,7 @@ namespace VIDEO
     {
       // find local trailer first
       CStdString strTrailer = pItem->FindTrailer();
-      if (!strTrailer.IsEmpty())
+      if (!strTrailer.empty())
         movieDetails.m_strTrailer = strTrailer;
 
       lResult = m_database.SetDetailsForMovie(pItem->GetPath(), movieDetails, art);
@@ -1368,7 +1368,7 @@ namespace VIDEO
       if (!hasEpisodeGuide)
       {
         // fetch episode guide
-        if (!showInfo.m_strEpisodeGuide.IsEmpty())
+        if (!showInfo.m_strEpisodeGuide.empty())
         {
           CScraperUrl url;
           url.ParseEpisodeGuide(showInfo.m_strEpisodeGuide);
@@ -1421,7 +1421,7 @@ namespace VIDEO
           matches.push_back(*guide);
           continue;
         }
-        if (!guide->cScraperUrl.strTitle.IsEmpty() && guide->cScraperUrl.strTitle.CompareNoCase(file->strTitle.c_str()) == 0)
+        if (!guide->cScraperUrl.strTitle.empty() && guide->cScraperUrl.strTitle.CompareNoCase(file->strTitle.c_str()) == 0)
         {
           bFound = true;
           break;
@@ -1534,7 +1534,7 @@ namespace VIDEO
         item2.SetPath(firstFile);
         nfoFile = GetnfoFile(&item2, bGrabAny);
         // else try .nfo file matching stacked title
-        if (nfoFile.IsEmpty())
+        if (nfoFile.empty())
         {
           CStdString stackedTitlePath = dir.GetStackedTitlePath(item->GetPath());
           item2.SetPath(stackedTitlePath);
@@ -1552,10 +1552,10 @@ namespace VIDEO
       }
 
       // test file existence
-      if (!nfoFile.IsEmpty() && !CFile::Exists(nfoFile))
+      if (!nfoFile.empty() && !CFile::Exists(nfoFile))
         nfoFile.clear();
 
-      if (nfoFile.IsEmpty()) // final attempt - strip off any cd1 folders
+      if (nfoFile.empty()) // final attempt - strip off any cd1 folders
       {
         URIUtils::RemoveSlashAtEnd(strPath); // need no slash for the check that follows
         CFileItem item2;
@@ -1567,14 +1567,14 @@ namespace VIDEO
         }
       }
 
-      if (nfoFile.IsEmpty() && item->IsOpticalMediaFile())
+      if (nfoFile.empty() && item->IsOpticalMediaFile())
       {
         CFileItem parentDirectory(item->GetLocalMetadataPath(), true);
         nfoFile = GetnfoFile(&parentDirectory, true);
       }
     }
     // folders (or stacked dvds) can take any nfo file if there's a unique one
-    if (item->m_bIsFolder || item->IsOpticalMediaFile() || (bGrabAny && nfoFile.IsEmpty()))
+    if (item->m_bIsFolder || item->IsOpticalMediaFile() || (bGrabAny && nfoFile.empty()))
     {
       // see if there is a unique nfo file in this folder, and if so, use that
       CFileItemList items;
@@ -1613,7 +1613,7 @@ namespace VIDEO
   {
     CVideoInfoTag movieDetails;
 
-    if (m_handle && !url.strTitle.IsEmpty())
+    if (m_handle && !url.strTitle.empty())
       m_handle->SetText(url.strTitle);
 
     CVideoInfoDownloader imdb(scraper);
@@ -1624,7 +1624,7 @@ namespace VIDEO
       if (nfoFile)
         nfoFile->GetDetails(movieDetails,NULL,true);
 
-      if (m_handle && url.strTitle.IsEmpty())
+      if (m_handle && url.strTitle.empty())
         m_handle->SetText(movieDetails.m_strTitle);
 
       if (pDialog)
@@ -1642,7 +1642,7 @@ namespace VIDEO
   void CVideoInfoScanner::ApplyThumbToFolder(const CStdString &folder, const CStdString &imdbThumb)
   {
     // copy icon to folder also;
-    if (!imdbThumb.IsEmpty())
+    if (!imdbThumb.empty())
     {
       CFileItem folderItem(folder, true);
       CThumbLoader loader;
@@ -1785,7 +1785,7 @@ namespace VIDEO
                                DIR_FLAG_NO_FILE_INFO);
     for (vector<SActorInfo>::iterator i = actors.begin(); i != actors.end(); ++i)
     {
-      if (i->thumb.IsEmpty())
+      if (i->thumb.empty())
       {
         CStdString thumbFile = i->strName;
         thumbFile.Replace(" ","_");
@@ -1799,9 +1799,9 @@ namespace VIDEO
             break;
           }
         }
-        if (i->thumb.IsEmpty() && !i->thumbUrl.GetFirstThumb().m_url.IsEmpty())
+        if (i->thumb.empty() && !i->thumbUrl.GetFirstThumb().m_url.empty())
           i->thumb = CScraperUrl::GetThumbURL(i->thumbUrl.GetFirstThumb());
-        if (!i->thumb.IsEmpty())
+        if (!i->thumb.empty())
           CTextureCache::Get().BackgroundCacheImage(i->thumb);
       }
     }
@@ -1817,7 +1817,7 @@ namespace VIDEO
       strNfoFile = URIUtils::AddFileToFolder(pItem->GetPath(), "tvshow.nfo");
 
     CNfoFile::NFOResult result=CNfoFile::NO_NFO;
-    if (!strNfoFile.IsEmpty() && CFile::Exists(strNfoFile))
+    if (!strNfoFile.empty() && CFile::Exists(strNfoFile))
     {
       if (info->Content() == CONTENT_TVSHOWS && !pItem->m_bIsFolder)
         result = m_nfoReader.Create(strNfoFile,info,pItem->GetVideoInfoTag()->m_iEpisode);
index 8a69088..38ea5bc 100644 (file)
@@ -105,11 +105,11 @@ bool CVideoInfoTag::Save(TiXmlNode *node, const CStdString &tag, bool savePathIn
   if (!movie) return false;
 
   XMLUtils::SetString(movie, "title", m_strTitle);
-  if (!m_strOriginalTitle.IsEmpty())
+  if (!m_strOriginalTitle.empty())
     XMLUtils::SetString(movie, "originaltitle", m_strOriginalTitle);
-  if (!m_strShowTitle.IsEmpty())
+  if (!m_strShowTitle.empty())
     XMLUtils::SetString(movie, "showtitle", m_strShowTitle);
-  if (!m_strSortTitle.IsEmpty())
+  if (!m_strSortTitle.empty())
     XMLUtils::SetString(movie, "sorttitle", m_strSortTitle);
   XMLUtils::SetFloat(movie, "rating", m_fRating);
   XMLUtils::SetFloat(movie, "epbookmark", m_fEpBookmark);
@@ -160,7 +160,7 @@ bool CVideoInfoTag::Save(TiXmlNode *node, const CStdString &tag, bool savePathIn
     XMLUtils::SetString(movie, "filenameandpath", m_strFileNameAndPath);
     XMLUtils::SetString(movie, "basepath", m_basePath);
   }
-  if (!m_strEpisodeGuide.IsEmpty())
+  if (!m_strEpisodeGuide.empty())
   {
     CXBMCTinyXML doc;
     doc.Parse(m_strEpisodeGuide);
@@ -432,7 +432,7 @@ void CVideoInfoTag::Serialize(CVariant& value) const
     actor["name"] = m_cast[i].strName;
     actor["role"] = m_cast[i].strRole;
     actor["order"] = m_cast[i].order;
-    if (!m_cast[i].thumb.IsEmpty())
+    if (!m_cast[i].thumb.empty())
       actor["thumbnail"] = CTextureUtils::GetWrappedImageURL(m_cast[i].thumb);
     value["cast"].push_back(actor);
   }
@@ -543,7 +543,7 @@ const CStdString CVideoInfoTag::GetCast(bool bIncludeRole /*= false*/) const
   for (iCast it = m_cast.begin(); it != m_cast.end(); ++it)
   {
     CStdString character;
-    if (it->strRole.IsEmpty() || !bIncludeRole)
+    if (it->strRole.empty() || !bIncludeRole)
       character = StringUtils::Format("%s\n", it->strName.c_str());
     else
       character = StringUtils::Format("%s %s %s\n", it->strName.c_str(), g_localizeStrings.Get(20347).c_str(), it->strRole.c_str());
@@ -782,9 +782,9 @@ bool CVideoInfoTag::HasStreamDetails() const
 
 bool CVideoInfoTag::IsEmpty() const
 {
-  return (m_strTitle.IsEmpty() &&
-          m_strFile.IsEmpty() &&
-          m_strPath.IsEmpty());
+  return (m_strTitle.empty() &&
+          m_strFile.empty() &&
+          m_strPath.empty());
 }
 
 unsigned int CVideoInfoTag::GetDuration() const
index cb527c3..795d988 100644 (file)
@@ -76,7 +76,7 @@ public:
 
   const CStdString& GetPath() const
   {
-    if (m_strFileNameAndPath.IsEmpty())
+    if (m_strFileNameAndPath.empty())
       return m_strPath;
     return m_strFileNameAndPath;
   };
index b132722..43ac880 100644 (file)
@@ -135,7 +135,7 @@ bool CThumbExtractor::DoWork()
     if (db.Open())
     {
       if (info->m_iFileId < 0)
-        db.SetStreamDetailsForFile(info->m_streamDetails, !info->m_strFileNameAndPath.IsEmpty() ? info->m_strFileNameAndPath : m_item.GetPath());
+        db.SetStreamDetailsForFile(info->m_streamDetails, !info->m_strFileNameAndPath.empty() ? info->m_strFileNameAndPath : m_item.GetPath());
       else
         db.SetStreamDetailsForFileId(info->m_streamDetails, info->m_iFileId);
 
@@ -405,7 +405,7 @@ void CVideoThumbLoader::SetArt(CFileItem &item, const map<string, string> &artwo
 bool CVideoThumbLoader::FillLibraryArt(CFileItem &item)
 {
   CVideoInfoTag &tag = *item.GetVideoInfoTag();
-  if (tag.m_iDbId > -1 && !tag.m_type.IsEmpty())
+  if (tag.m_iDbId > -1 && !tag.m_type.empty())
   {
     map<string, string> artwork;
     m_videoDatabase->Open();
@@ -454,14 +454,14 @@ bool CVideoThumbLoader::FillThumb(CFileItem &item)
   if (item.HasArt("thumb"))
     return true;
   CStdString thumb = GetCachedImage(item, "thumb");
-  if (thumb.IsEmpty())
+  if (thumb.empty())
   {
     thumb = GetLocalArt(item, "thumb");
-    if (!thumb.IsEmpty())
+    if (!thumb.empty())
       SetCachedImage(item, "thumb", thumb);
   }
   item.SetArt("thumb", thumb);
-  return !thumb.IsEmpty();
+  return !thumb.empty();
 }
 
 std::string CVideoThumbLoader::GetLocalArt(const CFileItem &item, const std::string &type, bool checkFolder)
index aac8e10..11c7978 100644 (file)
@@ -104,7 +104,7 @@ bool CGUIDialogVideoInfo::OnMessage(CGUIMessage& message)
       int iControl = message.GetSenderId();
       if (iControl == CONTROL_BTN_REFRESH)
       {
-        if (m_movieItem->GetVideoInfoTag()->m_iSeason < 0 && !m_movieItem->GetVideoInfoTag()->m_strShowTitle.IsEmpty()) // tv show
+        if (m_movieItem->GetVideoInfoTag()->m_iSeason < 0 && !m_movieItem->GetVideoInfoTag()->m_strShowTitle.empty()) // tv show
         {
           bool bCanceled=false;
           if (CGUIDialogYesNo::ShowAndGetInput(20377,20378,-1,-1,bCanceled))
@@ -268,17 +268,17 @@ void CGUIDialogVideoInfo::SetMovie(const CFileItem *item)
     for (CVideoInfoTag::iCast it = m_movieItem->GetVideoInfoTag()->m_cast.begin(); it != m_movieItem->GetVideoInfoTag()->m_cast.end(); ++it)
     {
       CStdString character;
-      if (it->strRole.IsEmpty())
+      if (it->strRole.empty())
         character = it->strName;
       else
         character = StringUtils::Format("%s %s %s", it->strName.c_str(), g_localizeStrings.Get(20347).c_str(), it->strRole.c_str());
       CFileItemPtr item(new CFileItem(it->strName));
-      if (!it->thumb.IsEmpty())
+      if (!it->thumb.empty())
         item->SetArt("thumb", it->thumb);
       else if (CSettings::Get().GetBool("videolibrary.actorthumbs"))
       { // backward compatibility
         CStdString thumb = CScraperUrl::GetThumbURL(it->thumbUrl.GetFirstThumb());
-        if (!thumb.IsEmpty())
+        if (!thumb.empty())
         {
           item->SetArt("thumb", thumb);
           CTextureCache::Get().BackgroundCacheImage(thumb);
@@ -336,11 +336,11 @@ void CGUIDialogVideoInfo::SetMovie(const CFileItem *item)
 
       // local trailers should always override non-local, so check 
       // for a local one if the registered trailer is online
-      if (m_movieItem->GetVideoInfoTag()->m_strTrailer.IsEmpty() ||
+      if (m_movieItem->GetVideoInfoTag()->m_strTrailer.empty() ||
           URIUtils::IsInternetStream(m_movieItem->GetVideoInfoTag()->m_strTrailer))
       {
         CStdString localTrailer = m_movieItem->FindTrailer();
-        if (!localTrailer.IsEmpty())
+        if (!localTrailer.empty())
         {
           m_movieItem->GetVideoInfoTag()->m_strTrailer = localTrailer;
           CVideoDatabase database;
@@ -364,7 +364,7 @@ void CGUIDialogVideoInfo::Update()
 {
   // setup plot text area
   CStdString strTmp = m_movieItem->GetVideoInfoTag()->m_strPlot;
-  if (!(!m_movieItem->GetVideoInfoTag()->m_strShowTitle.IsEmpty() && m_movieItem->GetVideoInfoTag()->m_iSeason == 0)) // dont apply to tvshows
+  if (!(!m_movieItem->GetVideoInfoTag()->m_strShowTitle.empty() && m_movieItem->GetVideoInfoTag()->m_iSeason == 0)) // dont apply to tvshows
     if (m_movieItem->GetVideoInfoTag()->m_playCount == 0 && !CSettings::Get().GetBool("videolibrary.showunwatchedplots"))
       strTmp = g_localizeStrings.Get(20370);
 
@@ -571,7 +571,7 @@ void CGUIDialogVideoInfo::ClearCastList()
 
 void CGUIDialogVideoInfo::Play(bool resume)
 {
-  if (!m_movieItem->GetVideoInfoTag()->m_strEpisodeGuide.IsEmpty())
+  if (!m_movieItem->GetVideoInfoTag()->m_strEpisodeGuide.empty())
   {
     CStdString strPath = StringUtils::Format("videodb://tvshows/titles/%i/",m_movieItem->GetVideoInfoTag()->m_iDbId);
     Close();
@@ -580,7 +580,7 @@ void CGUIDialogVideoInfo::Play(bool resume)
   }
 
   CFileItem movie(*m_movieItem->GetVideoInfoTag());
-  if (m_movieItem->GetVideoInfoTag()->m_strFileNameAndPath.IsEmpty())
+  if (m_movieItem->GetVideoInfoTag()->m_strFileNameAndPath.empty())
     movie.SetPath(m_movieItem->GetPath());
   CGUIWindowVideoNav* pWindow = (CGUIWindowVideoNav*)g_windowManager.GetWindow(WINDOW_VIDEO_NAV);
   if (pWindow)
@@ -806,7 +806,7 @@ void CGUIDialogVideoInfo::OnGetFanart()
   }
 
   CStdString strLocal = item.GetLocalFanart();
-  if (!strLocal.IsEmpty())
+  if (!strLocal.empty())
   {
     CFileItemPtr itemLocal(new CFileItem("fanart://Local",false));
     itemLocal->SetArt("thumb", strLocal);
@@ -852,7 +852,7 @@ void CGUIDialogVideoInfo::OnGetFanart()
     result.clear();
 
   // set the fanart image
-  if (flip && !result.IsEmpty())
+  if (flip && !result.empty())
     result = CTextureUtils::GetWrappedImageURL(result, "", "flipped");
   CVideoDatabase db;
   if (db.Open())
@@ -893,7 +893,7 @@ void CGUIDialogVideoInfo::PlayTrailer()
 
 void CGUIDialogVideoInfo::SetLabel(int iControl, const CStdString &strLabel)
 {
-  if (strLabel.IsEmpty())
+  if (strLabel.empty())
   {
     SET_CONTROL_LABEL(iControl, 416);  // "Not available"
   }
@@ -916,14 +916,14 @@ void CGUIDialogVideoInfo::AddItemPathToFileBrowserSources(VECSOURCES &sources, c
   CStdString itemDir = item.GetVideoInfoTag()->m_basePath;
 
   //season
-  if (itemDir.IsEmpty())
+  if (itemDir.empty())
     itemDir = item.GetVideoInfoTag()->GetPath();
 
   CFileItem itemTmp(itemDir, false);
   if (itemTmp.IsVideo())
     itemDir = URIUtils::GetParentPath(itemDir);
 
-  if (!itemDir.IsEmpty() && CDirectory::Exists(itemDir))
+  if (!itemDir.empty() && CDirectory::Exists(itemDir))
   {
     CMediaSource itemSource;
     itemSource.strName = g_localizeStrings.Get(36041);
@@ -1297,7 +1297,7 @@ bool CGUIDialogVideoInfo::UpdateVideoItemSortTitle(const CFileItemPtr &pItem)
     database.GetTvShowInfo(pItem->GetVideoInfoTag()->m_strFileNameAndPath, detail, iDbId);
 
   CStdString currentTitle;
-  if (detail.m_strSortTitle.IsEmpty())
+  if (detail.m_strSortTitle.empty())
     currentTitle = detail.m_strTitle;
   else
     currentTitle = detail.m_strSortTitle;
index 9aaea19..fb508bd 100644 (file)
@@ -926,7 +926,7 @@ bool CGUIWindowVideoBase::OnFileAction(int iItem, int action)
       }
 
       CStdString resumeString = GetResumeString(*item);
-      if (!resumeString.IsEmpty())
+      if (!resumeString.empty())
       {
         choices.Add(SELECT_ACTION_RESUME, resumeString);
         choices.Add(SELECT_ACTION_PLAY, 12021);   // Start from beginning
@@ -986,7 +986,7 @@ bool CGUIWindowVideoBase::OnInfo(int iItem)
     CStdString strDir;
     if (item->IsVideoDb()       &&
         item->HasVideoInfoTag() &&
-        !item->GetVideoInfoTag()->m_strPath.IsEmpty())
+        !item->GetVideoInfoTag()->m_strPath.empty())
     {
       strDir = item->GetVideoInfoTag()->m_strPath;
     }
@@ -1041,7 +1041,7 @@ bool CGUIWindowVideoBase::ShowResumeMenu(CFileItem &item)
   if (!item.m_bIsFolder && !item.IsLiveTV())
   {
     CStdString resumeString = GetResumeString(item);
-    if (!resumeString.IsEmpty())
+    if (!resumeString.empty())
     { // prompt user whether they wish to resume
       CContextButtons choices;
       choices.Add(1, resumeString);
@@ -1163,7 +1163,7 @@ bool CGUIWindowVideoBase::OnResumeItem(int iItem)
 
   CStdString resumeString = GetResumeString(*item);
 
-  if (!resumeString.IsEmpty())
+  if (!resumeString.empty())
   {
     CContextButtons choices;
     choices.Add(SELECT_ACTION_RESUME, resumeString);
@@ -1202,7 +1202,7 @@ void CGUIWindowVideoBase::GetContextButtons(int itemNumber, CContextButtons &but
             buttons.Add(CONTEXT_BUTTON_PLAY_PART, 20324);
         }
 
-        if (!m_vecItems->GetPath().IsEmpty() && !StringUtils::StartsWithNoCase(item->GetPath(), "newsmartplaylist://") && !StringUtils::StartsWithNoCase(item->GetPath(), "newtag://")
+        if (!m_vecItems->GetPath().empty() && !StringUtils::StartsWithNoCase(item->GetPath(), "newsmartplaylist://") && !StringUtils::StartsWithNoCase(item->GetPath(), "newtag://")
             && !m_vecItems->IsSourcesPath())
         {
           buttons.Add(CONTEXT_BUTTON_QUEUE_ITEM, 13347);      // Add to Playlist
@@ -1288,7 +1288,7 @@ bool CGUIWindowVideoBase::OnPlayStackPart(int iItem)
     {
       CStdString resumeString = CGUIWindowVideoBase::GetResumeString(*(parts[selectedFile - 1].get()));
       stack->m_lStartOffset = 0;
-      if (!resumeString.IsEmpty()) 
+      if (!resumeString.empty()) 
       {
         CContextButtons choices;
         choices.Add(SELECT_ACTION_RESUME, resumeString);
@@ -1329,7 +1329,7 @@ bool CGUIWindowVideoBase::OnContextButton(int itemNumber, CONTEXT_BUTTON button)
   {
   case CONTEXT_BUTTON_SET_CONTENT:
     {
-      OnAssignContent(item->HasVideoInfoTag() && !item->GetVideoInfoTag()->m_strPath.IsEmpty() ? item->GetVideoInfoTag()->m_strPath : item->GetPath());
+      OnAssignContent(item->HasVideoInfoTag() && !item->GetVideoInfoTag()->m_strPath.empty() ? item->GetVideoInfoTag()->m_strPath : item->GetPath());
       return true;
     }
   case CONTEXT_BUTTON_PLAY_PART:
@@ -1390,7 +1390,7 @@ bool CGUIWindowVideoBase::OnContextButton(int itemNumber, CONTEXT_BUTTON button)
       SScanSettings settings;
       GetScraperForItem(item.get(), info, settings);
       CStdString strPath = item->GetPath();
-      if (item->IsVideoDb() && (!item->m_bIsFolder || item->GetVideoInfoTag()->m_strPath.IsEmpty()))
+      if (item->IsVideoDb() && (!item->m_bIsFolder || item->GetVideoInfoTag()->m_strPath.empty()))
         return false;
 
       if (item->IsVideoDb())
@@ -1483,7 +1483,7 @@ bool CGUIWindowVideoBase::OnPlayMedia(int iItem)
 
     /* For recordings we check here for a available stream URL */
     CFileItemPtr tag = g_PVRRecordings->GetByPath(item.GetPath());
-    if (tag && tag->HasPVRRecordingInfoTag() && !tag->GetPVRRecordingInfoTag()->m_strStreamURL.IsEmpty())
+    if (tag && tag->HasPVRRecordingInfoTag() && !tag->GetPVRRecordingInfoTag()->m_strStreamURL.empty())
     {
       CStdString stream = tag->GetPVRRecordingInfoTag()->m_strStreamURL;
 
@@ -1832,12 +1832,12 @@ void CGUIWindowVideoBase::AddToDatabase(int iItem)
     return;
 
   // enter new genre string
-  if (strGenre.IsEmpty())
+  if (strGenre.empty())
   {
     strGenre = g_localizeStrings.Get(532); // Manual Addition
     if (!CGUIKeyboardFactory::ShowAndGetInput(strGenre, g_localizeStrings.Get(533), false)) // Enter Genre
       return; // user backed out
-    if (strGenre.IsEmpty())
+    if (strGenre.empty())
       return; // no genre string
   }
 
@@ -1986,7 +1986,7 @@ int CGUIWindowVideoBase::GetScraperForItem(CFileItem *item, ADDON::ScraperPtr &i
   }
 
   bool foundDirectly = false;
-  info = m_database.GetScraperForPath(item->HasVideoInfoTag() && !item->GetVideoInfoTag()->m_strPath.IsEmpty() ? item->GetVideoInfoTag()->m_strPath : item->GetPath(), settings, foundDirectly);
+  info = m_database.GetScraperForPath(item->HasVideoInfoTag() && !item->GetVideoInfoTag()->m_strPath.empty() ? item->GetVideoInfoTag()->m_strPath : item->GetPath(), settings, foundDirectly);
   return foundDirectly ? 1 : 0;
 }
 
index e367ba8..5ef887c 100644 (file)
@@ -372,7 +372,7 @@ bool CGUIWindowVideoNav::GetDirectory(const CStdString &strDirectory, CFileItemL
     else if (!items.IsVirtualDirectoryRoot())
     { // load info from the database
       CStdString label;
-      if (items.GetLabel().IsEmpty() && m_rootDir.IsSource(items.GetPath(), CMediaSourceSettings::Get().GetSources("video"), &label)) 
+      if (items.GetLabel().empty() && m_rootDir.IsSource(items.GetPath(), CMediaSourceSettings::Get().GetSources("video"), &label)) 
         items.SetLabel(label);
       if (!items.IsSourcesPath())
         LoadVideoInfo(items);
@@ -401,15 +401,15 @@ void CGUIWindowVideoNav::LoadVideoInfo(CFileItemList &items, CVideoDatabase &dat
 {
   // TODO: this could possibly be threaded as per the music info loading,
   //       we could also cache the info
-  if (!items.GetContent().IsEmpty() && !items.IsPlugin())
+  if (!items.GetContent().empty() && !items.IsPlugin())
     return; // don't load for listings that have content set and weren't created from plugins
 
   CStdString content = items.GetContent();
   // determine content only if it isn't set
-  if (content.IsEmpty())
+  if (content.empty())
   {
     content = database.GetContentForPath(items.GetPath());
-    items.SetContent(content.IsEmpty() ? "files" : content);
+    items.SetContent(content.empty() ? "files" : content);
   }
 
   /*
@@ -430,7 +430,7 @@ void CGUIWindowVideoNav::LoadVideoInfo(CFileItemList &items, CVideoDatabase &dat
   /* NOTE: In the future when GetItemsForPath returns all items regardless of whether they're "in the library"
            we won't need the fetchedPlayCounts code, and can "simply" do this directly on absense of content. */
   bool fetchedPlayCounts = false;
-  if (!content.IsEmpty())
+  if (!content.empty())
   {
     database.GetItemsForPath(content, items.GetPath(), dbItems);
     dbItems.SetFastLookup(true);
@@ -440,7 +440,7 @@ void CGUIWindowVideoNav::LoadVideoInfo(CFileItemList &items, CVideoDatabase &dat
   {
     CFileItemPtr pItem = items[i];
     CFileItemPtr match;
-    if (!content.IsEmpty()) /* optical media will be stacked down, so it's path won't match the base path */
+    if (!content.empty()) /* optical media will be stacked down, so it's path won't match the base path */
       match = dbItems.Get(pItem->IsOpticalMediaFile() ? pItem->GetLocalMetadataPath() : pItem->GetPath());
     if (match)
     {
@@ -757,7 +757,7 @@ bool CGUIWindowVideoNav::DeleteItem(CFileItem* pItem, bool bUnavailable /* = fal
     return false;
 
   VIDEODB_CONTENT_TYPE iType=VIDEODB_CONTENT_MOVIES;
-  if (pItem->HasVideoInfoTag() && !pItem->GetVideoInfoTag()->m_strShowTitle.IsEmpty())
+  if (pItem->HasVideoInfoTag() && !pItem->GetVideoInfoTag()->m_strShowTitle.empty())
     iType = VIDEODB_CONTENT_TVSHOWS;
   if (pItem->HasVideoInfoTag() && pItem->GetVideoInfoTag()->m_iSeason > -1 && !pItem->m_bIsFolder)
     iType = VIDEODB_CONTENT_EPISODES;
@@ -808,7 +808,7 @@ bool CGUIWindowVideoNav::DeleteItem(CFileItem* pItem, bool bUnavailable /* = fal
   database.Open();
 
   database.GetFilePathById(pItem->GetVideoInfoTag()->m_iDbId, path, iType);
-  if (path.IsEmpty())
+  if (path.empty())
     return false;
   if (iType == VIDEODB_CONTENT_MOVIES)
     database.DeleteMovie(path);
@@ -1102,7 +1102,7 @@ bool CGUIWindowVideoNav::OnContextButton(int itemNumber, CONTEXT_BUTTON button)
         else if ((artType == "poster" || artType == "banner") && currentArt.find("thumb") != currentArt.end())
           currentThumb = currentArt["thumb"];
       }
-      if (!currentThumb.IsEmpty())
+      if (!currentThumb.empty())
       {
         CFileItemPtr item(new CFileItem("thumb://Current", false));
         item->SetArt("thumb", currentThumb);
@@ -1398,7 +1398,7 @@ void CGUIWindowVideoNav::OnChooseFanart(const CFileItem &videoItem)
 
   if (result.Equals("fanart://None") || !CFile::Exists(result))
     result.clear();
-  if (!result.IsEmpty() && flip)
+  if (!result.empty() && flip)
     result = CTextureUtils::GetWrappedImageURL(result, "", "flipped");
 
   // update the db
index 540207d..cec96e0 100644 (file)
@@ -191,7 +191,7 @@ void CGUIViewControl::SetSelectedItem(int item)
 
 void CGUIViewControl::SetSelectedItem(const CStdString &itemPath)
 {
-  if (!m_fileItems || itemPath.IsEmpty())
+  if (!m_fileItems || itemPath.empty())
     return;
 
   CStdString comparePath(itemPath);
index 2ae4f90..898005f 100644 (file)
@@ -397,7 +397,7 @@ void CGUIViewState::AddAddonsSource(const CStdString &content, const CStdString
     CMediaSource source;
     source.strPath = "addons://sources/" + content + "/";    
     source.strName = label;
-    if (!thumb.IsEmpty() && g_TextureManager.HasTexture(thumb))
+    if (!thumb.empty() && g_TextureManager.HasTexture(thumb))
       source.m_strThumbnailImage = thumb;
     source.m_iDriveType = CMediaSource::SOURCE_TYPE_LOCAL;
     source.m_ignore = true;
@@ -415,7 +415,7 @@ void CGUIViewState::AddAndroidSource(const CStdString &content, const CStdString
     CMediaSource source;
     source.strPath = "androidapp://sources/" + content + "/";
     source.strName = label;
-    if (!thumb.IsEmpty() && g_TextureManager.HasTexture(thumb))
+    if (!thumb.empty() && g_TextureManager.HasTexture(thumb))
       source.m_strThumbnailImage = thumb;
     source.m_iDriveType = CMediaSource::SOURCE_TYPE_LOCAL;
     source.m_ignore = true;
index 1425a4c..45d79e5 100644 (file)
@@ -155,10 +155,10 @@ bool CViewDatabase::GetViewState(const CStdString &path, int window, CViewState
 
     CStdString path1(path);
     URIUtils::AddSlashAtEnd(path1);
-    if (path1.IsEmpty()) path1 = "root://";
+    if (path1.empty()) path1 = "root://";
 
     CStdString sql;
-    if (skin.IsEmpty())
+    if (skin.empty())
       sql = PrepareSQL("select * from view where window = %i and path='%s'", window, path1.c_str());
     else
       sql = PrepareSQL("select * from view where window = %i and path='%s' and skin='%s'", window, path1.c_str(), skin.c_str());
@@ -191,7 +191,7 @@ bool CViewDatabase::SetViewState(const CStdString &path, int window, const CView
 
     CStdString path1(path);
     URIUtils::AddSlashAtEnd(path1);
-    if (path1.IsEmpty()) path1 = "root://";
+    if (path1.empty()) path1 = "root://";
 
     CStdString sql = PrepareSQL("select idView from view where window = %i and path='%s' and skin='%s'", window, path1.c_str(), skin.c_str());
     m_pDS->query(sql.c_str());
index 947c162..cb2035b 100644 (file)
@@ -314,7 +314,7 @@ bool CWIN32Util::XBMCShellExecute(const CStdString &strPath, bool bWaitForScript
   CStdString strWorkingDir;
 
   strCommand.Trim();
-  if (strCommand.IsEmpty())
+  if (strCommand.empty())
   {
     return false;
   }
@@ -559,7 +559,7 @@ void CWIN32Util::ExtendDllPath()
   CStdString strEnv;
   CStdStringArray vecEnv;
   strEnv = CEnvironment::getenv("PATH");
-  if (strEnv.IsEmpty())
+  if (strEnv.empty())
     CLog::Log(LOGWARNING, "Can get system env PATH or PATH is empty");
 
   StringUtils::SplitString(DLL_ENV_PATH, ";", vecEnv);
@@ -912,7 +912,7 @@ void CWIN32Util::GetDrivesByType(VECSOURCES &localDrives, Drive_Types eDriveType
             share.strName = StringUtils::Format( "%s (%s)", share.strPath.c_str(), g_localizeStrings.Get(218).c_str());
             break;
           case DRIVE_REMOVABLE:
-            if(share.strName.IsEmpty())
+            if(share.strName.empty())
               share.strName = StringUtils::Format( "%s (%s)", g_localizeStrings.Get(437).c_str(), share.strPath.c_str());
             break;
           case DRIVE_UNKNOWN:
index e278547..b4b876c 100644 (file)
@@ -488,7 +488,7 @@ bool CGUIMediaWindow::OnMessage(CGUIMessage& message)
       CStdString dir = message.GetStringParam(0);
       const CStdString &ret = message.GetStringParam(1);
       bool returning = ret.CompareNoCase("return") == 0;
-      if (!dir.IsEmpty())
+      if (!dir.empty())
       {
         m_history.ClearPathHistory();
         // ensure our directory is valid
@@ -657,7 +657,7 @@ bool CGUIMediaWindow::GetDirectory(const CStdString &strDirectory, CFileItemList
 
   // see if we can load a previously cached folder
   CFileItemList cachedItems(strDirectory);
-  if (!strDirectory.IsEmpty() && cachedItems.Load(GetID()))
+  if (!strDirectory.empty() && cachedItems.Load(GetID()))
   {
     items.Assign(cachedItems);
   }
@@ -665,7 +665,7 @@ bool CGUIMediaWindow::GetDirectory(const CStdString &strDirectory, CFileItemList
   {
     unsigned int time = XbmcThreads::SystemClockMillis();
 
-    if (strDirectory.IsEmpty())
+    if (strDirectory.empty())
       SetupShares();
 
     if (!m_rootDir.GetDirectory(strDirectory, items))
@@ -680,7 +680,7 @@ bool CGUIMediaWindow::GetDirectory(const CStdString &strDirectory, CFileItemList
       m_history.RemoveParentPath();
   }
 
-  if (m_guiState.get() && !m_guiState->HideParentDirItems() && !items.GetPath().IsEmpty())
+  if (m_guiState.get() && !m_guiState->HideParentDirItems() && !items.GetPath().empty())
   {
     CFileItemPtr pItem(new CFileItem(".."));
     pItem->SetPath(strParentPath);
@@ -765,7 +765,7 @@ bool CGUIMediaWindow::Update(const CStdString &strDirectory, bool updateFilterPa
     return false;
   }
 
-  if (items.GetLabel().IsEmpty())
+  if (items.GetLabel().empty())
     items.SetLabel(CUtil::GetTitleFromPath(items.GetPath(), true));
   
   ClearFileItems();
@@ -776,12 +776,12 @@ bool CGUIMediaWindow::Update(const CStdString &strDirectory, bool updateFilterPa
     
   // if we're getting the root source listing
   // make sure the path history is clean
-  if (strDirectory.IsEmpty())
+  if (strDirectory.empty())
     m_history.ClearPathHistory();
 
   int iWindow = GetID();
   int showLabel = 0;
-  if (strDirectory.IsEmpty())
+  if (strDirectory.empty())
   {
     if (iWindow == WINDOW_PICTURES)
       showLabel = 997;
@@ -965,7 +965,7 @@ bool CGUIMediaWindow::OnClick(int iItem)
     {
       const CStdString& strLockType=m_guiState->GetLockType();
       if (CProfilesManager::Get().GetMasterProfile().getLockMode() != LOCK_MODE_EVERYONE)
-        if (!strLockType.IsEmpty() && !g_passwordManager.IsItemUnlocked(pItem.get(), strLockType))
+        if (!strLockType.empty() && !g_passwordManager.IsItemUnlocked(pItem.get(), strLockType))
             return true;
 
       if (!HaveDiscOrConnection(pItem->GetPath(), pItem->m_iDriveType))
@@ -1114,7 +1114,7 @@ void CGUIMediaWindow::ShowShareErrorMessage(CFileItem* pItem)
   CURL url(pItem->GetPath());
   const CStdString& strHostName = url.GetHostName();
 
-  if (url.GetProtocol() == "smb" && strHostName.IsEmpty()) //  smb workgroup
+  if (url.GetProtocol() == "smb" && strHostName.empty()) //  smb workgroup
     idMessageText = 15303; // Workgroup not found
   else if (pItem->m_iDriveType == CMediaSource::SOURCE_TYPE_REMOTE || URIUtils::IsRemote(pItem->GetPath()))
     idMessageText = 15301; // Could not connect to network server
@@ -1138,7 +1138,7 @@ void CGUIMediaWindow::GoParentFolder()
   // in case the path history is messed up and the current folder is on
   // the stack more than once, keep going until there's nothing left or they
   // dont match anymore.
-  while (!strParent.IsEmpty())
+  while (!strParent.empty())
   {
     URIUtils::AddSlashAtEnd(strParent);
     if (strParent.Equals(strPath))
@@ -1243,7 +1243,7 @@ void CGUIMediaWindow::SetHistoryForPath(const CStdString& strDirectory)
 {
   // Make sure our shares are configured
   SetupShares();
-  if (!strDirectory.IsEmpty())
+  if (!strDirectory.empty())
   {
     // Build the directory history for default path
     CStdString strPath, strParentPath;
@@ -1795,7 +1795,7 @@ bool CGUIMediaWindow::GetFilteredItems(const CStdString &filter, CFileItemList &
   CStdString trimmedFilter(filter);
   trimmedFilter.TrimLeft().ToLower();
   
-  if (trimmedFilter.IsEmpty())
+  if (trimmedFilter.empty())
     return result;
 
   CFileItemList filteredItems(items.GetPath()); // use the original path - it'll likely be relied on for other things later.
index 9cdb6c7..d6e9a58 100644 (file)
@@ -116,7 +116,7 @@ void CGUIWindowDebugInfo::Process(unsigned int currentTime, CDirtyRegionList &di
   // render the skin debug info
   if (g_SkinInfo->IsDebugging())
   {
-    if (!info.IsEmpty())
+    if (!info.empty())
       info += "\n";
     CGUIWindow *window = g_windowManager.GetWindow(g_windowManager.GetFocusedWindow());
     CGUIWindow *pointer = g_windowManager.GetWindow(WINDOW_DIALOG_POINTER);
@@ -126,7 +126,7 @@ void CGUIWindowDebugInfo::Process(unsigned int currentTime, CDirtyRegionList &di
     if (window)
     {
       CStdString windowName = CButtonTranslator::TranslateWindow(window->GetID());
-      if (!windowName.IsEmpty())
+      if (!windowName.empty())
         windowName += " (" + CStdString(window->GetProperty("xmlfile").asString()) + ")";
       else
         windowName = window->GetProperty("xmlfile").asString();
index 6b995af..e26b187 100644 (file)
@@ -367,7 +367,7 @@ void CGUIWindowFileManager::UpdateButtons()
 {
   // update our current directory labels
   CStdString strDir = CURL(m_Directory[0]->GetPath()).GetWithoutUserDetails();
-  if (strDir.IsEmpty())
+  if (strDir.empty())
   {
     SET_CONTROL_LABEL(CONTROL_CURRENTDIRLABEL_LEFT,g_localizeStrings.Get(20108));
   }
@@ -376,7 +376,7 @@ void CGUIWindowFileManager::UpdateButtons()
     SET_CONTROL_LABEL(CONTROL_CURRENTDIRLABEL_LEFT, strDir);
   }
   strDir = CURL(m_Directory[1]->GetPath()).GetWithoutUserDetails();
-  if (strDir.IsEmpty())
+  if (strDir.empty())
   {
     SET_CONTROL_LABEL(CONTROL_CURRENTDIRLABEL_RIGHT,g_localizeStrings.Get(20108));
   }
@@ -457,7 +457,7 @@ bool CGUIWindowFileManager::Update(int iList, const CStdString &strDirectory)
 
   CStdString strParentPath;
   URIUtils::GetParentPath(strDirectory, strParentPath);
-  if (strDirectory.IsEmpty() && (m_vecItems[iList]->Size() == 0 || CSettings::Get().GetBool("filelists.showaddsourcebuttons")))
+  if (strDirectory.empty() && (m_vecItems[iList]->Size() == 0 || CSettings::Get().GetBool("filelists.showaddsourcebuttons")))
   { // add 'add source button'
     CStdString strLabel = g_localizeStrings.Get(1026);
     CFileItemPtr pItem(new CFileItem(strLabel));
@@ -480,7 +480,7 @@ bool CGUIWindowFileManager::Update(int iList, const CStdString &strDirectory)
 
   m_strParentPath[iList] = (m_rootDir.IsSource(strDirectory) ? "" : strParentPath);
 
-  if (strDirectory.IsEmpty())
+  if (strDirectory.empty())
   {
     CFileItemPtr pItem(new CFileItem("special://profile/", true));
     pItem->SetLabel(g_localizeStrings.Get(20070));
@@ -818,7 +818,7 @@ void CGUIWindowFileManager::GoParentFolder(int iList)
   if ((url.GetProtocol() == "rar") || (url.GetProtocol() == "zip"))
   {
     // check for step-below, if, unmount rar
-    if (url.GetFileName().IsEmpty())
+    if (url.GetFileName().empty())
       if (url.GetProtocol() == "zip")
         g_ZipManager.release(m_Directory[iList]->GetPath()); // release resources
   }
@@ -1163,7 +1163,7 @@ void CGUIWindowFileManager::ShowShareErrorMessage(CFileItem* pItem)
   CURL url(pItem->GetPath());
   const CStdString& strHostName = url.GetHostName();
 
-  if (url.GetProtocol() == "smb" && strHostName.IsEmpty()) //  smb workgroup
+  if (url.GetProtocol() == "smb" && strHostName.empty()) //  smb workgroup
     idMessageText = 15303; // Workgroup not found
   else if (pItem->m_iDriveType == CMediaSource::SOURCE_TYPE_REMOTE || URIUtils::IsRemote(pItem->GetPath()))
     idMessageText = 15301; // Could not connect to network server
@@ -1203,7 +1203,7 @@ void CGUIWindowFileManager::SetInitialPath(const CStdString &path)
   // check for a passed destination path
   CStdString strDestination = path;
   m_rootDir.SetSources(*CMediaSourceSettings::Get().GetSources("files"));
-  if (!strDestination.IsEmpty())
+  if (!strDestination.empty())
   {
     CLog::Log(LOGINFO, "Attempting to quickpath to: %s", strDestination.c_str());
   }
@@ -1214,7 +1214,7 @@ void CGUIWindowFileManager::SetInitialPath(const CStdString &path)
     CLog::Log(LOGINFO, "Attempting to default to: %s", strDestination.c_str());
   }
   // try to open the destination path
-  if (!strDestination.IsEmpty())
+  if (!strDestination.empty())
   {
     // open root
     if (strDestination.Equals("$ROOT"))
index fb6d119..13db6a5 100644 (file)
@@ -199,13 +199,13 @@ void CGUIWindowLoginScreen::Update()
     const CProfile *profile = CProfilesManager::Get().GetProfile(i);
     CFileItemPtr item(new CFileItem(profile->getName()));
     CStdString strLabel;
-    if (profile->getDate().IsEmpty())
+    if (profile->getDate().empty())
       strLabel = g_localizeStrings.Get(20113);
     else
       strLabel = StringUtils::Format(g_localizeStrings.Get(20112).c_str(), profile->getDate().c_str());
     item->SetLabel2(strLabel);
     item->SetArt("thumb", profile->getThumb());
-    if (profile->getThumb().IsEmpty() || profile->getThumb().Equals("-"))
+    if (profile->getThumb().empty() || profile->getThumb().Equals("-"))
       item->SetArt("thumb", "unknown-user.png");
     item->SetLabelPreformated(true);
     m_vecItems->Add(item);