Removed sz from Cycle (size is kept track of in the parent)
authorDmitriy Morozov <morozov@cs.duke.edu>
Tue, 18 Sep 2007 05:45:04 -0400
changeset 35 a09d42924ece
parent 34 19fb71f2405e
child 36 fd55f095302f
Removed sz from Cycle (size is kept track of in the parent)
include/topology/cycle.hpp
--- a/include/topology/cycle.hpp	Sat Sep 15 14:31:36 2007 -0400
+++ b/include/topology/cycle.hpp	Tue Sep 18 05:45:04 2007 -0400
@@ -23,12 +23,12 @@
 
 template<class I, class OrderCmp, class ConsistencyCmp>
 Cycle<I,OrderCmp,ConsistencyCmp>::
-Cycle(): sz(0)
+Cycle()
 {}
 
 template<class I, class OrderCmp, class ConsistencyCmp>
 Cycle<I,OrderCmp,ConsistencyCmp>::
-Cycle(const Cycle& c): CycleRepresentation(c), sz(c.sz)					
+Cycle(const Cycle& c): CycleRepresentation(c)
 {}
 
 template<class I, class OrderCmp, class ConsistencyCmp>
@@ -71,7 +71,6 @@
 swap(Cycle& c)
 {
 	CycleRepresentation::swap(c);
-	std::swap(sz, c.sz);
 }
 
 template<class I, class OrderCmp, class ConsistencyCmp>
@@ -211,7 +210,6 @@
 		{
 			rLog(rlCycle, "Equality");
 			cur1 = erase(cur1);		// erase cur1 --- as a result cur1 will be pointing at old_cur1++
-			--sz;
 			++cur2;
 		} else if (res < 0)	// *cur1 < *cur2
 		{
@@ -222,7 +220,6 @@
 			rLog(rlCycle, "Greater than");
 			insert(cur1, *cur2);
 			++cur2;
-			++sz;
 		}
 		Count(cCycleAddBasic);
 	}
@@ -255,7 +252,6 @@
 serialize(Archive& ar, version_type )
 {
 	ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP(Parent);
-	ar & make_nvp("size", sz);;
 }