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

@ -18,7 +18,7 @@
namespace DX11
{
static TextureEncoder* g_encoder = NULL;
static TextureEncoder* g_encoder = nullptr;
const size_t MAX_COPY_BUFFERS = 32;
ID3D11Buffer* efbcopycbuf[MAX_COPY_BUFFERS] = { 0 };
@ -43,7 +43,7 @@ bool TextureCache::TCacheEntry::Save(const std::string& filename, unsigned int l
return false;
}
ID3D11Texture2D* pNewTexture = NULL;
ID3D11Texture2D* pNewTexture = nullptr;
ID3D11Texture2D* pSurface = texture->GetTex();
D3D11_TEXTURE2D_DESC desc;
pSurface->GetDesc(&desc);
@ -52,7 +52,7 @@ bool TextureCache::TCacheEntry::Save(const std::string& filename, unsigned int l
desc.CPUAccessFlags = D3D11_CPU_ACCESS_READ | D3D11_CPU_ACCESS_WRITE;
desc.Usage = D3D11_USAGE_STAGING;
HRESULT hr = D3D::device->CreateTexture2D(&desc, NULL, &pNewTexture);
HRESULT hr = D3D::device->CreateTexture2D(&desc, nullptr, &pNewTexture);
bool saved_png = false;
@ -85,7 +85,7 @@ TextureCache::TCacheEntryBase* TextureCache::CreateTexture(unsigned int width,
{
D3D11_USAGE usage = D3D11_USAGE_DEFAULT;
D3D11_CPU_ACCESS_FLAG cpu_access = (D3D11_CPU_ACCESS_FLAG)0;
D3D11_SUBRESOURCE_DATA srdata, *data = NULL;
D3D11_SUBRESOURCE_DATA srdata, *data = nullptr;
if (tex_levels == 1)
{
@ -134,7 +134,7 @@ void TextureCache::TCacheEntry::FromRenderTarget(u32 dstAddr, unsigned int dstFo
D3D::context->RSSetViewports(1, &vp);
// set transformation
if (NULL == efbcopycbuf[cbufid])
if (nullptr == efbcopycbuf[cbufid])
{
const D3D11_BUFFER_DESC cbdesc = CD3D11_BUFFER_DESC(28 * sizeof(float), D3D11_BIND_CONSTANT_BUFFER, D3D11_USAGE_DEFAULT);
D3D11_SUBRESOURCE_DATA data;
@ -155,7 +155,7 @@ void TextureCache::TCacheEntry::FromRenderTarget(u32 dstAddr, unsigned int dstFo
else
D3D::SetPointCopySampler();
D3D::context->OMSetRenderTargets(1, &texture->GetRTV(), NULL);
D3D::context->OMSetRenderTargets(1, &texture->GetRTV(), nullptr);
// Create texture copy
D3D::drawShadedTexQuad(
@ -208,7 +208,7 @@ TextureCache::~TextureCache()
g_encoder->Shutdown();
delete g_encoder;
g_encoder = NULL;
g_encoder = nullptr;
}
}