diff options
author | Underground78 <underground78@users.sourceforge.net> | 2013-05-07 23:51:09 +0400 |
---|---|---|
committer | Underground78 <underground78@users.sourceforge.net> | 2013-05-09 16:57:30 +0400 |
commit | 2acb3c5749326e59f6f2c6f48692a32dc7e705f5 (patch) | |
tree | 4b6985d401ea648b1562c3b4a6bb868e61c5105d /src/filters/source/ShoutcastSource | |
parent | ae3db48090dc9837fbb439503075521e356dcfa7 (diff) |
Use nullptr instead of NULL whenever possible.
Microsoft recommends to avoid using NULL or zero (0) as a null pointer constant since nullptr is less vulnerable to misuse and works better in most situations.
Also fix some cases where NULL was used instead of 0 or FALSE.
Diffstat (limited to 'src/filters/source/ShoutcastSource')
-rw-r--r-- | src/filters/source/ShoutcastSource/ShoutcastSource.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/filters/source/ShoutcastSource/ShoutcastSource.cpp b/src/filters/source/ShoutcastSource/ShoutcastSource.cpp index cb643cd69..322667c6b 100644 --- a/src/filters/source/ShoutcastSource/ShoutcastSource.cpp +++ b/src/filters/source/ShoutcastSource/ShoutcastSource.cpp @@ -84,7 +84,7 @@ const AMOVIESETUP_MEDIATYPE sudPinTypesOut[] = { };
const AMOVIESETUP_PIN sudOpPin[] = {
- {L"Output", FALSE, TRUE, FALSE, FALSE, &CLSID_NULL, NULL, _countof(sudPinTypesOut), sudPinTypesOut}
+ {L"Output", FALSE, TRUE, FALSE, FALSE, &CLSID_NULL, nullptr, _countof(sudPinTypesOut), sudPinTypesOut}
};
const AMOVIESETUP_FILTER sudFilter[] = {
@@ -92,7 +92,7 @@ const AMOVIESETUP_FILTER sudFilter[] = { };
CFactoryTemplate g_Templates[] = {
- {sudFilter[0].strName, sudFilter[0].clsID, CreateInstance<CShoutcastSource>, NULL, &sudFilter[0]}
+ {sudFilter[0].strName, sudFilter[0].clsID, CreateInstance<CShoutcastSource>, nullptr, &sudFilter[0]}
};
int g_cTemplates = _countof(g_Templates);
@@ -117,13 +117,13 @@ public: return FALSE;
}
/*
- if (!AfxWinInit(::GetModuleHandle(NULL), NULL, ::GetCommandLine(), 0))
+ if (!AfxWinInit(::GetModuleHandle(nullptr), nullptr, ::GetCommandLine(), 0))
{
AfxMessageBox(_T("AfxWinInit failed!"));
return FALSE;
}
*/
- if (!AfxSocketInit(NULL)) {
+ if (!AfxSocketInit(nullptr)) {
AfxMessageBox(_T("AfxSocketInit failed!"));
return FALSE;
}
@@ -260,8 +260,8 @@ STDMETHODIMP CShoutcastSource::QueryFilterInfo(FILTER_INFO* pInfo) CShoutcastStream::CShoutcastStream(const WCHAR* wfn, CShoutcastSource* pParent, HRESULT* phr)
: CSourceStream(NAME("ShoutcastStream"), phr, pParent, L"Output")
, m_fBuffering(false)
- , m_hSocketThread(NULL)
- , fExitThread(NULL)
+ , m_hSocketThread(nullptr)
+ , fExitThread(nullptr)
{
ASSERT(phr);
@@ -352,7 +352,7 @@ HRESULT CShoutcastStream::DecideBufferSize(IMemAllocator* pAlloc, ALLOCATOR_PROP HRESULT CShoutcastStream::FillBuffer(IMediaSample* pSample)
{
- BYTE* pData = NULL;
+ BYTE* pData = nullptr;
if (FAILED(pSample->GetPointer(&pData)) || !pData) {
return S_FALSE;
}
|