summaryrefslogtreecommitdiff
path: root/vcl/opengl/texture.cxx
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-11-10 10:28:29 +0100
committerStephan Bergmann <sbergman@redhat.com>2015-11-10 10:32:00 +0100
commitd3b6cb7ec2da4afb5687c9d28b2be2f96e6aa7b1 (patch)
treee9d209d6d5f06cacd8e0df78c7f6b8ad45d74be5 /vcl/opengl/texture.cxx
parent45979047abbd9da7a29401f298e8ef9ab58ad337 (diff)
loplugin:nullptr (automatic rewrite)
Change-Id: I05e89f9896170d4df3d1377549ea074f06b884a0
Diffstat (limited to 'vcl/opengl/texture.cxx')
-rw-r--r--vcl/opengl/texture.cxx12
1 files changed, 6 insertions, 6 deletions
diff --git a/vcl/opengl/texture.cxx b/vcl/opengl/texture.cxx
index c0373cc46a5a..909532682b7e 100644
--- a/vcl/opengl/texture.cxx
+++ b/vcl/opengl/texture.cxx
@@ -44,7 +44,7 @@ ImplOpenGLTexture::ImplOpenGLTexture( int nWidth, int nHeight, bool bAllocate )
glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST );
glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST );
if( bAllocate )
- glTexImage2D( GL_TEXTURE_2D, 0, GL_RGBA, nWidth, nHeight, 0, GL_RGBA, GL_UNSIGNED_BYTE, NULL );
+ glTexImage2D( GL_TEXTURE_2D, 0, GL_RGBA, nWidth, nHeight, 0, GL_RGBA, GL_UNSIGNED_BYTE, nullptr );
glBindTexture( GL_TEXTURE_2D, 0 );
VCL_GL_INFO( "vcl.opengl", "OpenGLTexture " << mnTexture << " " << nWidth << "x" << nHeight << " allocate" );
@@ -165,7 +165,7 @@ int ImplOpenGLTexture::FindFreeSlot()
OpenGLTexture::OpenGLTexture() :
maRect( 0, 0, 0, 0 ),
- mpImpl(NULL),
+ mpImpl(nullptr),
mnSlotNumber(-1)
{
}
@@ -234,7 +234,7 @@ OpenGLTexture::~OpenGLTexture()
bool OpenGLTexture::IsUnique() const
{
- return ( mpImpl == NULL || mpImpl->mnRefCount == 1 );
+ return ( mpImpl == nullptr || mpImpl->mnRefCount == 1 );
}
GLuint OpenGLTexture::Id() const
@@ -258,7 +258,7 @@ void OpenGLTexture::GetCoord( GLfloat* pCoord, const SalTwoRect& rPosAry, bool b
{
VCL_GL_INFO( "vcl.opengl", "Getting coord " << Id() << " [" << maRect.Left() << "," << maRect.Top() << "] " << GetWidth() << "x" << GetHeight() );
- if( mpImpl == NULL )
+ if( mpImpl == nullptr )
{
pCoord[0] = pCoord[1] = pCoord[2] = pCoord[3] = 0.0f;
pCoord[4] = pCoord[5] = pCoord[6] = pCoord[7] = 0.0f;
@@ -355,7 +355,7 @@ void OpenGLTexture::SaveToFile(const OUString& rFileName)
void OpenGLTexture::Read( GLenum nFormat, GLenum nType, sal_uInt8* pData )
{
- if( mpImpl == NULL )
+ if( mpImpl == nullptr )
{
SAL_WARN( "vcl.opengl", "Can't read invalid texture" );
return;
@@ -392,7 +392,7 @@ void OpenGLTexture::Read( GLenum nFormat, GLenum nType, sal_uInt8* pData )
OpenGLTexture::operator bool() const
{
- return ( mpImpl != NULL );
+ return ( mpImpl != nullptr );
}
OpenGLTexture& OpenGLTexture::operator=( const OpenGLTexture& rTexture )