clang-modernize -use-nullptr

and s/\bNULL\b/nullptr/g for *.cpp/h/mm files not compiled on my machine
This commit is contained in:
Tillmann Karras
2014-03-09 21:14:26 +01:00
parent f28116b7da
commit d802d39281
292 changed files with 1526 additions and 1526 deletions

View File

@ -102,7 +102,7 @@ bool ForceFeedbackDevice::InitForceFeedback(const LPDIRECTINPUTDEVICE8 device, i
}
LPDIRECTINPUTEFFECT pEffect;
if (SUCCEEDED(device->CreateEffect(f.guid, &eff, &pEffect, NULL)))
if (SUCCEEDED(device->CreateEffect(f.guid, &eff, &pEffect, nullptr)))
{
m_state_out.push_back(EffectState(pEffect));
@ -155,7 +155,7 @@ bool ForceFeedbackDevice::UpdateOutput()
ok_count += SUCCEEDED(state.iface->Stop());
}
state.params = NULL;
state.params = nullptr;
}
else
{

View File

@ -29,7 +29,7 @@ class ForceFeedbackDevice : public Core::Device
private:
struct EffectState
{
EffectState(LPDIRECTINPUTEFFECT eff) : iface(eff), params(NULL), size(0) {}
EffectState(LPDIRECTINPUTEFFECT eff) : iface(eff), params(nullptr), size(0) {}
LPDIRECTINPUTEFFECT iface;
void* params; // null when force hasn't changed

View File

@ -72,11 +72,11 @@ public:
HRESULT QueryInterface(REFIID iid, LPVOID *ppv)
{
*ppv = NULL;
*ppv = nullptr;
if (CFEqual(&iid, IUnknownUUID))
*ppv = this;
if (NULL == *ppv)
if (nullptr == *ppv)
return E_NOINTERFACE;
((IUnknown*)*ppv)->AddRef();