Kajetan Johannes Hammerle 1 gadu atpakaļ
vecāks
revīzija
2bb6afd961

+ 0 - 1
include/core/data/BitArray.hpp

@@ -45,7 +45,6 @@ namespace Core {
             return s.append("]");
         }
 
-    private:
         void swap(BitArray& other);
     };
 }

+ 0 - 1
include/core/data/LinkedList.hpp

@@ -177,7 +177,6 @@ namespace Core {
             remove(n);
         }
 
-    private:
         void swap(LinkedList& other) {
             Core::swap(first, other.first);
             Core::swap(last, other.last);

+ 6 - 6
include/core/data/List.hpp

@@ -188,6 +188,12 @@ namespace Core {
             return Core::toString(s, *this);
         }
 
+        void swap(List& other) {
+            Core::swap(length, other.length);
+            Core::swap(capacity, other.capacity);
+            Core::swap(data, other.data);
+        }
+
     private:
         static Error allocate(T*& t, int n) {
             if(n <= 0) {
@@ -198,12 +204,6 @@ namespace Core {
             return t == nullptr ? Error::OUT_OF_MEMORY : Error::NONE;
         }
 
-        void swap(List& other) {
-            Core::swap(length, other.length);
-            Core::swap(capacity, other.capacity);
-            Core::swap(data, other.data);
-        }
-
         check_return Error ensureCapacity() {
             return length >= capacity
                        ? reserve(capacity + Core::Math::max(4, capacity / 4))