testing: errors
[awesomized/libmemcached] / test / lib / Cluster.cpp
index e1375bfde90ed50c65fcb52a3f0cff54c3be35fa..e32f0fc328fd1724e0384553e288090a2d28d676 100644 (file)
@@ -13,7 +13,16 @@ Cluster::Cluster(Server serv, uint16_t cnt)
   if (!count) {
     count = 1;
   }
-  reset();
+  for (int i = 0; i < count; ++i) {
+    cluster.push_back(proto);
+  }
+}
+
+Cluster::Cluster(vector<Server> servers)
+: count{servers.size()}
+, cluster{move(servers)}
+{
+
 }
 
 Cluster::~Cluster() {
@@ -25,14 +34,6 @@ const vector<Server> &Cluster::getServers() const {
   return cluster;
 }
 
-void Cluster::reset() {
-  pids.clear();
-  cluster.clear();
-  for (int i = 0; i < count; ++i) {
-    cluster.push_back(proto);
-  }
-}
-
 bool Cluster::start() {
   bool started = true;