]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
xlist: implement copy constructor
authorJohn Spray <john.spray@redhat.com>
Wed, 10 Sep 2014 12:21:42 +0000 (13:21 +0100)
committerJohn Spray <john.spray@redhat.com>
Mon, 15 Sep 2014 14:05:14 +0000 (15:05 +0100)
...so that I can have a std::map of them.

Signed-off-by: John Spray <john.spray@redhat.com>
src/include/xlist.h

index 26a6b9d5746c2bb777453f79e56a4b0478ff0183..53aa3ab06fc5195dbd76c0d5636619f5f81b6ef1 100644 (file)
@@ -61,8 +61,11 @@ private:
   int _size;
 
 public:
-  xlist(const xlist& other);
-  const xlist& operator=(const xlist& other);
+  xlist(const xlist& other) {
+    _front = other._front;
+    _back = other._back;
+    _size = other._size;
+  }
 
   xlist() : _front(0), _back(0), _size(0) {}
   ~xlist() {