Commit 1422b1b2 authored by cutealien's avatar cutealien

Remove more unnecessary pointer-checks before delete (thx again @M. Elfring)


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5174 dfc29bdd-3216-0410-991c-e03cc46cb475
parent 4dec19c4
...@@ -61,8 +61,7 @@ void CDepthBuffer::setSize(const core::dimension2d<u32>& size) ...@@ -61,8 +61,7 @@ void CDepthBuffer::setSize(const core::dimension2d<u32>& size)
Size = size; Size = size;
if (Buffer) delete [] Buffer;
delete [] Buffer;
Pitch = size.Width * sizeof ( fp24 ); Pitch = size.Width * sizeof ( fp24 );
TotalSize = Pitch * size.Height; TotalSize = Pitch * size.Height;
...@@ -96,8 +95,7 @@ CStencilBuffer::CStencilBuffer(const core::dimension2d<u32>& size) ...@@ -96,8 +95,7 @@ CStencilBuffer::CStencilBuffer(const core::dimension2d<u32>& size)
//! destructor //! destructor
CStencilBuffer::~CStencilBuffer() CStencilBuffer::~CStencilBuffer()
{ {
if (Buffer) delete [] Buffer;
delete [] Buffer;
} }
...@@ -118,8 +116,7 @@ void CStencilBuffer::setSize(const core::dimension2d<u32>& size) ...@@ -118,8 +116,7 @@ void CStencilBuffer::setSize(const core::dimension2d<u32>& size)
Size = size; Size = size;
if (Buffer) delete [] Buffer;
delete [] Buffer;
Pitch = size.Width * sizeof ( u32 ); Pitch = size.Width * sizeof ( u32 );
TotalSize = Pitch * size.Height; TotalSize = Pitch * size.Height;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment