Permalink
Browse files

Merge pull request #4987 from jmarshallnz/stdstring_removal_part2

Stdstring removal part2
  • Loading branch information...
2 parents b0a9373 + 7d3889a commit 7b8fcdbfa67b842fa427c79a0f75e940ddbdfb75 @jmarshallnz jmarshallnz committed Jul 13, 2014
Showing 683 changed files with 5,413 additions and 5,432 deletions.
View
@@ -2085,7 +2085,7 @@ void CApplication::UnloadSkin(bool forReload /* = false */)
bool CApplication::LoadUserWindows()
{
// Start from wherever home.xml is
- std::vector<CStdString> vecSkinPath;
+ std::vector<std::string> vecSkinPath;
g_SkinInfo->GetSkinPaths(vecSkinPath);
for (unsigned int i = 0;i < vecSkinPath.size();++i)
{
@@ -2207,7 +2207,7 @@ float CApplication::GetDimScreenSaverLevel() const
return 0;
if (!m_screenSaver->GetSetting("level").empty())
- return 100.0f - (float)atof(m_screenSaver->GetSetting("level"));
+ return 100.0f - (float)atof(m_screenSaver->GetSetting("level").c_str());
return 100.0f;
}
View
@@ -26,6 +26,7 @@
#include "guilib/IMsgTargetCallback.h"
#include "threads/Condition.h"
#include "utils/GlobalsHandling.h"
+#include "utils/StdString.h"
#include <map>
View
@@ -150,7 +150,7 @@ int CApplicationPlayer::GetChapterCount()
return 0;
}
-void CApplicationPlayer::GetChapterName(CStdString& strChapterName)
+void CApplicationPlayer::GetChapterName(std::string& strChapterName)
{
boost::shared_ptr<IPlayer> player = GetInternal();
if (player)
@@ -262,7 +262,7 @@ void CApplicationPlayer::SeekTime(int64_t iTime)
player->SeekTime(iTime);
}
-CStdString CApplicationPlayer::GetPlayingTitle()
+std::string CApplicationPlayer::GetPlayingTitle()
{
boost::shared_ptr<IPlayer> player = GetInternal();
if (player)
@@ -422,7 +422,7 @@ void CApplicationPlayer::DoAudioWork()
player->DoAudioWork();
}
-CStdString CApplicationPlayer::GetPlayerState()
+std::string CApplicationPlayer::GetPlayerState()
{
boost::shared_ptr<IPlayer> player = GetInternal();
if (player)
@@ -443,7 +443,7 @@ bool CApplicationPlayer::GetStreamDetails(CStreamDetails &details)
return (player && player->GetStreamDetails(details));
}
-bool CApplicationPlayer::SetPlayerState(CStdString state)
+bool CApplicationPlayer::SetPlayerState(const std::string& state)
{
boost::shared_ptr<IPlayer> player = GetInternal();
return (player && player->SetPlayerState(state));
@@ -527,7 +527,7 @@ void CApplicationPlayer::SetSubtitleVisible(bool bVisible)
player->SetSubtitleVisible(bVisible);
}
-int CApplicationPlayer::AddSubtitle(const CStdString& strSubPath)
+int CApplicationPlayer::AddSubtitle(const std::string& strSubPath)
{
boost::shared_ptr<IPlayer> player = GetInternal();
if (player)
@@ -584,21 +584,21 @@ void CApplicationPlayer::GetSubtitleCapabilities(std::vector<int> &subCaps)
player->GetSubtitleCapabilities(subCaps);
}
-void CApplicationPlayer::GetAudioInfo( CStdString& strAudioInfo)
+void CApplicationPlayer::GetAudioInfo(std::string& strAudioInfo)
{
boost::shared_ptr<IPlayer> player = GetInternal();
if (player)
player->GetAudioInfo(strAudioInfo);
}
-void CApplicationPlayer::GetVideoInfo( CStdString& strVideoInfo)
+void CApplicationPlayer::GetVideoInfo(std::string& strVideoInfo)
{
boost::shared_ptr<IPlayer> player = GetInternal();
if (player)
player->GetVideoInfo(strVideoInfo);
}
-void CApplicationPlayer::GetGeneralInfo( CStdString& strVideoInfo)
+void CApplicationPlayer::GetGeneralInfo(std::string& strVideoInfo)
{
boost::shared_ptr<IPlayer> player = GetInternal();
if (player)
View
@@ -80,28 +80,28 @@ class CApplicationPlayer
void SetPlaySpeed(int iSpeed, bool bApplicationMuted);
// proxy calls
- int AddSubtitle(const CStdString& strSubPath);
+ int AddSubtitle(const std::string& strSubPath);
bool CanPause();
bool CanRecord();
bool CanSeek();
bool ControlsVolume() const;
void DoAudioWork();
void GetAudioCapabilities(std::vector<int> &audioCaps);
- void GetAudioInfo( CStdString& strAudioInfo);
+ void GetAudioInfo(std::string& strAudioInfo);
int GetAudioStream();
int GetAudioStreamCount();
void GetAudioStreamInfo(int index, SPlayerAudioStreamInfo &info);
int GetCacheLevel() const;
float GetCachePercentage() const;
int GetChapterCount();
int GetChapter();
- void GetChapterName(CStdString& strChapterName);
+ void GetChapterName(std::string& strChapterName);
void GetDeinterlaceMethods(std::vector<int> &deinterlaceMethods);
void GetDeinterlaceModes(std::vector<int> &deinterlaceModes);
- void GetGeneralInfo( CStdString& strVideoInfo);
+ void GetGeneralInfo(std::string& strVideoInfo);
float GetPercentage() const;
- CStdString GetPlayerState();
- CStdString GetPlayingTitle();
+ std::string GetPlayerState();
+ std::string GetPlayingTitle();
void GetRenderFeatures(std::vector<int> &renderFeatures);
void GetScalingMethods(std::vector<int> &scalingMethods);
bool GetStreamDetails(CStreamDetails &details);
@@ -113,7 +113,7 @@ class CApplicationPlayer
TextCacheStruct_t* GetTeletextCache();
int64_t GetTime() const;
int64_t GetTotalTime() const;
- void GetVideoInfo( CStdString& strVideoInfo);
+ void GetVideoInfo(std::string& strVideoInfo);
void GetVideoStreamInfo(SPlayerVideoStreamInfo &info);
bool HasAudio() const;
bool HasMenu() const;
@@ -143,7 +143,7 @@ class CApplicationPlayer
void SetAVDelay(float fValue = 0.0f);
void SetDynamicRangeCompression(long drc);
void SetMute(bool bOnOff);
- bool SetPlayerState(CStdString state);
+ bool SetPlayerState(const std::string& state);
void SetSubtitle(int iStream);
void SetSubTitleDelay(float fValue = 0.0f);
void SetSubtitleVisible(bool bVisible);
View
@@ -1965,14 +1965,14 @@ CStdString CGUIInfoManager::GetLabel(int info, int contextWindow, std::string *f
break;
case NETWORK_DNS1_ADDRESS:
{
- vector<CStdString> nss = g_application.getNetwork().GetNameServers();
+ vector<std::string> nss = g_application.getNetwork().GetNameServers();
if (nss.size() >= 1)
return nss[0];
}
break;
case NETWORK_DNS2_ADDRESS:
{
- vector<CStdString> nss = g_application.getNetwork().GetNameServers();
+ vector<std::string> nss = g_application.getNetwork().GetNameServers();
if (nss.size() >= 2)
return nss[1];
}
@@ -3777,9 +3777,9 @@ CStdString CGUIInfoManager::GetVideoLabel(int item)
case VIDEOPLAYER_GENRE:
return tag->GetEPGNow(epgTag) ? StringUtils::Join(epgTag.Genre(), g_advancedSettings.m_videoItemSeparator) : "";
case VIDEOPLAYER_PLOT:
- return tag->GetEPGNow(epgTag) ? epgTag.Plot() : StringUtils::EmptyString;
+ return tag->GetEPGNow(epgTag) ? epgTag.Plot() : "";
case VIDEOPLAYER_PLOT_OUTLINE:
- return tag->GetEPGNow(epgTag) ? epgTag.PlotOutline() : StringUtils::EmptyString;
+ return tag->GetEPGNow(epgTag) ? epgTag.PlotOutline() : "";
case VIDEOPLAYER_STARTTIME:
return tag->GetEPGNow(epgTag) ? epgTag.StartAsLocalTime().GetAsLocalizedTime("", false) : CDateTime::GetCurrentDateTime().GetAsLocalizedTime("", false);
case VIDEOPLAYER_ENDTIME:
@@ -3795,9 +3795,9 @@ CStdString CGUIInfoManager::GetVideoLabel(int item)
case VIDEOPLAYER_NEXT_GENRE:
return tag->GetEPGNext(epgTag) ? StringUtils::Join(epgTag.Genre(), g_advancedSettings.m_videoItemSeparator) : "";
case VIDEOPLAYER_NEXT_PLOT:
- return tag->GetEPGNext(epgTag) ? epgTag.Plot() : StringUtils::EmptyString;
+ return tag->GetEPGNext(epgTag) ? epgTag.Plot() : "";
case VIDEOPLAYER_NEXT_PLOT_OUTLINE:
- return tag->GetEPGNext(epgTag) ? epgTag.PlotOutline() : StringUtils::EmptyString;
+ return tag->GetEPGNext(epgTag) ? epgTag.PlotOutline() : "";
case VIDEOPLAYER_NEXT_STARTTIME:
return tag->GetEPGNext(epgTag) ? epgTag.StartAsLocalTime().GetAsLocalizedTime("", false) : CDateTime::GetCurrentDateTime().GetAsLocalizedTime("", false);
case VIDEOPLAYER_NEXT_ENDTIME:
@@ -5250,8 +5250,8 @@ void CGUIInfoManager::UpdateFromTuxBox()
// Set m_currentMovieDuration
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("-"))
+ g_tuxbox.sCurSrvData.current_event_duration != "-" &&
+ g_tuxbox.sCurSrvData.next_event_description != "-")
{
StringUtils::Replace(g_tuxbox.sCurSrvData.current_event_duration, "(","");
StringUtils::Replace(g_tuxbox.sCurSrvData.current_event_duration, ")","");
@@ -5267,8 +5267,8 @@ void CGUIInfoManager::UpdateFromTuxBox()
//Set strVideoGenre
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("-"))
+ g_tuxbox.sCurSrvData.current_event_description != "-" &&
+ g_tuxbox.sCurSrvData.next_event_description != "-")
{
CStdString genre = StringUtils::Format("%s %s - (%s: %s)",
g_localizeStrings.Get(143).c_str(),
@@ -5279,7 +5279,7 @@ void CGUIInfoManager::UpdateFromTuxBox()
}
//Set m_currentMovie.m_director
- if (!g_tuxbox.sCurSrvData.current_event_details.Equals("-") &&
+ if (g_tuxbox.sCurSrvData.current_event_details != "-" &&
!g_tuxbox.sCurSrvData.current_event_details.empty())
{
m_currentFile->GetVideoInfoTag()->m_director = StringUtils::Split(g_tuxbox.sCurSrvData.current_event_details, g_advancedSettings.m_videoItemSeparator);
@@ -5541,7 +5541,7 @@ int CGUIInfoManager::TranslateSkinVariableString(const CStdString& name, int con
for (vector<CSkinVariableString>::const_iterator it = m_skinVariableStrings.begin();
it != m_skinVariableStrings.end(); ++it)
{
- if (it->GetName().Equals(name) && it->GetContext() == context)
+ if (StringUtils::EqualsNoCase(it->GetName(), name) && it->GetContext() == context)
return it - m_skinVariableStrings.begin() + CONDITIONAL_LABEL_START;
}
return 0;
View
@@ -30,6 +30,7 @@
#include "addons/Scraper.h"
#include "utils/CharsetConverter.h"
#include "utils/XMLUtils.h"
+#include "utils/StdString.h"
class CNfoFile
{
@@ -113,7 +113,7 @@ bool CPartyModeManager::Enable(PartyModeContext context /*= PARTYMODECONTEXT_MUS
CMusicDatabase db;
if (db.Open())
{
- set<CStdString> playlists;
+ set<std::string> playlists;
if ( playlistLoaded )
m_strCurrentFilterMusic = playlist.GetWhereClause(db, playlists);
@@ -142,7 +142,7 @@ bool CPartyModeManager::Enable(PartyModeContext context /*= PARTYMODECONTEXT_MUS
CVideoDatabase db;
if (db.Open())
{
- set<CStdString> playlists;
+ set<std::string> playlists;
if ( playlistLoaded )
m_strCurrentFilterVideo = playlist.GetWhereClause(db, playlists);
View
@@ -72,14 +72,14 @@ int CTextureRule::TranslateField(const char *field) const
return FieldNone;
}
-CStdString CTextureRule::TranslateField(int field) const
+std::string CTextureRule::TranslateField(int field) const
{
for (unsigned int i = 0; i < NUM_FIELDS; i++)
if (field == fields[i].field) return fields[i].string;
return "none";
}
-CStdString CTextureRule::GetField(int field, const CStdString &type) const
+std::string CTextureRule::GetField(int field, const std::string &type) const
{
if (field == TF_Id) return "texture.id";
else if (field == TF_Url) return "texture.url";
@@ -100,9 +100,12 @@ CDatabaseQueryRule::FIELD_TYPE CTextureRule::GetFieldType(int field) const
return TEXT_FIELD;
}
-CStdString CTextureRule::FormatParameter(const CStdString &operatorString, const CStdString &param, const CDatabase &db, const CStdString &strType) const
+std::string CTextureRule::FormatParameter(const std::string &operatorString,
+ const std::string &param,
+ const CDatabase &db,
+ const std::string &strType) const
{
- CStdString parameter(param);
+ std::string parameter(param);
if (m_field == TF_Url)
parameter = CTextureUtils::UnwrapImageURL(param);
return CDatabaseQueryRule::FormatParameter(operatorString, parameter, db, strType);
@@ -285,8 +288,8 @@ bool CTextureDatabase::GetTextures(CVariant &items, const Filter &filter)
if (NULL == m_pDB.get()) return false;
if (NULL == m_pDS.get()) return false;
- CStdString sql = "SELECT %s FROM texture JOIN sizes ON (texture.id=sizes.idtexture AND sizes.size=1)";
- CStdString sqlFilter;
+ std::string sql = "SELECT %s FROM texture JOIN sizes ON (texture.id=sizes.idtexture AND sizes.size=1)";
+ std::string sqlFilter;
if (!CDatabase::BuildSQL("", filter, sqlFilter))
return false;
View
@@ -35,10 +35,13 @@ class CTextureRule : public CDatabaseQueryRule
static void GetAvailableFields(std::vector<std::string> &fieldList);
protected:
virtual int TranslateField(const char *field) const;
- virtual CStdString TranslateField(int field) const;
- virtual CStdString GetField(int field, const CStdString& type) const;
+ virtual std::string TranslateField(int field) const;
+ virtual std::string GetField(int field, const std::string& type) const;
virtual FIELD_TYPE GetFieldType(int field) const;
- virtual CStdString FormatParameter(const CStdString &negate, const CStdString &oper, const CDatabase &db, const CStdString &type) const;
+ virtual std::string FormatParameter(const std::string &negate,
+ const std::string &oper,
+ const CDatabase &db,
+ const std::string &type) const;
};
class CTextureUtils
Oops, something went wrong.

0 comments on commit 7b8fcdb

Please sign in to comment.