aboutsummaryrefslogtreecommitdiff
path: root/src/plugins/Output/wasapi/settingsdialog.cpp
diff options
context:
space:
mode:
authortrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2019-01-03 08:41:40 +0000
committertrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2019-01-03 08:41:40 +0000
commita49047c93e91edbc35b8ba74437ad2e94ad8f5e4 (patch)
treec86bea5a8233d6ca157edb2f60dddf3e3571af13 /src/plugins/Output/wasapi/settingsdialog.cpp
parentb917024aa1ac4cb0a40164132db3c6d2913157eb (diff)
downloadqmmp-a49047c93e91edbc35b8ba74437ad2e94ad8f5e4.tar.gz
qmmp-a49047c93e91edbc35b8ba74437ad2e94ad8f5e4.tar.bz2
qmmp-a49047c93e91edbc35b8ba74437ad2e94ad8f5e4.zip
fixed build with -Werror=zero-as-null-pointer-constant
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@8573 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src/plugins/Output/wasapi/settingsdialog.cpp')
-rw-r--r--src/plugins/Output/wasapi/settingsdialog.cpp36
1 files changed, 18 insertions, 18 deletions
diff --git a/src/plugins/Output/wasapi/settingsdialog.cpp b/src/plugins/Output/wasapi/settingsdialog.cpp
index 12bb0f592..910cd7782 100644
--- a/src/plugins/Output/wasapi/settingsdialog.cpp
+++ b/src/plugins/Output/wasapi/settingsdialog.cpp
@@ -57,25 +57,25 @@ void SettingsDialog::enumDevices()
m_ui.deviceComboBox->clear();
m_ui.deviceComboBox->addItem(tr("Default"), "default");
- IMMDeviceEnumerator *pEnumerator = 0;
+ IMMDeviceEnumerator *pEnumerator = nullptr;
HRESULT result = CoCreateInstance(CLSID_MMDeviceEnumerator, NULL, CLSCTX_ALL, IID_IMMDeviceEnumerator, (void**)&pEnumerator);
if(result != S_OK)
{
qWarning("SettingsDialog: CoCreateInstance failed, error code = 0x%lx", result);
- pEnumerator = 0;
+ pEnumerator = nullptr;
}
- IMMDeviceCollection *pEndpoints = 0;
- IMMDevice *pEndpoint = 0;
- LPWSTR pwszID = 0;
- IPropertyStore *pProps = 0;
+ IMMDeviceCollection *pEndpoints = nullptr;
+ IMMDevice *pEndpoint = nullptr;
+ LPWSTR pwszID = nullptr;
+ IPropertyStore *pProps = nullptr;
UINT count = 0;
result = pEnumerator->EnumAudioEndpoints(eRender, DEVICE_STATE_ACTIVE, &pEndpoints);
if(result != S_OK)
{
qWarning("SettingsDialog: IMMDeviceEnumerator::EnumAudioEndpoints failed, error code = 0x%lx", result);
- pEndpoints = 0;
+ pEndpoints = nullptr;
}
if(pEndpoints)
@@ -93,7 +93,7 @@ void SettingsDialog::enumDevices()
if(result != S_OK)
{
qWarning("SettingsDialog: IMMDeviceCollection::Item failed, error code = 0x%lx", result);
- pEndpoint = 0;
+ pEndpoint = nullptr;
break;
}
@@ -101,7 +101,7 @@ void SettingsDialog::enumDevices()
if(result != S_OK)
{
qWarning("SettingsDialog: IMMDevice::GetId failed, error code = 0x%lx", result);
- pwszID = 0;
+ pwszID = nullptr;
break;
}
@@ -109,7 +109,7 @@ void SettingsDialog::enumDevices()
if(result != S_OK)
{
qWarning("SettingsDialog: IMMDevice::GetId failed, error code = 0x%lx", result);
- pProps = 0;
+ pProps = nullptr;
break;
}
@@ -126,42 +126,42 @@ void SettingsDialog::enumDevices()
m_ui.deviceComboBox->addItem(QString::fromWCharArray(varName.pwszVal), QString::fromWCharArray(pwszID));
CoTaskMemFree(pwszID);
- pwszID = 0;
+ pwszID = nullptr;
PropVariantClear(&varName);
pProps->Release();
- pProps = 0;
+ pProps = nullptr;
pEndpoint->Release();
- pEndpoint = 0;
+ pEndpoint = nullptr;
}
}
if(pProps)
{
pProps->Release();
- pProps = 0;
+ pProps = nullptr;
}
if(pwszID)
{
CoTaskMemFree(pwszID);
- pwszID = 0;
+ pwszID = nullptr;
}
if(pEndpoint)
{
pEndpoint->Release();
- pEndpoint = 0;
+ pEndpoint = nullptr;
}
if(pEndpoints)
{
pEndpoints->Release();
- pEndpoints = 0;
+ pEndpoints = nullptr;
}
if(pEnumerator)
{
pEnumerator->Release();
- pEnumerator = 0;
+ pEnumerator = nullptr;
}
}