/[projects]/queensgui/src/solutionlist.cpp
ViewVC logotype

Diff of /queensgui/src/solutionlist.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1 by torben, Thu Jul 19 21:34:15 2007 UTC revision 2 by torben, Thu Jul 19 22:26:42 2007 UTC
# Line 64  void SolutionList::uniqueSolutionsWorker Line 64  void SolutionList::uniqueSolutionsWorker
64                  if (m_halt)                  if (m_halt)
65                          return;                          return;
66                  match_count = 0;                  match_count = 0;
67                  Solution tmp(*i);                  Solution* tmp = (*i)->copy();
68                  if (mirror)                  if (mirror)
69                          tmp.mirror();                          tmp->mirror();
70                  for (int k=0;k<rot;k++)                  for (int k=0;k<rot;k++)
71                          tmp.rotate90();                          tmp->rotate90();
72    
73                  //unders�g kun resten af m�ngden, start ved i+1                              //unders�g kun resten af m�ngden, start ved i+1            
74                  ListIt j =i;                  ListIt j =i;
75                  j++;                  j++;
76                  for ( ; j!=solutions.end();j++)                  for ( ; j!=solutions.end();j++)
77                  {                  {
78                          if ( tmp == (*j) )                          if ( *tmp == *(*j) )
79                          {                          {
80                                  solutions.erase(j);                                  solutions.erase(j);
81                                  m_uniqueRemoved++;                                  m_uniqueRemoved++;
# Line 87  void SolutionList::uniqueSolutionsWorker Line 87  void SolutionList::uniqueSolutionsWorker
87  }  }
88    
89    
90  void SolutionList::addSolution(Solution sol)  void SolutionList::addSolution(Solution* sol)
91  {  {
92      solutions.push_back(sol);        solutions.push_back(sol);  
93  }  }
94    
95  Solution SolutionList::solution(int index)  Solution* SolutionList::solution(int index)
96  {  {
97      int count=0;      int count=0;
98          ListIt it;          ListIt it;

Legend:
Removed from v.1  
changed lines
  Added in v.2

  ViewVC Help
Powered by ViewVC 1.1.20