diff options
Diffstat (limited to 'src/util/pointer.h')
-rw-r--r-- | src/util/pointer.h | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/src/util/pointer.h b/src/util/pointer.h index f018efb20..efca62d2d 100644 --- a/src/util/pointer.h +++ b/src/util/pointer.h @@ -104,7 +104,6 @@ private: /************************************************ * !!! W A R N I N G !!! * - * !!! A C H T U N G !!! * * * * This smart pointer class is NOT thread safe. * * ONLY use in a single-threaded context! * @@ -134,7 +133,6 @@ public: } SharedBuffer(const SharedBuffer &buffer) { - //std::cout<<"SharedBuffer(const SharedBuffer &buffer)"<<std::endl; m_size = buffer.m_size; data = buffer.data; refcount = buffer.refcount; @@ -142,7 +140,6 @@ public: } SharedBuffer & operator=(const SharedBuffer & buffer) { - //std::cout<<"SharedBuffer & operator=(const SharedBuffer & buffer)"<<std::endl; if(this == &buffer) return *this; drop(); @@ -171,19 +168,6 @@ public: /* Copies whole buffer */ - SharedBuffer(const Buffer<T> &buffer) - { - m_size = buffer.getSize(); - if(m_size != 0) - { - data = new T[m_size]; - memcpy(data, *buffer, buffer.getSize()); - } - else - data = NULL; - refcount = new unsigned int; - (*refcount) = 1; - } ~SharedBuffer() { drop(); @@ -220,9 +204,3 @@ private: unsigned int m_size; unsigned int *refcount; }; - -inline SharedBuffer<u8> SharedBufferFromString(const char *string) -{ - SharedBuffer<u8> b((u8*)string, strlen(string)+1); - return b; -} |