Fix code messages
This commit is contained in:
parent
01c300dce1
commit
1c860f7e4c
@ -39,7 +39,7 @@ class ReindeerMaze
|
||||
void initializeWorkList(std::list<ReindeerMazeCrossing>& crossings, const int entryVertex);
|
||||
void addCheckedIncidence(std::vector<ReindeerMazePathIncidence>& incidences, const Point2 start,
|
||||
const Point2 direction);
|
||||
Point2 findStart();
|
||||
Point2 findStart() const;
|
||||
void AddPathSegmentEdges(WeightedEdgeGraph& graph, const ReindeerMazePathIncidence& pathIncidence,
|
||||
const std::vector<ReindeerMazePathIncidence>& otherPathIncidences);
|
||||
};
|
||||
|
@ -19,13 +19,13 @@ class MullData
|
||||
{
|
||||
public:
|
||||
MullData();
|
||||
bool getIsEnabled();
|
||||
bool getIsEnabled() const;
|
||||
void setIsEnabled(const bool value);
|
||||
int getFactor(const int index);
|
||||
int getFactor(const int index) const;
|
||||
void setFactor(const int index, const int value);
|
||||
void updateResult();
|
||||
long long int getResultPart1();
|
||||
long long int getResultPart2();
|
||||
long long int getResultPart1() const;
|
||||
long long int getResultPart2() const;
|
||||
private:
|
||||
bool isEnabled_;
|
||||
int factor1_;
|
||||
|
@ -55,11 +55,11 @@ void HoofIt::finish()
|
||||
|
||||
while (!queue.empty())
|
||||
{
|
||||
auto trail = queue.front();
|
||||
const auto& trail = queue.front();
|
||||
queue.pop();
|
||||
if (getCharAt(trail) != getTrailheadChar())
|
||||
{
|
||||
for (auto direction : Point2::cardinalDirections)
|
||||
for (const auto& direction : Point2::cardinalDirections)
|
||||
{
|
||||
Point2 p{ trail + direction };
|
||||
if (isInBounds(p) && getCharAt(p) + 1 == getCharAt(trail))
|
||||
@ -93,7 +93,7 @@ constexpr char HoofIt::getTrailTopChar()
|
||||
|
||||
void HoofIt::addUnique(const std::vector<Point2>& source, std::vector<Point2>& destination)
|
||||
{
|
||||
for (auto end : source)
|
||||
for (const auto& end : source)
|
||||
{
|
||||
auto isUnique{ true };
|
||||
size_t i{ 0 };
|
||||
|
@ -224,7 +224,7 @@ void ReindeerMaze::addCheckedIncidence(std::vector<ReindeerMazePathIncidence>& i
|
||||
}
|
||||
}
|
||||
|
||||
Point2 ReindeerMaze::findStart()
|
||||
Point2 ReindeerMaze::findStart() const
|
||||
{
|
||||
for (int j = 0; j < lines.size(); j++)
|
||||
{
|
||||
|
@ -20,7 +20,7 @@ MullData::MullData()
|
||||
{
|
||||
};
|
||||
|
||||
bool MullData::getIsEnabled()
|
||||
bool MullData::getIsEnabled() const
|
||||
{
|
||||
return isEnabled_;
|
||||
}
|
||||
@ -30,7 +30,7 @@ void MullData::setIsEnabled(const bool value)
|
||||
isEnabled_ = value;
|
||||
}
|
||||
|
||||
int MullData::getFactor(const int index)
|
||||
int MullData::getFactor(const int index) const
|
||||
{
|
||||
return index == 1 ? factor1_ : factor2_;
|
||||
}
|
||||
@ -57,12 +57,12 @@ void MullData::updateResult()
|
||||
}
|
||||
}
|
||||
|
||||
long long int MullData::getResultPart1()
|
||||
long long int MullData::getResultPart1() const
|
||||
{
|
||||
return part1_;
|
||||
}
|
||||
|
||||
long long int MullData::getResultPart2()
|
||||
long long int MullData::getResultPart2() const
|
||||
{
|
||||
return part2_;
|
||||
}
|
||||
|
@ -46,7 +46,7 @@ void SolverEngine::run(Solver& solver)
|
||||
|
||||
std::filesystem::path SolverEngine::tryGetValidFullInputFilePath(const std::string& inputFileName)
|
||||
{
|
||||
for (auto path : inputPaths_)
|
||||
for (const auto& path : inputPaths_)
|
||||
{
|
||||
std::filesystem::path fullFilePath = path;
|
||||
fullFilePath /= inputFileName;
|
||||
|
Loading…
x
Reference in New Issue
Block a user