mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-06-11 16:49:28 +02:00
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:
@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user