Skip to content

Commit

Permalink
[stdstring] get rid of CStdString in video/windows/
Browse files Browse the repository at this point in the history
  • Loading branch information
notspiff authored and Montellese committed Jan 7, 2015
1 parent 412f911 commit e54ccf4
Show file tree
Hide file tree
Showing 6 changed files with 124 additions and 120 deletions.
28 changes: 14 additions & 14 deletions xbmc/video/windows/GUIWindowFullScreen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ bool CGUIWindowFullScreen::OnAction(const CAction &action)
else
{
int autoCloseTime = CSettings::Get().GetBool("pvrplayback.confirmchannelswitch") ? 0 : g_advancedSettings.m_iPVRNumericChannelSwitchTimeout;
CStdString strChannel = StringUtils::Format("%i", action.GetID() - REMOTE_0);
std::string strChannel = StringUtils::Format("%i", action.GetID() - REMOTE_0);
if (CGUIDialogNumeric::ShowAndGetNumber(strChannel, g_localizeStrings.Get(19000), autoCloseTime) || autoCloseTime)
{
int iChannelNumber = atoi(strChannel.c_str());
Expand All @@ -281,7 +281,7 @@ bool CGUIWindowFullScreen::OnAction(const CAction &action)
{
// filesystem provider like slingbox, cmyth, etc
int iChannelNumber = -1;
CStdString strChannel = StringUtils::Format("%i", action.GetID() - REMOTE_0);
std::string strChannel = StringUtils::Format("%i", action.GetID() - REMOTE_0);
if (CGUIDialogNumeric::ShowAndGetNumber(strChannel, g_localizeStrings.Get(19000)))
iChannelNumber = atoi(strChannel.c_str());

Expand Down Expand Up @@ -466,7 +466,7 @@ bool CGUIWindowFullScreen::OnMessage(CGUIMessage& message)
// Get the currently selected label of the Select button
CGUIMessage msg(GUI_MSG_ITEM_SELECTED, GetID(), iControl);
OnMessage(msg);
CStdString strLabel = msg.GetLabel();
std::string strLabel = msg.GetLabel();

CPVRChannelPtr playingChannel;
if (g_PVRManager.GetCurrentChannel(playingChannel))
Expand Down Expand Up @@ -561,7 +561,7 @@ void CGUIWindowFullScreen::FrameMove()
if (m_showCodec)
{
// show audio codec info
CStdString strAudio, strVideo, strGeneral;
std::string strAudio, strVideo, strGeneral;
g_application.m_pPlayer->GetAudioInfo(strAudio);
{
CGUIMessage msg(GUI_MSG_LABEL_SET, GetID(), LABEL_ROW1);
Expand All @@ -578,19 +578,19 @@ void CGUIWindowFullScreen::FrameMove()
// show general info
g_application.m_pPlayer->GetGeneralInfo(strGeneral);
{
CStdString strGeneralFPS;
std::string strGeneralFPS;
#if defined(TARGET_DARWIN)
// We show CPU usage for the entire process, as it's arguably more useful.
double dCPU = m_resourceCounter.GetCPUUsage();
CStdString strCores;
std::string strCores;
strCores = StringUtils::Format("cpu:%.0f%%", dCPU);
#else
CStdString strCores = g_cpuInfo.GetCoresUsageString();
std::string strCores = g_cpuInfo.GetCoresUsageString();
#endif
int missedvblanks;
double refreshrate;
double clockspeed;
CStdString strClock;
std::string strClock;

if (g_VideoReferenceClock.GetClockInfo(missedvblanks, clockspeed, refreshrate))
strClock = StringUtils::Format("S( refresh:%.3f missed:%i speed:%+.3f%% %s )"
Expand Down Expand Up @@ -622,9 +622,9 @@ void CGUIWindowFullScreen::FrameMove()

{
// get the "View Mode" string
CStdString strTitle = g_localizeStrings.Get(629);
CStdString strMode = g_localizeStrings.Get(630 + CMediaSettings::Get().GetCurrentVideoSettings().m_ViewMode);
CStdString strInfo = StringUtils::Format("%s : %s", strTitle.c_str(), strMode.c_str());
std::string strTitle = g_localizeStrings.Get(629);
std::string strMode = g_localizeStrings.Get(630 + CMediaSettings::Get().GetCurrentVideoSettings().m_ViewMode);
std::string strInfo = StringUtils::Format("%s : %s", strTitle.c_str(), strMode.c_str());
CGUIMessage msg(GUI_MSG_LABEL_SET, GetID(), LABEL_ROW1);
msg.SetLabel(strInfo);
OnMessage(msg);
Expand All @@ -637,7 +637,7 @@ void CGUIWindowFullScreen::FrameMove()
float xscale = (float)res.iScreenWidth / (float)res.iWidth;
float yscale = (float)res.iScreenHeight / (float)res.iHeight;

CStdString strSizing = StringUtils::Format(g_localizeStrings.Get(245).c_str(),
std::string strSizing = StringUtils::Format(g_localizeStrings.Get(245).c_str(),
(int)info.SrcRect.Width(),
(int)info.SrcRect.Height(),
(int)(info.DestRect.Width() * xscale),
Expand All @@ -652,7 +652,7 @@ void CGUIWindowFullScreen::FrameMove()
}
// show resolution information
{
CStdString strStatus;
std::string strStatus;
if (g_Windowing.IsFullScreen())
strStatus = StringUtils::Format("%s %ix%i@%.2fHz - %s",
g_localizeStrings.Get(13287).c_str(),
Expand Down Expand Up @@ -680,7 +680,7 @@ void CGUIWindowFullScreen::FrameMove()
m_timeCodeShow = false;
m_timeCodePosition = 0;
}
CStdString strDispTime = "00:00:00";
std::string strDispTime = "00:00:00";

CGUIMessage msg(GUI_MSG_LABEL_SET, GetID(), LABEL_ROW1);

Expand Down
Loading

0 comments on commit e54ccf4

Please sign in to comment.