aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGarrett Brown <themagnificentmrb@gmail.com>2018-03-16 09:54:45 -0700
committerGarrett Brown <themagnificentmrb@gmail.com>2018-03-30 10:46:13 -0700
commite0e0307c07a89e65fb0a9f49eec66d4f6fb456db (patch)
tree1b3d220f09b59ddebba2caa0101033544ed6d5a5
parent981f05652ffa4b0e614e5f18754f048eb4327f2a (diff)
Cleanup: Replace C-style casts with C++ style casts
-rw-r--r--xbmc/guilib/StereoscopicsManager.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/xbmc/guilib/StereoscopicsManager.cpp b/xbmc/guilib/StereoscopicsManager.cpp
index 2d9b2a2069..eddb3a8ea8 100644
--- a/xbmc/guilib/StereoscopicsManager.cpp
+++ b/xbmc/guilib/StereoscopicsManager.cpp
@@ -129,7 +129,7 @@ void CStereoscopicsManager::Initialize(void)
RENDER_STEREO_MODE CStereoscopicsManager::GetStereoMode(void) const
{
- return (RENDER_STEREO_MODE) m_settings.GetInt(CSettings::SETTING_VIDEOSCREEN_STEREOSCOPICMODE);
+ return static_cast<RENDER_STEREO_MODE>(m_settings.GetInt(CSettings::SETTING_VIDEOSCREEN_STEREOSCOPICMODE));
}
void CStereoscopicsManager::SetStereoModeByUser(const RENDER_STEREO_MODE &mode)
@@ -163,7 +163,7 @@ RENDER_STEREO_MODE CStereoscopicsManager::GetNextSupportedStereoMode(const RENDE
{
RENDER_STEREO_MODE mode = currentMode;
do {
- mode = (RENDER_STEREO_MODE) ((mode + step) % RENDER_STEREO_MODE_COUNT);
+ mode = static_cast<RENDER_STEREO_MODE>((mode + step) % RENDER_STEREO_MODE_COUNT);
if(CServiceBroker::GetRenderSystem().SupportsStereo(mode))
break;
} while (mode != currentMode);
@@ -227,7 +227,7 @@ RENDER_STEREO_MODE CStereoscopicsManager::GetStereoModeByUserChoice(const std::s
std::vector<RENDER_STEREO_MODE> selectableModes;
for (int i = RENDER_STEREO_MODE_OFF; i < RENDER_STEREO_MODE_COUNT; i++)
{
- RENDER_STEREO_MODE selectableMode = (RENDER_STEREO_MODE) i;
+ RENDER_STEREO_MODE selectableMode = static_cast<RENDER_STEREO_MODE>(i);
if (CServiceBroker::GetRenderSystem().SupportsStereo(selectableMode))
{
selectableModes.push_back(selectableMode);
@@ -248,7 +248,7 @@ RENDER_STEREO_MODE CStereoscopicsManager::GetStereoModeByUserChoice(const std::s
int iItem = pDlgSelect->GetSelectedItem();
if (iItem > -1 && pDlgSelect->IsConfirmed())
- mode = (RENDER_STEREO_MODE) selectableModes[iItem];
+ mode = static_cast<RENDER_STEREO_MODE>(selectableModes[iItem]);
else
mode = GetStereoMode();
@@ -264,7 +264,7 @@ RENDER_STEREO_MODE CStereoscopicsManager::GetStereoModeOfPlayingVideo(void) cons
{
int convertedMode = ConvertVideoToGuiStereoMode(playerMode);
if (convertedMode > -1)
- mode = (RENDER_STEREO_MODE) convertedMode;
+ mode = static_cast<RENDER_STEREO_MODE>(convertedMode);
}
CLog::Log(LOGDEBUG, "StereoscopicsManager: autodetected stereo mode for movie mode %s is: %s", playerMode.c_str(), ConvertGuiStereoModeToString(mode));
@@ -302,7 +302,7 @@ std::string CStereoscopicsManager::GetLabelForStereoMode(const RENDER_STEREO_MOD
RENDER_STEREO_MODE CStereoscopicsManager::GetPreferredPlaybackMode(void) const
{
- return (RENDER_STEREO_MODE) m_settings.GetInt(CSettings::SETTING_VIDEOSCREEN_PREFEREDSTEREOSCOPICMODE);
+ return static_cast<RENDER_STEREO_MODE>(m_settings.GetInt(CSettings::SETTING_VIDEOSCREEN_PREFEREDSTEREOSCOPICMODE));
}
int CStereoscopicsManager::ConvertVideoToGuiStereoMode(const std::string &mode)
@@ -485,7 +485,7 @@ bool CStereoscopicsManager::OnAction(const CAction &action)
{
int stereoMode = ConvertStringToGuiStereoMode(action.GetName());
if (stereoMode > -1)
- SetStereoModeByUser( (RENDER_STEREO_MODE) stereoMode );
+ SetStereoModeByUser(static_cast<RENDER_STEREO_MODE>(stereoMode));
return true;
}
@@ -521,7 +521,7 @@ bool CStereoscopicsManager::IsVideoStereoscopic() const
void CStereoscopicsManager::OnStreamChange()
{
- STEREOSCOPIC_PLAYBACK_MODE playbackMode = (STEREOSCOPIC_PLAYBACK_MODE) m_settings.GetInt(CSettings::SETTING_VIDEOPLAYER_STEREOSCOPICPLAYBACKMODE);
+ STEREOSCOPIC_PLAYBACK_MODE playbackMode = static_cast<STEREOSCOPIC_PLAYBACK_MODE>(m_settings.GetInt(CSettings::SETTING_VIDEOPLAYER_STEREOSCOPICPLAYBACKMODE));
RENDER_STEREO_MODE mode = GetStereoMode();
// early return if playback mode should be ignored and we're in no stereoscopic mode right now