Change clang format line width to 120
This commit is contained in:
parent
2d63375daa
commit
22c858dd59
|
@ -10,7 +10,7 @@ BreakBeforeBraces: Allman
|
|||
BreakBeforeConceptDeclarations: Always
|
||||
BreakBeforeTernaryOperators: true
|
||||
BreakInheritanceList: BeforeColon
|
||||
ColumnLimit: 100
|
||||
ColumnLimit: 120
|
||||
Cpp11BracedListStyle: false
|
||||
EmptyLineBeforeAccessModifier: Never
|
||||
FixNamespaceComments: false
|
||||
|
|
|
@ -28,6 +28,6 @@ class RedNosedReports
|
|||
virtual void processDataLine(const std::string& line) override;
|
||||
virtual void finish() override;
|
||||
private:
|
||||
void checkLastLevel(const Slope sameSlope, const Slope otherSlope,
|
||||
const int delta, const int sign, RedNosedReportData& data);
|
||||
void checkLastLevel(const Slope sameSlope, const Slope otherSlope, const int delta, const int sign,
|
||||
RedNosedReportData& data);
|
||||
};
|
||||
|
|
|
@ -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())
|
||||
{
|
||||
|
|
|
@ -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 } {}
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -24,8 +24,8 @@
|
|||
class TestContext
|
||||
{
|
||||
public:
|
||||
void run(const std::unique_ptr<Solver>&& solver, const long long int expected1,
|
||||
const long long int expected2, const std::vector<std::string>& inputPaths);
|
||||
void run(const std::unique_ptr<Solver>&& solver, const long long int expected1, const long long int expected2,
|
||||
const std::vector<std::string>& inputPaths);
|
||||
std::vector<std::string> getInputPaths() const;
|
||||
std::vector<std::string> getExampleInputPaths() const;
|
||||
};
|
||||
|
|
|
@ -36,6 +36,5 @@ std::vector<std::string> TestContext::getInputPaths() const
|
|||
|
||||
std::vector<std::string> TestContext::getExampleInputPaths() const
|
||||
{
|
||||
return std::vector<std::string>{ "data/examples", "../../../data/examples",
|
||||
"../../../../data/examples" };
|
||||
return std::vector<std::string>{ "data/examples", "../../../data/examples", "../../../../data/examples" };
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue