diff options
| author | Admiral H. Curtiss <pikachu025@gmail.com> | 2023-04-18 22:14:11 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-04-18 22:14:11 +0200 |
| commit | 2e7f0d002e1a57b9a2477e6f907e85538efb07b2 (patch) | |
| tree | 5f60010291eff9ed9c35c8350ce5bb4b55422a56 /Source/Core/VideoBackends/OGL/OGLTexture.cpp | |
| parent | 8a355dbbd7a37629c5844461bf1796a86f1510f6 (diff) | |
| parent | a5d06fde4b597d93750ba29bc2db83401fe431f7 (diff) | |
Merge pull request #11760 from Minty-Meeo/embracing-nullptr
Embrace nullptr over NULL and 0
Diffstat (limited to 'Source/Core/VideoBackends/OGL/OGLTexture.cpp')
| -rw-r--r-- | Source/Core/VideoBackends/OGL/OGLTexture.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
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; } |
