Skip to content

Commit

Permalink
Replace C-style casts to C++ casts
Browse files Browse the repository at this point in the history
  • Loading branch information
AchimTuran authored and popcornmix committed Mar 28, 2017
1 parent 64839ca commit 3b8b4a0
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions xbmc/Application.cpp
Expand Up @@ -1417,7 +1417,7 @@ void CApplication::OnSettingChanged(const CSetting *setting)

if (settingId == CSettings::SETTING_AUDIOOUTPUT_GUISOUNDMODE)
{
m_ServiceManager->GetActiveAE().SetSoundMode(((CSettingInt*)setting)->GetValue());
m_ServiceManager->GetActiveAE().SetSoundMode((static_cast<const CSettingInt*>(setting))->GetValue());
}
// this tells player whether to open an audio stream passthrough or PCM
// if this is changed, audio stream has to be reopened
Expand Down Expand Up @@ -2236,7 +2236,7 @@ bool CApplication::OnAction(const CAction &action)
int iSpeed = 1 << iPower;
if (iSpeed != 1 && action.GetID() == ACTION_ANALOG_REWIND)
iSpeed = -iSpeed;
g_application.m_pPlayer->SetPlaySpeed((float)iSpeed);
g_application.m_pPlayer->SetPlaySpeed(static_cast<float>(iSpeed));
if (iSpeed == 1)
CLog::Log(LOGDEBUG,"Resetting playspeed");
return true;
Expand Down
2 changes: 1 addition & 1 deletion xbmc/addons/interfaces/AudioDSP/AddonCallbacksAudioDSP.cpp
Expand Up @@ -189,7 +189,7 @@ void CAddonCallbacksADSP::ADSPSoundPlay_ReleaseHandle(void *addonData, ADSPHANDL
return;
}

CServiceBroker::GetActiveAE().FreeSound((IAESound*)handle);
CServiceBroker::GetActiveAE().FreeSound(reinterpret_cast<IAESound*>(handle));
}

void CAddonCallbacksADSP::ADSPSoundPlay_Play(void *addonData, ADSPHANDLE handle)
Expand Down
Expand Up @@ -85,7 +85,7 @@ void CAddonCallbacksAudioEngine::AudioEngine_FreeStream(AEStreamHandle *StreamHa
return;
}

CServiceBroker::GetActiveAE().FreeStream((IAEStream*)StreamHandle);
CServiceBroker::GetActiveAE().FreeStream(reinterpret_cast<IAEStream*>(StreamHandle));
}

bool CAddonCallbacksAudioEngine::AudioEngine_GetCurrentSinkFormat(void *AddonData, AudioEngineFormat *SinkFormat)
Expand Down

0 comments on commit 3b8b4a0

Please sign in to comment.