Remove Solver::getPuzzleTitle() again and do it directly in SolverEngine::run()

This commit is contained in:
Stefan Müller 2025-02-14 18:24:45 +01:00
parent 979961d60e
commit 26f40147d2
3 changed files with 1 additions and 9 deletions

View File

@ -22,7 +22,6 @@ class Solver
public:
Solver(const int inputFileNameSuffix = 0);
virtual ~Solver(){};
const std::string getPuzzleTitle() const;
const std::string getInputFileName() const;
virtual const std::string getPuzzleName() const = 0;
virtual const int getPuzzleDay() const = 0;

View File

@ -22,13 +22,6 @@ Solver::Solver(const int inputFileNameSuffix)
{
}
const std::string Solver::getPuzzleTitle() const
{
std::ostringstream oss;
oss << "Day " << getPuzzleDay() << ": " << getPuzzleName();
return oss.str();
}
const std::string Solver::getInputFileName() const
{
std::ostringstream oss;

View File

@ -25,7 +25,7 @@ SolverEngine::SolverEngine(const std::vector<std::string>& inputPaths)
void SolverEngine::run(Solver& solver)
{
std::cout << "\n--- " << solver.getPuzzleTitle() << " ---\n";
std::cout << "\n--- Day " << solver.getPuzzleDay() << ": " << solver.getPuzzleName() << " ---\n";
auto fullFilePath = tryGetValidFullInputFilePath(solver.getInputFileName());
if (fullFilePath != "")