diff --git a/include/aoc/CeresSearch.hpp b/include/aoc/CeresSearch.hpp index ab76933..36aa78c 100644 --- a/include/aoc/CeresSearch.hpp +++ b/include/aoc/CeresSearch.hpp @@ -23,11 +23,11 @@ class CeresSearch : public LinesSolver { public: - std::string getPuzzleName() const override; - std::string getInputFileName() const override; + const std::string getPuzzleName() const override; + const std::string getInputFileName() const override; void finish() override; private: - char xmas_[4] = { 'X', 'M', 'A', 'S' }; + const char xmas_[4] = { 'X', 'M', 'A', 'S' }; void computeXmasCount(const Point2& start); void computeX_MasCount(const Point2& start); }; diff --git a/include/aoc/GuardGallivant.hpp b/include/aoc/GuardGallivant.hpp index 8d1dca0..ccf3b8d 100644 --- a/include/aoc/GuardGallivant.hpp +++ b/include/aoc/GuardGallivant.hpp @@ -21,8 +21,8 @@ class GuardGallivant : public LinesSolver { public: - std::string getPuzzleName() const override; - std::string getInputFileName() const override; + const std::string getPuzzleName() const override; + const std::string getInputFileName() const override; void processDataLine(const std::string& line) override; void finish() override; private: @@ -30,7 +30,7 @@ class GuardGallivant void visitPosition(const Point2& current); size_t turnDirection(const size_t current) const; size_t getStartDirectionIndex() const; - char getStartChar() const; - char getVisitedChar() const; - char getObstructionChar() const; + const char getStartChar() const; + const char getVisitedChar() const; + const char getObstructionChar() const; }; diff --git a/include/aoc/HistorianHysteria.hpp b/include/aoc/HistorianHysteria.hpp index ecaef7d..57e500b 100644 --- a/include/aoc/HistorianHysteria.hpp +++ b/include/aoc/HistorianHysteria.hpp @@ -23,8 +23,8 @@ class HistorianHysteria : public Solver { public: - virtual std::string getPuzzleName() const override; - virtual std::string getInputFileName() const override; + virtual const std::string getPuzzleName() const override; + virtual const std::string getInputFileName() const override; virtual void processDataLine(const std::string& line) override; virtual void finish() override; private: diff --git a/include/aoc/HoofIt.hpp b/include/aoc/HoofIt.hpp index ba4b7ad..5a35e64 100644 --- a/include/aoc/HoofIt.hpp +++ b/include/aoc/HoofIt.hpp @@ -24,11 +24,11 @@ class HoofIt : public LinesSolver { public: - std::string getPuzzleName() const override; - std::string getInputFileName() const override; + const std::string getPuzzleName() const override; + const std::string getInputFileName() const override; void finish() override; private: - char getTrailheadChar() const; - char getTrailTopChar() const; + const char getTrailheadChar() const; + const char getTrailTopChar() const; void addUnique(const std::vector& source, std::vector& destination); }; diff --git a/include/aoc/LanParty.hpp b/include/aoc/LanParty.hpp index c06213f..9e5e1b8 100644 --- a/include/aoc/LanParty.hpp +++ b/include/aoc/LanParty.hpp @@ -21,8 +21,8 @@ class LanParty : public Solver { public: - std::string getPuzzleName() const override; - std::string getInputFileName() const override; + const std::string getPuzzleName() const override; + const std::string getInputFileName() const override; void processDataLine(const std::string& line) override; void finish() override; private: diff --git a/include/aoc/MullItOver.hpp b/include/aoc/MullItOver.hpp index 9a26c64..9e69f7a 100644 --- a/include/aoc/MullItOver.hpp +++ b/include/aoc/MullItOver.hpp @@ -24,8 +24,8 @@ class MullItOver { public: MullItOver(); - std::string getPuzzleName() const override; - std::string getInputFileName() const override; + const std::string getPuzzleName() const override; + const std::string getInputFileName() const override; void processDataLine(const std::string& line) override; void finish() override; private: diff --git a/include/aoc/PrintQueue.hpp b/include/aoc/PrintQueue.hpp index f4ddeef..d98c78e 100644 --- a/include/aoc/PrintQueue.hpp +++ b/include/aoc/PrintQueue.hpp @@ -22,8 +22,8 @@ class PrintQueue { public: PrintQueue(); - std::string getPuzzleName() const override; - std::string getInputFileName() const override; + const std::string getPuzzleName() const override; + const std::string getInputFileName() const override; void processDataLine(const std::string& line) override; void finish() override; private: diff --git a/include/aoc/RedNosedReports.hpp b/include/aoc/RedNosedReports.hpp index d3f145f..3ab4caa 100644 --- a/include/aoc/RedNosedReports.hpp +++ b/include/aoc/RedNosedReports.hpp @@ -23,8 +23,8 @@ class RedNosedReports : public Solver { public: - std::string getPuzzleName() const override; - std::string getInputFileName() const override; + const std::string getPuzzleName() const override; + const std::string getInputFileName() const override; void processDataLine(const std::string& line) override; void finish() override; private: diff --git a/include/aoc/Solver.hpp b/include/aoc/Solver.hpp index 78dc3d6..3ef06ba 100644 --- a/include/aoc/Solver.hpp +++ b/include/aoc/Solver.hpp @@ -22,8 +22,8 @@ class Solver public: Solver(); virtual ~Solver(){}; - virtual std::string getPuzzleName() const = 0; - virtual std::string getInputFileName() const = 0; + virtual const std::string getPuzzleName() const = 0; + virtual const std::string getInputFileName() const = 0; virtual void processDataLine(const std::string &line) = 0; virtual void finish() = 0; long long int getResultPart1() const; diff --git a/src/CeresSearch.cpp b/src/CeresSearch.cpp index 7ec8d24..4ff6006 100644 --- a/src/CeresSearch.cpp +++ b/src/CeresSearch.cpp @@ -15,12 +15,12 @@ #include -std::string CeresSearch::getPuzzleName() const +const std::string CeresSearch::getPuzzleName() const { return "Day 4: Ceres Search"; } -std::string CeresSearch::getInputFileName() const +const std::string CeresSearch::getInputFileName() const { return "ceres_search.txt"; } diff --git a/src/GuardGallivant.cpp b/src/GuardGallivant.cpp index d0a784d..c6c1a7e 100644 --- a/src/GuardGallivant.cpp +++ b/src/GuardGallivant.cpp @@ -15,12 +15,12 @@ #include -std::string GuardGallivant::getPuzzleName() const +const std::string GuardGallivant::getPuzzleName() const { return "Day 6: Guard Gallivant"; } -std::string GuardGallivant::getInputFileName() const +const std::string GuardGallivant::getInputFileName() const { return "guard_gallivant.txt"; } @@ -75,17 +75,17 @@ size_t GuardGallivant::getStartDirectionIndex() const return 2; } -char GuardGallivant::getStartChar() const +const char GuardGallivant::getStartChar() const { return '^'; } -char GuardGallivant::getVisitedChar() const +const char GuardGallivant::getVisitedChar() const { return 'X'; } -char GuardGallivant::getObstructionChar() const +const char GuardGallivant::getObstructionChar() const { return '#'; } diff --git a/src/HistorianHysteria.cpp b/src/HistorianHysteria.cpp index 411cd4a..cdb2df7 100644 --- a/src/HistorianHysteria.cpp +++ b/src/HistorianHysteria.cpp @@ -17,12 +17,12 @@ #include -std::string HistorianHysteria::getPuzzleName() const +const std::string HistorianHysteria::getPuzzleName() const { return "Day 1: Historian Hysteria"; } -std::string HistorianHysteria::getInputFileName() const +const std::string HistorianHysteria::getInputFileName() const { return "historian_hysteria.txt"; } diff --git a/src/HoofIt.cpp b/src/HoofIt.cpp index 011c1ab..2bde820 100644 --- a/src/HoofIt.cpp +++ b/src/HoofIt.cpp @@ -21,12 +21,12 @@ #include -std::string HoofIt::getPuzzleName() const +const std::string HoofIt::getPuzzleName() const { return "Day 10: Hoof It"; } -std::string HoofIt::getInputFileName() const +const std::string HoofIt::getInputFileName() const { return "hoof_it.txt"; } @@ -89,12 +89,12 @@ void HoofIt::finish() } } -char HoofIt::getTrailheadChar() const +const char HoofIt::getTrailheadChar() const { return '0'; } -char HoofIt::getTrailTopChar() const +const char HoofIt::getTrailTopChar() const { return '9'; } diff --git a/src/LanParty.cpp b/src/LanParty.cpp index 0246a0e..7d83fb1 100644 --- a/src/LanParty.cpp +++ b/src/LanParty.cpp @@ -15,12 +15,12 @@ #include -std::string LanParty::getPuzzleName() const +const std::string LanParty::getPuzzleName() const { return "Day 23: LAN Party"; } -std::string LanParty::getInputFileName() const +const std::string LanParty::getInputFileName() const { return "lan_party.txt"; } diff --git a/src/MullItOver.cpp b/src/MullItOver.cpp index d26b8ba..4492d7a 100644 --- a/src/MullItOver.cpp +++ b/src/MullItOver.cpp @@ -22,12 +22,12 @@ MullItOver::MullItOver() data_ } {} -std::string MullItOver::getPuzzleName() const +const std::string MullItOver::getPuzzleName() const { return "Day 3: Mull It Over"; } -std::string MullItOver::getInputFileName() const +const std::string MullItOver::getInputFileName() const { return "mull_it_over.txt"; } diff --git a/src/PrintQueue.cpp b/src/PrintQueue.cpp index 9f6f3bb..4968feb 100644 --- a/src/PrintQueue.cpp +++ b/src/PrintQueue.cpp @@ -36,12 +36,12 @@ PrintQueue::PrintQueue() } } -std::string PrintQueue::getPuzzleName() const +const std::string PrintQueue::getPuzzleName() const { return "Day 5: Print Queue"; } -std::string PrintQueue::getInputFileName() const +const std::string PrintQueue::getInputFileName() const { return "print_queue.txt"; } diff --git a/src/RedNosedReports.cpp b/src/RedNosedReports.cpp index 31f1663..31abc2d 100644 --- a/src/RedNosedReports.cpp +++ b/src/RedNosedReports.cpp @@ -19,12 +19,12 @@ #include #include -std::string RedNosedReports::getPuzzleName() const +const std::string RedNosedReports::getPuzzleName() const { return "Day 2: Red-Nosed Reports"; } -std::string RedNosedReports::getInputFileName() const +const std::string RedNosedReports::getInputFileName() const { return "red-nosed_reports.txt"; }