You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
inline int LowLevelSolver::findIndex(std::vector<Cell> cells, Cell cell) {
// BURADA CELLI KARSILASTIRMADA HATA VAR
auto it = std::find(cells.begin(), cells.end(), cell);
return it != cells.end();
}
Modified code
inline int LowLevelSolver::findIndex(std::vector<Cell> cells, Cell cell) {
// BURADA CELLI KARSILASTIRMADA HATA VAR
auto it = std::find(cells.begin(), cells.end(), cell);
if (cells.size() >= 0) {
std::vector<Cell>::iterator it0 = find(cells.begin(), cells.end(), cells[0]);
std::vector<Cell>::iterator it = find(cells.begin(), cells.end(), cell);
return it - it0;
}
return -1;
The text was updated successfully, but these errors were encountered:
Original code:
Modified code
The text was updated successfully, but these errors were encountered: