src/ringFinder.cpp

changeset 984
a7b6f987d269
parent 968
4b93b7963456
child 985
ed7b31b9f904
equal deleted inserted replaced
983:05ba93066194 984:a7b6f987d269
162 sol.scaleComponents (scale); 162 sol.scaleComponents (scale);
163 } 163 }
164 164
165 // Compare the solutions and find the best one. The solution class has an operator> 165 // Compare the solutions and find the best one. The solution class has an operator>
166 // overload to compare two solutions. 166 // overload to compare two solutions.
167 m_bestSolution = null; 167 m_bestSolution = nullptr;
168 168
169 for (Solution const& sol : m_solutions) 169 for (Solution const& sol : m_solutions)
170 { 170 {
171 if (m_bestSolution == null or sol.isSuperiorTo (m_bestSolution)) 171 if (m_bestSolution == nullptr or sol.isSuperiorTo (m_bestSolution))
172 m_bestSolution = / 172 m_bestSolution = /
173 } 173 }
174 174
175 return (m_bestSolution != null); 175 return (m_bestSolution != nullptr);
176 } 176 }
177 177
178 // 178 //
179 // Compares this solution with @other and determines which 179 // Compares this solution with @other and determines which
180 // one is superior. 180 // one is superior.

mercurial