[cstdstring] remove CStdString::Empty and replace with std::string::clear
authornight199uk <night199uk@xbmc.org>
Tue, 10 Sep 2013 13:15:38 +0000 (21:15 +0800)
committerJonathan Marshall <jmarshall@xbmc.org>
Wed, 13 Nov 2013 19:26:56 +0000 (08:26 +1300)
45 files changed:
xbmc/Application.cpp
xbmc/CueDocument.cpp
xbmc/FileItem.cpp
xbmc/MediaSource.cpp
xbmc/PartyModeManager.cpp
xbmc/PlayListPlayer.cpp
xbmc/URL.cpp
xbmc/Util.cpp
xbmc/addons/Addon.cpp
xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp
xbmc/dialogs/GUIDialogFileBrowser.cpp
xbmc/dialogs/GUIDialogKeyboardGeneric.cpp
xbmc/filesystem/CurlFile.cpp
xbmc/filesystem/RarFile.cpp
xbmc/filesystem/RarManager.cpp
xbmc/filesystem/TuxBoxDirectory.cpp
xbmc/guilib/GUIControlFactory.cpp
xbmc/guilib/GUIEditControl.cpp
xbmc/guilib/GUIFontManager.cpp
xbmc/guilib/GUIImage.cpp
xbmc/guilib/GUITextLayout.cpp
xbmc/interfaces/Builtins.cpp
xbmc/music/Album.h
xbmc/music/Artist.h
xbmc/music/MusicDatabase.cpp
xbmc/music/MusicInfoLoader.cpp
xbmc/music/Song.cpp
xbmc/music/infoscanner/MusicInfoScraper.cpp
xbmc/music/tags/MusicInfoTag.cpp
xbmc/network/AirTunesServer.cpp
xbmc/network/DNSNameCache.cpp
xbmc/network/GUIDialogNetworkSetup.cpp
xbmc/pictures/GUIDialogPictureInfo.cpp
xbmc/profiles/dialogs/GUIDialogProfileSettings.cpp
xbmc/utils/Fanart.cpp
xbmc/utils/HTMLUtil.cpp
xbmc/utils/LangCodeExpander.cpp
xbmc/utils/ScraperParser.cpp
xbmc/utils/ScraperUrl.cpp
xbmc/utils/StdString.h
xbmc/utils/TuxBoxUtil.cpp
xbmc/utils/XMLUtils.cpp
xbmc/video/VideoInfoScanner.cpp
xbmc/video/dialogs/GUIDialogVideoBookmarks.cpp
xbmc/view/GUIViewState.cpp

index f1c83ef..fe9b8a4 100644 (file)
@@ -4357,7 +4357,7 @@ void CApplication::UpdateFileState()
         // Update bookmark for save
         m_progressTrackingVideoResumeBookmark.player = CPlayerCoreFactory::Get().GetPlayerName(m_pPlayer->GetCurrentPlayer());
         m_progressTrackingVideoResumeBookmark.playerState = m_pPlayer->GetPlayerState();
-        m_progressTrackingVideoResumeBookmark.thumbNailImage.Empty();
+        m_progressTrackingVideoResumeBookmark.thumbNailImage.clear();
 
         if (g_advancedSettings.m_videoIgnorePercentAtEnd > 0 &&
             GetTotalTime() - GetTime() < 0.01f * g_advancedSettings.m_videoIgnorePercentAtEnd * GetTotalTime())
index 19ff055..193139f 100644 (file)
@@ -304,7 +304,7 @@ bool CCueDocument::ReadNextLine(CStdString &szLine)
 ////////////////////////////////////////////////////////////////////////////////////
 bool CCueDocument::ExtractQuoteInfo(const CStdString &line, CStdString &quote)
 {
-  quote.Empty();
+  quote.clear();
   int left = line.Find('\"');
   if (left < 0) return false;
   int right = line.Find('\"', left + 1);
index c1417d8..317aa0b 100644 (file)
@@ -536,16 +536,16 @@ const CFileItem& CFileItem::operator=(const CFileItem& item)
 
 void CFileItem::Reset()
 {
-  m_strLabel2.Empty();
+  m_strLabel2.clear();
   SetLabel("");
   m_bLabelPreformated=false;
   FreeIcons();
   m_overlayIcon = ICON_OVERLAY_NONE;
   m_bSelected = false;
   m_bIsAlbum = false;
-  m_strDVDLabel.Empty();
-  m_strTitle.Empty();
-  m_strPath.Empty();
+  m_strDVDLabel.clear();
+  m_strTitle.clear();
+  m_strPath.clear();
   m_dwSize = 0;
   m_bIsFolder = false;
   m_bIsParentFolder=false;
@@ -577,7 +577,7 @@ void CFileItem::Reset()
   m_pvrTimerInfoTag=NULL;
   delete m_pictureInfoTag;
   m_pictureInfoTag=NULL;
-  m_extrainfo.Empty();
+  m_extrainfo.clear();
   m_specialSort = SortSpecialNone;
   ClearProperties();
   SetInvalid();
@@ -1638,7 +1638,7 @@ void CFileItemList::Clear()
   m_cacheToDisc = CACHE_IF_SLOW;
   m_sortDetails.clear();
   m_replaceListing = false;
-  m_content.Empty();
+  m_content.clear();
 }
 
 void CFileItemList::ClearItems()
@@ -2368,7 +2368,7 @@ void CFileItemList::StackFolders()
           {
             dvdPath = URIUtils::AddFileToFolder(item->GetPath(), "VIDEO_TS");
             path = URIUtils::AddFileToFolder(dvdPath, "VIDEO_TS.IFO");
-            dvdPath.Empty();
+            dvdPath.clear();
             if (CFile::Exists(path))
               dvdPath = path;
           }
@@ -2382,7 +2382,7 @@ void CFileItemList::StackFolders()
             {
               dvdPath = URIUtils::AddFileToFolder(item->GetPath(), "BDMV");
               path = URIUtils::AddFileToFolder(dvdPath, "index.bdmv");
-              dvdPath.Empty();
+              dvdPath.clear();
               if (CFile::Exists(path))
                 dvdPath = path;
             }
index deead9b..cfdea55 100644 (file)
@@ -39,7 +39,7 @@ void CMediaSource::FromNameAndPaths(const CStdString &category, const CStdString
   vecPaths = paths;
   if (paths.size() == 0)
   { // no paths - return
-    strPath.Empty();
+    strPath.clear();
   }
   else if (paths.size() == 1)
   { // only one valid path? make it the strPath
index 764ade9..11d8fc9 100644 (file)
@@ -46,8 +46,8 @@ CPartyModeManager::CPartyModeManager(void)
 {
   m_bIsVideo = false;
   m_bEnabled = false;
-  m_strCurrentFilterMusic.Empty();
-  m_strCurrentFilterVideo.Empty();
+  m_strCurrentFilterMusic.clear();
+  m_strCurrentFilterVideo.clear();
   ClearState();
 }
 
@@ -91,8 +91,8 @@ bool CPartyModeManager::Enable(PartyModeContext context /*= PARTYMODECONTEXT_MUS
   }
   else
   {
-    m_strCurrentFilterMusic.Empty();
-    m_strCurrentFilterVideo.Empty();
+    m_strCurrentFilterMusic.clear();
+    m_strCurrentFilterVideo.clear();
     m_type = m_bIsVideo ? "musicvideos" : "songs";
   }
 
index f45281a..fb2b920 100644 (file)
@@ -378,7 +378,7 @@ void CPlayListPlayer::SetCurrentPlaylist(int iPlaylist)
 void CPlayListPlayer::ClearPlaylist(int iPlaylist)
 {
   // clear our applications playlist file
-  g_application.m_strPlayListFile.Empty();
+  g_application.m_strPlayListFile.clear();
 
   CPlayList& playlist = GetPlaylist(iPlaylist);
   playlist.Clear();
index bb708b1..8eb01e3 100644 (file)
@@ -386,7 +386,7 @@ void CURL::SetProtocol(const CStdString& strProtocol)
 
 void CURL::SetOptions(const CStdString& strOptions)
 {
-  m_strOptions.Empty();
+  m_strOptions.clear();
   m_options.Clear();
   if( strOptions.length() > 0)
   {
@@ -402,7 +402,7 @@ void CURL::SetOptions(const CStdString& strOptions)
 
 void CURL::SetProtocolOptions(const CStdString& strOptions)
 {
-  m_strProtocolOptions.Empty();
+  m_strProtocolOptions.clear();
   m_protocolOptions.Clear();
   if (strOptions.length() > 0)
   {
index e3512f3..a42913f 100644 (file)
@@ -1104,7 +1104,7 @@ void CUtil::SplitParams(const CStdString &paramString, std::vector<CStdString> &
           }
         }
         parameters.push_back(parameter);
-        parameter.Empty();
+        parameter.clear();
         whiteSpacePos = 0;
         continue;
       }
index 7e59ebe..36efc23 100644 (file)
@@ -130,7 +130,7 @@ const CStdString GetIcon(const ADDON::TYPE& type)
   { \
     CStdString fan=CAddonMgr::Get().GetExtValue(metadata->configuration, x); \
     if (fan.Equals("true")) \
-      y.Empty(); \
+      y.clear(); \
   }
 
 AddonProps::AddonProps(const cp_extension_t *ext)
index 95c8093..a4e1477 100644 (file)
@@ -381,7 +381,7 @@ void CDVDVideoCodecFFmpeg::SetDropState(bool bDrop)
 
 unsigned int CDVDVideoCodecFFmpeg::SetFilters(unsigned int flags)
 {
-  m_filters_next.Empty();
+  m_filters_next.clear();
 
   if(m_pHardware)
     return 0;
index 7ee0bed..7fbcb91 100644 (file)
@@ -160,12 +160,12 @@ bool CGUIDialogFileBrowser::OnMessage(CGUIMessage& message)
         }
 
         if (bFool && !CDirectory::Exists(m_selectedPath))
-          m_selectedPath.Empty();
+          m_selectedPath.clear();
       }
       else
       {
         if (!CFile::Exists(m_selectedPath) && !CDirectory::Exists(m_selectedPath))
-            m_selectedPath.Empty();
+            m_selectedPath.clear();
       }
 
       // find the parent folder if we are a file browser (don't do this for folders)
index 66354bb..de1b1d4 100644 (file)
@@ -311,8 +311,8 @@ bool CGUIDialogKeyboardGeneric::OnMessage(CGUIMessage& message)
 
 void CGUIDialogKeyboardGeneric::SetText(const CStdString& aTextString)
 {
-  m_strEdit.Empty();
-  m_strEditing.Empty();
+  m_strEdit.clear();
+  m_strEditing.clear();
   m_iEditingOffset = 0;
   g_charsetConverter.utf8ToW(aTextString, m_strEdit);
   UpdateLabel();
@@ -325,7 +325,7 @@ void CGUIDialogKeyboardGeneric::InputText(const CStdString& aTextString)
   g_charsetConverter.utf8ToW(aTextString, newStr);
   if (!newStr.IsEmpty())
   {
-    m_strEditing.Empty();
+    m_strEditing.clear();
     m_iEditingOffset = 0;
     m_strEdit.Insert(GetCursorPos(), newStr);
     UpdateLabel();
@@ -335,7 +335,7 @@ void CGUIDialogKeyboardGeneric::InputText(const CStdString& aTextString)
 
 void CGUIDialogKeyboardGeneric::InputTextEditing(const CStdString& aTextString, int start, int length)
 {
-  m_strEditing.Empty();
+  m_strEditing.clear();
   m_iEditingOffset = start;
   m_iEditingLength = length;
   g_charsetConverter.utf8ToW(aTextString, m_strEditing);
@@ -354,7 +354,7 @@ CStdString CGUIDialogKeyboardGeneric::GetText() const
 void CGUIDialogKeyboardGeneric::Character(WCHAR ch)
 {
   if (!ch) return;
-  m_strEditing.Empty();
+  m_strEditing.clear();
   m_iEditingOffset = 0;
   // TODO: May have to make this routine take a WCHAR for the symbols?
   m_strEdit.Insert(GetCursorPos(), ch);
@@ -384,7 +384,7 @@ void CGUIDialogKeyboardGeneric::UpdateLabel() // FIXME seems to be called twice
     pEdit->SetSelection(0, 0);
     if (m_hiddenInput)
     { // convert to *'s
-      edit.Empty();
+      edit.clear();
       if (m_lastRemoteClickTime + REMOTE_SMS_DELAY > CTimeUtils::GetFrameTime() && m_iCursorPos > 0)
       { // using the remove to input, so display the last key input
         edit.append(m_iCursorPos - 1, L'*');
index 03a6574..4cb578a 100644 (file)
@@ -419,9 +419,9 @@ void CCurlFile::Close()
   delete m_oldState;
   m_oldState = NULL;
 
-  m_url.Empty();
-  m_referer.Empty();
-  m_cookie.Empty();
+  m_url.clear();
+  m_referer.clear();
+  m_cookie.clear();
 
   m_opened = false;
   m_forWrite = false;
@@ -682,7 +682,7 @@ void CCurlFile::ParseAndCorrectUrl(CURL &url2)
 
     /* TODO: create a tokenizer that doesn't skip empty's */
     StringUtils::Tokenize(filename, array, "/");
-    filename.Empty();
+    filename.clear();
     for(std::vector<std::string>::iterator it = array.begin(); it != array.end(); it++)
     {
       if(it != array.begin())
index f3278af..15c45fc 100644 (file)
@@ -113,10 +113,10 @@ void CRarFileExtractThread::Process()
 
 CRarFile::CRarFile()
 {
-  m_strCacheDir.Empty();
-  m_strRarPath.Empty();
-  m_strPassword.Empty();
-  m_strPathInRar.Empty();
+  m_strCacheDir.clear();
+  m_strRarPath.clear();
+  m_strPassword.clear();
+  m_strPathInRar.clear();
   m_bFileOptions = 0;
 #ifdef HAS_FILESYSTEM_RAR
   m_pArc = NULL;
index 449f73f..6458b84 100644 (file)
@@ -44,7 +44,7 @@ using namespace XFILE;
 
 CFileInfo::CFileInfo()
 {
-  m_strCachedPath.Empty();
+  m_strCachedPath.clear();
   m_bAutoDel = true;
   m_iUsed = 0;
   m_iIsSeekable = -1;
index ac3bbed..8b32337 100644 (file)
@@ -139,7 +139,7 @@ bool CTuxBoxDirectory::GetDirectory(const CStdString& strPath, CFileItemList &it
       }
       if( strXMLRootString.Equals(root->Value()) && bIsBouquet)
       {
-        data.Empty();
+        data.clear();
         if (enigma2)
           result = g_tuxbox.ParseBouquetsEnigma2(root, items, url, strFilter, strXMLChildString);
         else
@@ -147,7 +147,7 @@ bool CTuxBoxDirectory::GetDirectory(const CStdString& strPath, CFileItemList &it
       }
       else if( strXMLRootString.Equals(root->Value()) && !strFilter.IsEmpty() )
       {
-        data.Empty();
+        data.clear();
         if (enigma2)
           result = g_tuxbox.ParseChannelsEnigma2(root, items, url, strFilter, strXMLChildString);
         else
@@ -157,7 +157,7 @@ bool CTuxBoxDirectory::GetDirectory(const CStdString& strPath, CFileItemList &it
       {
         CLog::Log(LOGERROR, "%s - Invalid root xml element for TuxBox", __FUNCTION__);
         CLog::Log(LOGERROR, "%s - Sample follows...\n%s", __FUNCTION__, data.c_str());
-        data.Empty();
+        data.clear();
         result = false;
       }
     }
index 47cf8d8..58e2cd3 100644 (file)
@@ -638,7 +638,7 @@ bool CGUIControlFactory::GetString(const TiXmlNode* pRootNode, const char *strTa
   if (!XMLUtils::GetString(pRootNode, strTag, text))
     return false;
   if (text == "-")
-    text.Empty();
+    text.clear();
   if (StringUtils::IsNaturalNumber(text))
     text = g_localizeStrings.Get(atoi(text.c_str()));
   return true;
index 2b03f64..c44d05d 100644 (file)
@@ -541,7 +541,7 @@ bool CGUIEditControl::ClearMD5()
   if (!(m_inputType == INPUT_TYPE_PASSWORD_MD5 || m_inputType == INPUT_TYPE_PASSWORD_NUMBER_VERIFY_NEW) || !m_isMD5)
     return false;
   
-  m_text2.Empty();
+  m_text2.clear();
   m_cursorPos = 0;
   if (m_inputType != INPUT_TYPE_PASSWORD_NUMBER_VERIFY_NEW)
     m_isMD5 = false;
index 7b39190..aecb382 100644 (file)
@@ -487,7 +487,7 @@ bool GUIFontManager::OpenFontFile(CXBMCTinyXML& xmlDoc)
 
 bool GUIFontManager::GetFirstFontSetUnicode(CStdString& strFontSet)
 {
-  strFontSet.Empty();
+  strFontSet.clear();
 
   // Load our font file
   CXBMCTinyXML xmlDoc;
index e501459..90a3187 100644 (file)
@@ -235,7 +235,7 @@ void CGUIImage::FreeTextures(bool immediately /* = false */)
   for (unsigned int i = 0; i < m_fadingTextures.size(); i++)
     delete m_fadingTextures[i];
   m_fadingTextures.clear();
-  m_currentTexture.Empty();
+  m_currentTexture.clear();
   if (!m_info.IsConstant()) // constant textures never change
     m_texture.SetFileName("");
 }
index 652a3ab..dff4ef7 100644 (file)
@@ -325,7 +325,7 @@ void CGUITextLayout::Filter(CStdString &text)
   vecColors colors;
   vecText parsedText;
   ParseText(utf16, 0, 0xffffffff, colors, parsedText);
-  utf16.Empty();
+  utf16.clear();
   for (unsigned int i = 0; i < parsedText.size(); i++)
     utf16 += (wchar_t)(0xffff & parsedText[i]);
   g_charsetConverter.wToUTF8(utf16, text);
@@ -667,7 +667,7 @@ void CGUITextLayout::AppendToUTF32(const CStdString &utf8, character_t colStyle,
 void CGUITextLayout::Reset()
 {
   m_lines.clear();
-  m_lastText.Empty();
+  m_lastText.clear();
   m_textWidth = m_textHeight = 0;
 }
 
index 4debb33..3e3cbcc 100644 (file)
@@ -245,7 +245,7 @@ bool CBuiltins::HasCommand(const CStdString& execString)
 
 void CBuiltins::GetHelp(CStdString &help)
 {
-  help.Empty();
+  help.clear();
   for (unsigned int i = 0; i < sizeof(commands)/sizeof(BUILT_IN); i++)
   {
     help += commands[i].command;
index a1be611..2cd331e 100644 (file)
@@ -42,8 +42,8 @@ public:
   void Reset()
   {
     idAlbum = -1;
-    strAlbum.Empty();
-    strMusicBrainzAlbumID.Empty();
+    strAlbum.clear();
+    strMusicBrainzAlbumID.clear();
     artist.clear();
     artistCredits.clear();
     genre.clear();
@@ -52,11 +52,11 @@ public:
     styles.clear();
     themes.clear();
     art.clear();
-    strReview.Empty();
-    strLabel.Empty();
-    strType.Empty();
-    strPath.Empty();
-    m_strDateOfRelease.Empty();
+    strReview.clear();
+    strLabel.clear();
+    strType.clear();
+    strPath.clear();
+    m_strDateOfRelease.clear();
     iRating=-1;
     iYear=-1;
     bCompilation = false;
index 8e31ebe..fc9c739 100644 (file)
@@ -50,21 +50,21 @@ public:
 
   void Reset()
   {
-    strArtist.Empty();
+    strArtist.clear();
     genre.clear();
-    strBiography.Empty();
+    strBiography.clear();
     styles.clear();
     moods.clear();
     instruments.clear();
-    strBorn.Empty();
-    strFormed.Empty();
-    strDied.Empty();
-    strDisbanded.Empty();
+    strBorn.clear();
+    strFormed.clear();
+    strDied.clear();
+    strDisbanded.clear();
     yearsActive.clear();
     thumbURL.Clear();
     discography.clear();
     idArtist = -1;
-    strPath.Empty();
+    strPath.clear();
   }
 
   /*! \brief Load artist information from an XML file.
index 0a480bc..990302d 100644 (file)
@@ -3921,7 +3921,7 @@ bool CMusicDatabase::GetAlbumPath(int idAlbum, CStdString& path)
     if (NULL == m_pDB.get()) return false;
     if (NULL == m_pDS2.get()) return false;
 
-    path.Empty();
+    path.clear();
 
     CStdString strSQL=PrepareSQL("select strPath from song join path on song.idPath = path.idPath where song.idAlbum=%ld", idAlbum);
     if (!m_pDS2->query(strSQL.c_str())) return false;
@@ -3996,7 +3996,7 @@ bool CMusicDatabase::GetArtistPath(int idArtist, CStdString &basePath)
     }
 
     // find the common path (if any) to these albums
-    basePath.Empty();
+    basePath.clear();
     while (!m_pDS2->eof())
     {
       CStdString path = m_pDS2->fv("strPath").get_asString();
index 42c4b38..b348797 100644 (file)
@@ -67,7 +67,7 @@ void CMusicInfoLoader::OnLoaderStart()
     m_mapFileItems->SetFastLookup(true);
   }
 
-  m_strPrevPath.Empty();
+  m_strPrevPath.clear();
 
   m_databaseHits = m_tagReads = 0;
 
index ce733f6..971b2f9 100644 (file)
@@ -94,15 +94,15 @@ void CSong::Serialize(CVariant& value) const
 
 void CSong::Clear()
 {
-  strFileName.Empty();
-  strTitle.Empty();
+  strFileName.clear();
+  strTitle.clear();
   artist.clear();
-  strAlbum.Empty();
+  strAlbum.clear();
   albumArtist.clear();
   genre.clear();
-  strThumb.Empty();
-  strMusicBrainzTrackID.Empty();
-  strComment.Empty();
+  strThumb.clear();
+  strMusicBrainzTrackID.clear();
+  strComment.clear();
   rating = '0';
   iTrack = 0;
   iDuration = 0;
@@ -113,7 +113,7 @@ void CSong::Clear()
   iTimesPlayed = 0;
   lastPlayed.Reset();
   iKaraokeNumber = 0;
-  strKaraokeLyrEncoding.Empty();
+  strKaraokeLyrEncoding.clear();
   iKaraokeDelay = 0;
   idAlbum = -1;
   bCompilation = false;
index 1004578..7a541a5 100644 (file)
@@ -125,7 +125,7 @@ void CMusicInfoScraper::LoadArtistInfo()
     return;
 
   CMusicArtistInfo& artist=m_vecArtists[m_iArtist];
-  artist.GetArtist().strArtist.Empty();
+  artist.GetArtist().strArtist.clear();
   if (artist.Load(*m_http,m_scraper,m_strSearch))
     m_bSucceeded=true;
 }
@@ -165,13 +165,13 @@ void CMusicInfoScraper::Process()
     if (m_strAlbum.size())
     {
       FindAlbumInfo();
-      m_strAlbum.Empty();
-      m_strArtist.Empty();
+      m_strAlbum.clear();
+      m_strArtist.clear();
     }
     else if (m_strArtist.size())
     {
       FindArtistInfo();
-      m_strArtist.Empty();
+      m_strArtist.clear();
     }
     if (m_iAlbum>-1)
     {
index 8c960dd..122b68f 100644 (file)
@@ -672,23 +672,23 @@ void CMusicInfoTag::Archive(CArchive& ar)
 
 void CMusicInfoTag::Clear()
 {
-  m_strURL.Empty();
+  m_strURL.clear();
   m_artist.clear();
-  m_strAlbum.Empty();
+  m_strAlbum.clear();
   m_albumArtist.clear();
   m_genre.clear();
-  m_strTitle.Empty();
-  m_strMusicBrainzTrackID.Empty();
+  m_strTitle.clear();
+  m_strMusicBrainzTrackID.clear();
   m_musicBrainzArtistID.clear();
-  m_strMusicBrainzAlbumID.Empty();
+  m_strMusicBrainzAlbumID.clear();
   m_musicBrainzAlbumArtistID.clear();
-  m_strMusicBrainzTRMID.Empty();
+  m_strMusicBrainzTRMID.clear();
   m_iDuration = 0;
   m_iTrack = 0;
   m_bLoaded = false;
   m_lastPlayed.Reset();
   m_bCompilation = false;
-  m_strComment.Empty();
+  m_strComment.clear();
   m_rating = '0';
   m_iDbId = -1;
   m_type.clear();
index 3c1767c..4776ccb 100644 (file)
@@ -524,7 +524,7 @@ bool CAirTunesServer::StartServer(int port, bool nonlocal, bool usePassword, con
 
   if (!usePassword)
   {
-    pw.Empty();
+    pw.clear();
   }
 
   ServerInstance = new CAirTunesServer(port, nonlocal);
index 0866fbe..56b76fb 100644 (file)
@@ -44,7 +44,7 @@ bool CDNSNameCache::Lookup(const CStdString& strHostName, CStdString& strIpAddre
 
   // first see if this is already an ip address
   unsigned long address = inet_addr(strHostName.c_str());
-  strIpAddress.Empty();
+  strIpAddress.clear();
 
   if (address != INADDR_NONE)
   {
index 02830eb..40bf650 100644 (file)
@@ -65,10 +65,10 @@ bool CGUIDialogNetworkSetup::OnMessage(CGUIMessage& message)
       int iControl = message.GetSenderId();
       if (iControl == CONTROL_PROTOCOL)
       {
-        m_server.Empty();
-        m_path.Empty();
-        m_username.Empty();
-        m_password.Empty();
+        m_server.clear();
+        m_path.clear();
+        m_username.clear();
+        m_password.clear();
         OnProtocolChange();
       }
       else if (iControl == CONTROL_SERVER_BROWSE)
index 3c1adf3..77a78ea 100644 (file)
@@ -117,5 +117,5 @@ void CGUIDialogPictureInfo::OnDeinitWindow(int nextWindowID)
   CGUIMessage msgReset(GUI_MSG_LABEL_RESET, GetID(), CONTROL_PICTURE_INFO);
   OnMessage(msgReset);
   m_pictureInfo->Clear();
-  m_currentPicture.Empty();
+  m_currentPicture.clear();
 }
index 74fb870..595cdde 100644 (file)
@@ -259,7 +259,7 @@ bool CGUIDialogProfileSettings::ShowForProfile(unsigned int iProfile, bool first
 
   if (!profile)
   { // defaults
-    dialog->m_strName.Empty();
+    dialog->m_strName.clear();
     dialog->m_iDbMode = 2;
     dialog->m_iSourcesMode = 2;
     dialog->m_locks = CProfile::CLock();
@@ -269,8 +269,8 @@ bool CGUIDialogProfileSettings::ShowForProfile(unsigned int iProfile, bool first
     dialog->m_locks.settings = (bLock) ? LOCK_LEVEL::ALL : LOCK_LEVEL::NONE;
     dialog->m_locks.files = bLock;
 
-    dialog->m_strDirectory.Empty();
-    dialog->m_strThumb.Empty();
+    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())
       return false;
index 7ba1097..653d20d 100644 (file)
@@ -37,7 +37,7 @@ CFanart::CFanart()
 void CFanart::Pack()
 {
   // Take our data and pack it into the m_xml string
-  m_xml.Empty();
+  m_xml.clear();
   TiXmlElement fanart("fanart");
   for (std::vector<SFanartData>::const_iterator it = m_fanart.begin(); it != m_fanart.end(); ++it)
   {
@@ -147,7 +147,7 @@ bool CFanart::ParseColors(const CStdString &colorsIn, CStdString &colorsOut)
   // check for the TVDB RGB triplets "|68,69,59|69,70,58|78,78,68|"
   if (colorsIn[0] == '|')
   { // need conversion
-    colorsOut.Empty();
+    colorsOut.clear();
     CStdStringArray strColors;
     StringUtils::SplitString(colorsIn, "|", strColors);
     for (int i = 0; i < std::min((int)strColors.size()-1, (int)max_fanart_colors); i++)
index 7efe00e..8359ebd 100644 (file)
@@ -266,7 +266,7 @@ void CHTMLUtil::ConvertHTMLToW(const CStdStringW& strHTML, CStdStringW& strStrip
 {
   if (strHTML.size() == 0)
   {
-    strStripped.Empty();
+    strStripped.clear();
     return ;
   }
   int iPos = 0;
index 44aedd8..3d99afd 100644 (file)
@@ -415,7 +415,7 @@ bool CLangCodeExpander::LookupInDb(CStdString& desc, const CStdString& code)
 
 void CLangCodeExpander::CodeToString(long code, CStdString& ret)
 {
-  ret.Empty();
+  ret.clear();
   for (unsigned int j = 0 ; j < 4 ; j++)
   {
     char c = (char) code & 0xFF;
index 9ca4329..e6728c9 100644 (file)
@@ -85,7 +85,7 @@ void CScraperParser::Clear()
   delete m_document;
 
   m_document = NULL;
-  m_strFile.Empty();
+  m_strFile.clear();
 }
 
 bool CScraperParser::Load(const CStdString& strXMLFile)
index 5f95039..14dff31 100644 (file)
@@ -65,7 +65,7 @@ void CScraperUrl::Clear()
 bool CScraperUrl::Parse()
 {
   CStdString strToParse = m_xml;
-  m_xml.Empty();
+  m_xml.clear();
   return ParseString(strToParse);
 }
 
index 6d53523..b576e21 100644 (file)
@@ -2720,11 +2720,6 @@ public:
     return GetLength();
   }
 
-  void Empty()
-  {
-    this->erase();
-  }
-
   int Find(CT ch) const
   {
     MYSIZE nIdx  = this->find_first_of(ch);
index 8df2b55..a2e7829 100644 (file)
@@ -788,7 +788,7 @@ bool CTuxBoxUtil::GetHttpXML(CURL url,CStdString strRequestType)
       TiXmlElement *XMLRoot=NULL;
       strTmp.Replace("></",">-</"); //FILL EMPTY ELEMENTS WITH "-"!
       doc.Parse(strTmp, http.GetServerReportedCharset());
-      strTmp.Empty();
+      strTmp.clear();
 
       XMLRoot = doc.RootElement();
       CStdString strRoot = XMLRoot->Value();
index 97f17bb..2d1e1d7 100644 (file)
@@ -240,7 +240,7 @@ bool XMLUtils::GetPath(const TiXmlNode* pRootNode, const char* strTag, CStdStrin
       CURL::Decode(strStringValue);
     return true;
   }
-  strStringValue.Empty();
+  strStringValue.clear();
   return false;
 }
 
index ebbdc05..6c2a381 100644 (file)
@@ -1553,7 +1553,7 @@ namespace VIDEO
 
       // test file existence
       if (!nfoFile.IsEmpty() && !CFile::Exists(nfoFile))
-        nfoFile.Empty();
+        nfoFile.clear();
 
       if (nfoFile.IsEmpty()) // final attempt - strip off any cd1 folders
       {
index 2616f91..a744218 100644 (file)
@@ -310,7 +310,7 @@ bool CGUIDialogVideoBookmarks::AddBookmark(CVideoInfoTag* tag)
   if( g_application.m_pPlayer->HasPlayer() )
     bookmark.playerState = g_application.m_pPlayer->GetPlayerState();
   else
-    bookmark.playerState.Empty();
+    bookmark.playerState.clear();
 
   bookmark.player = CPlayerCoreFactory::Get().GetPlayerName(g_application.GetCurrentPlayer());
 
@@ -343,7 +343,7 @@ bool CGUIDialogVideoBookmarks::AddBookmark(CVideoInfoTag* tag)
         bookmark.thumbNailImage = URIUtils::AddFileToFolder(CProfilesManager::Get().GetBookmarksThumbFolder(), bookmark.thumbNailImage);
         if (!CPicture::CreateThumbnailFromSurface(thumbnail->GetPixels(), width, height, thumbnail->GetWidth() * 4,
                                             bookmark.thumbNailImage))
-          bookmark.thumbNailImage.Empty();
+          bookmark.thumbNailImage.clear();
       }
       else
         CLog::Log(LOGERROR,"CGUIDialogVideoBookmarks: failed to create thumbnail");
index e415725..2ae4f90 100644 (file)
@@ -241,10 +241,10 @@ void CGUIViewState::GetSortMethodLabelMasks(LABEL_MASKS& masks) const
     return;
   }
 
-  masks.m_strLabelFile.Empty();
-  masks.m_strLabel2File.Empty();
-  masks.m_strLabelFolder.Empty();
-  masks.m_strLabel2Folder.Empty();
+  masks.m_strLabelFile.clear();
+  masks.m_strLabel2File.clear();
+  masks.m_strLabelFolder.clear();
+  masks.m_strLabel2Folder.clear();
   return;
 }