// 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())
////////////////////////////////////////////////////////////////////////////////////
bool CCueDocument::ExtractQuoteInfo(const CStdString &line, CStdString "e)
{
- quote.Empty();
+ quote.clear();
int left = line.Find('\"');
if (left < 0) return false;
int right = line.Find('\"', left + 1);
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;
m_pvrTimerInfoTag=NULL;
delete m_pictureInfoTag;
m_pictureInfoTag=NULL;
- m_extrainfo.Empty();
+ m_extrainfo.clear();
m_specialSort = SortSpecialNone;
ClearProperties();
SetInvalid();
m_cacheToDisc = CACHE_IF_SLOW;
m_sortDetails.clear();
m_replaceListing = false;
- m_content.Empty();
+ m_content.clear();
}
void CFileItemList::ClearItems()
{
dvdPath = URIUtils::AddFileToFolder(item->GetPath(), "VIDEO_TS");
path = URIUtils::AddFileToFolder(dvdPath, "VIDEO_TS.IFO");
- dvdPath.Empty();
+ dvdPath.clear();
if (CFile::Exists(path))
dvdPath = path;
}
{
dvdPath = URIUtils::AddFileToFolder(item->GetPath(), "BDMV");
path = URIUtils::AddFileToFolder(dvdPath, "index.bdmv");
- dvdPath.Empty();
+ dvdPath.clear();
if (CFile::Exists(path))
dvdPath = path;
}
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
{
m_bIsVideo = false;
m_bEnabled = false;
- m_strCurrentFilterMusic.Empty();
- m_strCurrentFilterVideo.Empty();
+ m_strCurrentFilterMusic.clear();
+ m_strCurrentFilterVideo.clear();
ClearState();
}
}
else
{
- m_strCurrentFilterMusic.Empty();
- m_strCurrentFilterVideo.Empty();
+ m_strCurrentFilterMusic.clear();
+ m_strCurrentFilterVideo.clear();
m_type = m_bIsVideo ? "musicvideos" : "songs";
}
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();
void CURL::SetOptions(const CStdString& strOptions)
{
- m_strOptions.Empty();
+ m_strOptions.clear();
m_options.Clear();
if( strOptions.length() > 0)
{
void CURL::SetProtocolOptions(const CStdString& strOptions)
{
- m_strProtocolOptions.Empty();
+ m_strProtocolOptions.clear();
m_protocolOptions.Clear();
if (strOptions.length() > 0)
{
}
}
parameters.push_back(parameter);
- parameter.Empty();
+ parameter.clear();
whiteSpacePos = 0;
continue;
}
{ \
CStdString fan=CAddonMgr::Get().GetExtValue(metadata->configuration, x); \
if (fan.Equals("true")) \
- y.Empty(); \
+ y.clear(); \
}
AddonProps::AddonProps(const cp_extension_t *ext)
unsigned int CDVDVideoCodecFFmpeg::SetFilters(unsigned int flags)
{
- m_filters_next.Empty();
+ m_filters_next.clear();
if(m_pHardware)
return 0;
}
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)
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();
g_charsetConverter.utf8ToW(aTextString, newStr);
if (!newStr.IsEmpty())
{
- m_strEditing.Empty();
+ m_strEditing.clear();
m_iEditingOffset = 0;
m_strEdit.Insert(GetCursorPos(), newStr);
UpdateLabel();
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);
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);
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'*');
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;
/* 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())
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;
CFileInfo::CFileInfo()
{
- m_strCachedPath.Empty();
+ m_strCachedPath.clear();
m_bAutoDel = true;
m_iUsed = 0;
m_iIsSeekable = -1;
}
if( strXMLRootString.Equals(root->Value()) && bIsBouquet)
{
- data.Empty();
+ data.clear();
if (enigma2)
result = g_tuxbox.ParseBouquetsEnigma2(root, items, url, strFilter, strXMLChildString);
else
}
else if( strXMLRootString.Equals(root->Value()) && !strFilter.IsEmpty() )
{
- data.Empty();
+ data.clear();
if (enigma2)
result = g_tuxbox.ParseChannelsEnigma2(root, items, url, strFilter, strXMLChildString);
else
{
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;
}
}
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;
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;
bool GUIFontManager::GetFirstFontSetUnicode(CStdString& strFontSet)
{
- strFontSet.Empty();
+ strFontSet.clear();
// Load our font file
CXBMCTinyXML xmlDoc;
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("");
}
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);
void CGUITextLayout::Reset()
{
m_lines.clear();
- m_lastText.Empty();
+ m_lastText.clear();
m_textWidth = m_textHeight = 0;
}
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;
void Reset()
{
idAlbum = -1;
- strAlbum.Empty();
- strMusicBrainzAlbumID.Empty();
+ strAlbum.clear();
+ strMusicBrainzAlbumID.clear();
artist.clear();
artistCredits.clear();
genre.clear();
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;
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.
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;
}
// 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();
m_mapFileItems->SetFastLookup(true);
}
- m_strPrevPath.Empty();
+ m_strPrevPath.clear();
m_databaseHits = m_tagReads = 0;
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;
iTimesPlayed = 0;
lastPlayed.Reset();
iKaraokeNumber = 0;
- strKaraokeLyrEncoding.Empty();
+ strKaraokeLyrEncoding.clear();
iKaraokeDelay = 0;
idAlbum = -1;
bCompilation = false;
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;
}
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)
{
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();
if (!usePassword)
{
- pw.Empty();
+ pw.clear();
}
ServerInstance = new CAirTunesServer(port, nonlocal);
// 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)
{
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)
CGUIMessage msgReset(GUI_MSG_LABEL_RESET, GetID(), CONTROL_PICTURE_INFO);
OnMessage(msgReset);
m_pictureInfo->Clear();
- m_currentPicture.Empty();
+ m_currentPicture.clear();
}
if (!profile)
{ // defaults
- dialog->m_strName.Empty();
+ dialog->m_strName.clear();
dialog->m_iDbMode = 2;
dialog->m_iSourcesMode = 2;
dialog->m_locks = CProfile::CLock();
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;
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)
{
// 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++)
{
if (strHTML.size() == 0)
{
- strStripped.Empty();
+ strStripped.clear();
return ;
}
int iPos = 0;
void CLangCodeExpander::CodeToString(long code, CStdString& ret)
{
- ret.Empty();
+ ret.clear();
for (unsigned int j = 0 ; j < 4 ; j++)
{
char c = (char) code & 0xFF;
delete m_document;
m_document = NULL;
- m_strFile.Empty();
+ m_strFile.clear();
}
bool CScraperParser::Load(const CStdString& strXMLFile)
bool CScraperUrl::Parse()
{
CStdString strToParse = m_xml;
- m_xml.Empty();
+ m_xml.clear();
return ParseString(strToParse);
}
return GetLength();
}
- void Empty()
- {
- this->erase();
- }
-
int Find(CT ch) const
{
MYSIZE nIdx = this->find_first_of(ch);
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();
CURL::Decode(strStringValue);
return true;
}
- strStringValue.Empty();
+ strStringValue.clear();
return false;
}
// test file existence
if (!nfoFile.IsEmpty() && !CFile::Exists(nfoFile))
- nfoFile.Empty();
+ nfoFile.clear();
if (nfoFile.IsEmpty()) // final attempt - strip off any cd1 folders
{
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());
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");
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;
}