diff --git a/src/LinesSolver.cpp b/src/LinesSolver.cpp index 967d701..1963b51 100644 --- a/src/LinesSolver.cpp +++ b/src/LinesSolver.cpp @@ -22,8 +22,8 @@ void LinesSolver::processDataLine(const std::string& line) bool LinesSolver::isInBounds(const Point2& point) const { - return 0 <= point.y && point.y < lines.size() - && 0 <= point.x && point.x < lines[point.y].size(); + return 0 <= point.y && point.y < lines.size() && + 0 <= point.x && point.x < lines[point.y].size(); } char LinesSolver::getPosition(const Point2& point) const diff --git a/src/RedNosedReports.cpp b/src/RedNosedReports.cpp index e63988b..9eb2f73 100644 --- a/src/RedNosedReports.cpp +++ b/src/RedNosedReports.cpp @@ -149,9 +149,9 @@ void RedNosedReports::checkLastLevel(const Slope sameSlope, const Slope otherSlo } if (data.mustAwaitFourLevels) { - if (delta <= 3 - && ((0 < sign * (data.levels[2] - data.levels[0]) && sign * (data.levels[2] - data.levels[0]) <= 3) - || (0 < sign * (data.levels[2] - data.levels[1]) && sign * (data.levels[2] - data.levels[1]) <= 3))) + if (delta <= 3 && + ((0 < sign * (data.levels[2] - data.levels[0]) && sign * (data.levels[2] - data.levels[0]) <= 3) || + (0 < sign * (data.levels[2] - data.levels[1]) && sign * (data.levels[2] - data.levels[1]) <= 3))) { // X X X X // first 1 5 3 4 first 8 4 6 5