diff options
| author | David 'Digit' Turner <digit@google.com> | 2011-10-19 17:54:20 +0200 |
|---|---|---|
| committer | David 'Digit' Turner <digit@google.com> | 2011-10-19 17:54:20 +0200 |
| commit | 0e205e6d6e8a032683597a0a1293925b7b9e462d (patch) | |
| tree | bd0bcb2a7f4c61b2715215ecee329373b3fafbab /tools/emulator/opengl/shared/OpenglCodecCommon/FixedBuffer.h | |
| parent | 207118ad6d68338af0fbf75df29e15cbf5c794d5 (diff) | |
emulator: opengl: minor fix and reformatting
This patches fixes a minor invalid usage of delete (instead of delete[])
and reformats the source code a little to make it more obvious.
Change-Id: If853d12e74549abcc6682430c837b0f14da81fdc
Diffstat (limited to 'tools/emulator/opengl/shared/OpenglCodecCommon/FixedBuffer.h')
| -rw-r--r-- | tools/emulator/opengl/shared/OpenglCodecCommon/FixedBuffer.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/tools/emulator/opengl/shared/OpenglCodecCommon/FixedBuffer.h b/tools/emulator/opengl/shared/OpenglCodecCommon/FixedBuffer.h index 1a18f473f..30b9a80ee 100644 --- a/tools/emulator/opengl/shared/OpenglCodecCommon/FixedBuffer.h +++ b/tools/emulator/opengl/shared/OpenglCodecCommon/FixedBuffer.h @@ -25,18 +25,21 @@ public: } ~FixedBuffer() { - delete m_buffer; + delete [] m_buffer; m_bufferLen = 0; } void * alloc(size_t size) { - if (m_bufferLen >= size) return (void *)(m_buffer); + if (m_bufferLen >= size) + return (void *)(m_buffer); - if (m_buffer != NULL) delete[] m_buffer; + if (m_buffer != NULL) + delete[] m_buffer; m_bufferLen = size; m_buffer = new unsigned char[m_bufferLen]; - if (m_buffer == NULL) m_bufferLen = 0; + if (m_buffer == NULL) + m_bufferLen = 0; return m_buffer; } |
