Reduce unnecessary vector alloc/free
[satune.git] / src / Collections / cppvector.h
index e9164df61bdbe6426fb53093fd0016bae922e82f..2d4cc1956df10579e362966c84371f4f34d5c63f 100644 (file)
@@ -24,7 +24,7 @@ public:
                size--;
        }
 
-       type last() {
+       type last() const {
                return array[size - 1];
        }
 
@@ -49,7 +49,7 @@ public:
                array[size++] = item;
        }
 
-       type get(uint index) {
+       type get(uint index) const {
                return array[index];
        }
 
@@ -63,7 +63,7 @@ public:
                array[index] = item;
        }
 
-       uint getSize() {
+       uint getSize() const {
                return size;
        }