summaryrefslogtreecommitdiff
path: root/Source/Core/VideoBackends
diff options
context:
space:
mode:
authorget <45425365+Minty-Meeo@users.noreply.github.com>2023-04-14 23:55:53 -0500
committerget <45425365+Minty-Meeo@users.noreply.github.com>2023-04-15 16:07:05 -0500
commita5d06fde4b597d93750ba29bc2db83401fe431f7 (patch)
tree7d79d61f9b7cd76c9d600cd4c8ecca11875f4a32 /Source/Core/VideoBackends
parentae18aa0639bdf2d51c8bf738bd7f794d89aa22e4 (diff)
Embrace nullptr over NULL and 0
Diffstat (limited to 'Source/Core/VideoBackends')
-rw-r--r--Source/Core/VideoBackends/D3D12/DX12Context.cpp2
-rw-r--r--Source/Core/VideoBackends/OGL/OGLTexture.cpp10
-rw-r--r--Source/Core/VideoBackends/OGL/OGLTexture.h2
3 files changed, 7 insertions, 7 deletions
diff --git a/Source/Core/VideoBackends/D3D12/DX12Context.cpp b/Source/Core/VideoBackends/D3D12/DX12Context.cpp
index 8343e39a6e..19a13f64b4 100644
--- a/Source/Core/VideoBackends/D3D12/DX12Context.cpp
+++ b/Source/Core/VideoBackends/D3D12/DX12Context.cpp
@@ -221,7 +221,7 @@ bool DXContext::CreateFence()
return false;
m_fence_event = CreateEvent(nullptr, FALSE, FALSE, nullptr);
- ASSERT_MSG(VIDEO, m_fence_event != NULL, "Failed to create fence event");
+ ASSERT_MSG(VIDEO, m_fence_event != nullptr, "Failed to create fence event");
if (!m_fence_event)
return false;
diff --git a/Source/Core/VideoBackends/OGL/OGLTexture.cpp b/Source/Core/VideoBackends/OGL/OGLTexture.cpp
index ad0e32bb39..4e90211c59 100644
--- a/Source/Core/VideoBackends/OGL/OGLTexture.cpp
+++ b/Source/Core/VideoBackends/OGL/OGLTexture.cpp
@@ -296,7 +296,7 @@ OGLStagingTexture::OGLStagingTexture(StagingTextureType type, const TextureConfi
OGLStagingTexture::~OGLStagingTexture()
{
- if (m_fence != 0)
+ if (m_fence != nullptr)
glDeleteSync(m_fence);
if (m_map_pointer)
{
@@ -418,7 +418,7 @@ void OGLStagingTexture::CopyFromTexture(const AbstractTexture* src,
// If we support buffer storage, create a fence for synchronization.
if (UsePersistentStagingBuffers())
{
- if (m_fence != 0)
+ if (m_fence != nullptr)
glDeleteSync(m_fence);
glMemoryBarrier(GL_CLIENT_MAPPED_BUFFER_BARRIER_BIT);
@@ -479,7 +479,7 @@ void OGLStagingTexture::CopyToTexture(const MathUtil::Rectangle<int>& src_rect,
// If we support buffer storage, create a fence for synchronization.
if (UsePersistentStagingBuffers())
{
- if (m_fence != 0)
+ if (m_fence != nullptr)
glDeleteSync(m_fence);
m_fence = glFenceSync(GL_SYNC_GPU_COMMANDS_COMPLETE, 0);
@@ -493,7 +493,7 @@ void OGLStagingTexture::Flush()
{
// No-op when not using buffer storage, as the transfers happen on Map().
// m_fence will always be zero in this case.
- if (m_fence == 0)
+ if (m_fence == nullptr)
{
m_needs_flush = false;
return;
@@ -501,7 +501,7 @@ void OGLStagingTexture::Flush()
glClientWaitSync(m_fence, 0, GL_TIMEOUT_IGNORED);
glDeleteSync(m_fence);
- m_fence = 0;
+ m_fence = nullptr;
m_needs_flush = false;
}
diff --git a/Source/Core/VideoBackends/OGL/OGLTexture.h b/Source/Core/VideoBackends/OGL/OGLTexture.h
index 9d1c119505..f80aa98725 100644
--- a/Source/Core/VideoBackends/OGL/OGLTexture.h
+++ b/Source/Core/VideoBackends/OGL/OGLTexture.h
@@ -75,7 +75,7 @@ private:
GLenum m_target;
GLuint m_buffer_name;
size_t m_buffer_size;
- GLsync m_fence = 0;
+ GLsync m_fence = nullptr;
};
class OGLFramebuffer final : public AbstractFramebuffer