Change clang format line width to 120

This commit is contained in:
2025-01-21 13:54:06 +01:00
parent 2d63375daa
commit 22c858dd59
8 changed files with 15 additions and 21 deletions

View File

@@ -33,8 +33,7 @@ void LanParty::processDataLine(const std::string& line)
void LanParty::finish()
{
auto vertices = lan_.getVertices();
// This works as long as "ta" is present as a computername, otherwise we would have to use
// vertices.find_if().
// This works as long as "ta" is present as a computername, otherwise we would have to use vertices.find_if().
auto iterTx = vertices.find(getFirstTxComputerName());
while (iterTx != vertices.end() && iterTx->second->getId() <= getLastTxComputerName())
{

View File

@@ -23,10 +23,9 @@ const Point2 Point2::upLeft{ -1, -1 };
const Point2 Point2::upRight{ 1, -1 };
const Point2 Point2::downLeft{ -1, 1 };
const Point2 Point2::downRight{ 1, 1 };
const Point2 Point2::directions[] = { Point2::down, Point2::downRight, Point2::right,
Point2::upRight, Point2::up, Point2::upLeft, Point2::left, Point2::downLeft };
const Point2 Point2::cardinalDirections[] = { Point2::down, Point2::right, Point2::up,
Point2::left};
const Point2 Point2::directions[] = { Point2::down, Point2::downRight, Point2::right, Point2::upRight, Point2::up,
Point2::upLeft, Point2::left, Point2::downLeft };
const Point2 Point2::cardinalDirections[] = { Point2::down, Point2::right, Point2::up, Point2::left };
Point2::Point2()
: Point2{ 0, 0 } {}

View File

@@ -29,11 +29,9 @@ const std::string RedNosedReports::getInputFileName() const
return "red-nosed_reports.txt";
}
// 'X' in the comments here and below marks the level that must be ignored to
// make the report safe.
// 'X' in the comments here and below marks the level that must be ignored to make the report safe.
// 'first' means that this series starts at the beginning of the line.
// 'next' means that the level(s) from the next loop iteration(s) will determine
// which level to ignore.
// 'next' means that the level(s) from the next loop iteration(s) will determine which level to ignore.
void RedNosedReports::processDataLine(const std::string& line)
{
RedNosedReportData data{};
@@ -111,8 +109,8 @@ void RedNosedReports::finish()
{
}
void RedNosedReports::checkLastLevel(const Slope sameSlope, const Slope otherSlope,
const int delta, const int sign, RedNosedReportData& data)
void RedNosedReports::checkLastLevel(const Slope sameSlope, const Slope otherSlope, const int delta, const int sign,
RedNosedReportData& data)
{
if (data.slope == sameSlope)
{

View File

@@ -38,8 +38,7 @@ void SolverEngine::run(Solver& solver)
solver.finish();
std::cout << "Part 1: " << solver.getResultPart1()
<< "\nPart 2: " << solver.getResultPart2() << std::endl;
std::cout << "Part 1: " << solver.getResultPart1() << "\nPart 2: " << solver.getResultPart2() << std::endl;
}
}