]> jfr.im git - irc/gunnarbeutner/shroudbnc.git/commitdiff
Remove dead code.
authorGunnar Beutner <redacted>
Thu, 6 Feb 2014 19:27:33 +0000 (20:27 +0100)
committerGunnar Beutner <redacted>
Fri, 7 Feb 2014 12:27:22 +0000 (13:27 +0100)
src/Vector.h

index 58c6b34609fae36b4333993b991c6c23ed53a2f6..b56c128ad04974625b01a3f9fd8a9944d4361850 100644 (file)
@@ -21,7 +21,6 @@
 #define VECTOR_H
 
 typedef enum vector_error_e {
-       Vector_ReadOnly,
        Vector_PreAllocated,
        Vector_ItemNotFound
 } vector_error_t;
@@ -34,7 +33,6 @@ typedef enum vector_error_e {
 template <typename Type>
 class CVector {
 private:
-       bool m_ReadOnly; /**< indicates whether the list is read-only */
        mutable Type *m_List; /**< the actual list */
        int m_Count; /**< the number of items in the list */
        int m_AllocCount; /**< the number of allocated items */
@@ -50,7 +48,6 @@ public:
                m_List = NULL;
                m_Count = 0;
                m_AllocCount = 0;
-               m_ReadOnly = false;
        }
 
        /**
@@ -97,10 +94,6 @@ public:
        RESULT<bool> Insert(Type Item) {
                Type *NewList;
 
-               if (m_ReadOnly) {
-                       THROW(bool, Vector_ReadOnly, "Vector is read-only.");
-               }
-
                if (m_AllocCount == 0) {
                        NewList = (Type *)realloc(m_List, sizeof(Type) * ++m_Count);
 
@@ -134,10 +127,6 @@ public:
        RESULT<bool> Remove(int Index) {
                Type *NewList;
 
-               if (m_ReadOnly) {
-                       THROW(bool, Vector_ReadOnly, "Vector is read-only.");
-               }
-
                if (m_AllocCount != 0) {
                        THROW(bool, Vector_PreAllocated, "Vector is pre-allocated.");
                }
@@ -236,7 +225,6 @@ public:
 
                memcpy(m_List, List, sizeof(Type) * Count);
                m_Count = Count;
-               m_ReadOnly = false;
 
                RETURN(bool, true);
        }