Fix code messages
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user