--- queensgui/src/containervector.cpp 2007/07/19 23:44:01 4 +++ queensgui/src/containervector.cpp 2007/07/25 19:39:37 15 @@ -19,11 +19,12 @@ ***************************************************************************/ #include "containervector.h" +#include ContainerVector::ContainerVector(GUIUpdate* update) : SolutionContainer(update) { - total = -1; + total = 0; } @@ -59,12 +60,13 @@ if (total == -1) total = solutions.size(); - std::vector buf; + std::vector > buf; for (unsigned int i=0; icopy(); + + std::auto_ptr tmp ( solutions[i]->copy()); if (mirror) tmp->mirror(); for (int k=0;k(tmp->copy()) ); m_uniqueRemoved ++; m_update->duplicateRemoved(); } @@ -91,11 +93,12 @@ void ContainerVector::addSolution(Solution* sol) { - solutions.push_back(sol); + solutions.push_back( boost::shared_ptr(sol) ); + total++; } Solution* ContainerVector::solution(int index) { - return solutions[index] ; + return solutions[index].get() ; }