Fix constructor code formatting

This commit is contained in:
Stefan Müller 2025-01-21 13:56:42 +01:00
parent 22c858dd59
commit ab7aa394dc
8 changed files with 27 additions and 11 deletions

View File

@ -16,7 +16,9 @@
#include <aoc/MullCharState.hpp> #include <aoc/MullCharState.hpp>
MullCharState::MullCharState(const char expected) MullCharState::MullCharState(const char expected)
: expected_{ expected }, successState_{}, failState_{} {} : expected_{ expected }, successState_{}, failState_{}
{
}
void MullCharState::next(StringStateMachine* stateMachine) void MullCharState::next(StringStateMachine* stateMachine)
{ {

View File

@ -16,7 +16,9 @@
#include <aoc/MullData.hpp> #include <aoc/MullData.hpp>
MullData::MullData() MullData::MullData()
: isEnabled_{ true }, factor1_{ 0 }, factor2_{ 0 }, part1_{ 0 }, part2_{ 0 } {}; : isEnabled_{ true }, factor1_{ 0 }, factor2_{ 0 }, part1_{ 0 }, part2_{ 0 }
{
};
bool MullData::getIsEnabled() bool MullData::getIsEnabled()
{ {

View File

@ -16,7 +16,9 @@
#include <aoc/MullFactorState.hpp> #include <aoc/MullFactorState.hpp>
MullFactorState::MullFactorState(const char expected, const int index) MullFactorState::MullFactorState(const char expected, const int index)
: expected_{ expected }, index_{ index }, successState_{}, failState_{} {} : expected_{ expected }, index_{ index }, successState_{}, failState_{}
{
}
void MullFactorState::enter(StringStateMachine* stateMachine) void MullFactorState::enter(StringStateMachine* stateMachine)
{ {

View File

@ -18,9 +18,9 @@
#include <aoc/StringStateMachine.hpp> #include <aoc/StringStateMachine.hpp>
MullItOver::MullItOver() MullItOver::MullItOver()
: Solver{}, data_{}, states_ { : Solver{}, data_{}, states_ { data_ }
data_ {
} {} }
const std::string MullItOver::getPuzzleName() const const std::string MullItOver::getPuzzleName() const
{ {

View File

@ -16,7 +16,9 @@
#include <aoc/MullToggleCloseState.hpp> #include <aoc/MullToggleCloseState.hpp>
MullToggleCloseState::MullToggleCloseState(const bool isEnabler) MullToggleCloseState::MullToggleCloseState(const bool isEnabler)
: isEnabler_{ isEnabler }, successState_{} {} : isEnabler_{ isEnabler }, successState_{}
{
}
void MullToggleCloseState::next(StringStateMachine* stateMachine) void MullToggleCloseState::next(StringStateMachine* stateMachine)
{ {

View File

@ -28,10 +28,14 @@ const Point2 Point2::directions[] = { Point2::down, Point2::downRight, Point2::r
const Point2 Point2::cardinalDirections[] = { Point2::down, Point2::right, Point2::up, Point2::left }; const Point2 Point2::cardinalDirections[] = { Point2::down, Point2::right, Point2::up, Point2::left };
Point2::Point2() Point2::Point2()
: Point2{ 0, 0 } {} : Point2{ 0, 0 }
{
}
Point2::Point2(const int x, const int y) Point2::Point2(const int x, const int y)
: x{ x }, y{ y } {} : x{ x }, y{ y }
{
}
bool Point2::operator==(const Point2& rhs) const bool Point2::operator==(const Point2& rhs) const
{ {

View File

@ -16,7 +16,9 @@
#include <aoc/Solver.hpp> #include <aoc/Solver.hpp>
Solver::Solver() Solver::Solver()
: part1{ 0 }, part2{ 0 } {} : part1{ 0 }, part2{ 0 }
{
}
long long int Solver::getResultPart1() const long long int Solver::getResultPart1() const
{ {

View File

@ -19,7 +19,9 @@
#include <iostream> #include <iostream>
SolverEngine::SolverEngine(const std::vector<std::string>& inputPaths) SolverEngine::SolverEngine(const std::vector<std::string>& inputPaths)
: inputPaths_{ inputPaths } {} : inputPaths_{ inputPaths }
{
}
void SolverEngine::run(Solver& solver) void SolverEngine::run(Solver& solver)
{ {