diff options
Diffstat (limited to '3rdparty/lzma/CPP/Common/DynamicBuffer.h')
-rw-r--r-- | 3rdparty/lzma/CPP/Common/DynamicBuffer.h | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/3rdparty/lzma/CPP/Common/DynamicBuffer.h b/3rdparty/lzma/CPP/Common/DynamicBuffer.h index 44e3df7fd4a..714be4a7e03 100644 --- a/3rdparty/lzma/CPP/Common/DynamicBuffer.h +++ b/3rdparty/lzma/CPP/Common/DynamicBuffer.h @@ -1,7 +1,11 @@ // Common/DynamicBuffer.h -#ifndef __COMMON_DYNAMIC_BUFFER_H -#define __COMMON_DYNAMIC_BUFFER_H +#ifndef ZIP7_INC_COMMON_DYNAMIC_BUFFER_H +#define ZIP7_INC_COMMON_DYNAMIC_BUFFER_H + +#include <string.h> + +#include "Common.h" template <class T> class CDynamicBuffer { @@ -34,7 +38,7 @@ template <class T> class CDynamicBuffer } public: - CDynamicBuffer(): _items(0), _size(0), _pos(0) {} + CDynamicBuffer(): _items(NULL), _size(0), _pos(0) {} // operator T *() { return _items; } operator const T *() const { return _items; } ~CDynamicBuffer() { delete []_items; } @@ -54,7 +58,7 @@ public: memcpy(GetCurPtrAndGrow(size), data, size * sizeof(T)); } - const size_t GetPos() const { return _pos; } + size_t GetPos() const { return _pos; } // void Empty() { _pos = 0; } }; |