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. |