Rename .h file extension to .hpp, and fix some include orderings

This commit is contained in:
2024-12-11 01:12:27 +01:00
parent f2126f6c7c
commit fa38fa695b
51 changed files with 73 additions and 71 deletions

View File

@@ -13,7 +13,7 @@
// You should have received a copy of the GNU General Public License along with
// this program. If not, see <http://www.gnu.org/licenses/>.
#include <aoc/CeresSearch.h>
#include <aoc/CeresSearch.hpp>
std::string CeresSearch::getPuzzleName() const
{

View File

@@ -13,7 +13,7 @@
// You should have received a copy of the GNU General Public License along with
// this program. If not, see <http://www.gnu.org/licenses/>.
#include <aoc/GuardGallivant.h>
#include <aoc/GuardGallivant.hpp>
std::string GuardGallivant::getPuzzleName() const
{

View File

@@ -15,7 +15,7 @@
#include <iostream>
#include <aoc/HistorianHysteria.h>
#include <aoc/HistorianHysteria.hpp>
std::string HistorianHysteria::getPuzzleName() const
{

View File

@@ -13,7 +13,7 @@
// You should have received a copy of the GNU General Public License along with
// this program. If not, see <http://www.gnu.org/licenses/>.
#include <aoc/LinesSolver.h>
#include <aoc/LinesSolver.hpp>
void LinesSolver::processDataLine(const std::string& line)
{

View File

@@ -13,7 +13,7 @@
// You should have received a copy of the GNU General Public License along with
// this program. If not, see <http://www.gnu.org/licenses/>.
#include <aoc/MullCharState.h>
#include <aoc/MullCharState.hpp>
MullCharState::MullCharState(const char expected)
: expected_{ expected }, successState_{}, failState_{} {}

View File

@@ -13,7 +13,7 @@
// You should have received a copy of the GNU General Public License along with
// this program. If not, see <http://www.gnu.org/licenses/>.
#include <aoc/MullData.h>
#include <aoc/MullData.hpp>
MullData::MullData()
: isEnabled_{ true }, factor1_{ 0 }, factor2_{ 0 }, part1_{ 0 }, part2_{ 0 } {};

View File

@@ -13,7 +13,7 @@
// You should have received a copy of the GNU General Public License along with
// this program. If not, see <http://www.gnu.org/licenses/>.
#include <aoc/MullDataState.h>
#include <aoc/MullDataState.hpp>
void MullDataState::setData(MullData& data)
{

View File

@@ -13,7 +13,7 @@
// You should have received a copy of the GNU General Public License along with
// this program. If not, see <http://www.gnu.org/licenses/>.
#include <aoc/MullDoOpenState.h>
#include <aoc/MullDoOpenState.hpp>
void MullDoOpenState::next(StringStateMachine* stateMachine)
{

View File

@@ -13,7 +13,7 @@
// You should have received a copy of the GNU General Public License along with
// this program. If not, see <http://www.gnu.org/licenses/>.
#include <aoc/MullEntryState.h>
#include <aoc/MullEntryState.hpp>
void MullEntryState::enter(StringStateMachine* stateMachine)
{

View File

@@ -13,7 +13,7 @@
// You should have received a copy of the GNU General Public License along with
// this program. If not, see <http://www.gnu.org/licenses/>.
#include <aoc/MullFactorState.h>
#include <aoc/MullFactorState.hpp>
MullFactorState::MullFactorState(const char expected, const int index)
: expected_{ expected }, index_{ index }, successState_{}, failState_{} {}

View File

@@ -13,8 +13,9 @@
// You should have received a copy of the GNU General Public License along with
// this program. If not, see <http://www.gnu.org/licenses/>.
#include <aoc/MullItOver.h>
#include <aoc/StringStateMachine.h>
#include <aoc/MullItOver.hpp>
#include <aoc/StringStateMachine.hpp>
MullItOver::MullItOver()
: Solver{}, data_{}, states_ {

View File

@@ -13,7 +13,7 @@
// You should have received a copy of the GNU General Public License along with
// this program. If not, see <http://www.gnu.org/licenses/>.
#include <aoc/MullStates.h>
#include <aoc/MullStates.hpp>
MullStates::MullStates(MullData& data)
{

View File

@@ -13,7 +13,7 @@
// You should have received a copy of the GNU General Public License along with
// this program. If not, see <http://www.gnu.org/licenses/>.
#include <aoc/MullToggleCloseState.h>
#include <aoc/MullToggleCloseState.hpp>
MullToggleCloseState::MullToggleCloseState(const bool isEnabler)
: isEnabler_{ isEnabler }, successState_{} {}

View File

@@ -13,7 +13,7 @@
// You should have received a copy of the GNU General Public License along with
// this program. If not, see <http://www.gnu.org/licenses/>.
#include <aoc/Point2.h>
#include <aoc/Point2.hpp>
const Point2 Point2::left{ -1, 0 };
const Point2 Point2::right{ 1, 0 };

View File

@@ -13,12 +13,12 @@
// You should have received a copy of the GNU General Public License along with
// this program. If not, see <http://www.gnu.org/licenses/>.
#include <aoc/PrintQueue.hpp>
#include <algorithm>
#include <sstream>
#include <vector>
#include <aoc/PrintQueue.h>
PrintQueue::PrintQueue()
: Solver{}, pageNoMapIndex_{ 0 }, isProcessingOrderingRules_{ true }, orderingRules_{}
{

View File

@@ -13,19 +13,20 @@
// You should have received a copy of the GNU General Public License along with
// this program. If not, see <http://www.gnu.org/licenses/>.
#include <aoc/Program.hpp>
#include <iostream>
#include <memory>
#include <aoc/Program.h>
#include <aoc/SolverEngine.h>
#include <aoc/SolverEngine.hpp>
// Solver implementations in day order.
#include <aoc/HistorianHysteria.h>
#include <aoc/RedNosedReports.h>
#include <aoc/MullItOver.h>
#include <aoc/CeresSearch.h>
#include <aoc/PrintQueue.h>
#include <aoc/GuardGallivant.h>
#include <aoc/HistorianHysteria.hpp>
#include <aoc/RedNosedReports.hpp>
#include <aoc/MullItOver.hpp>
#include <aoc/CeresSearch.hpp>
#include <aoc/PrintQueue.hpp>
#include <aoc/GuardGallivant.hpp>
void Program::run()
{

View File

@@ -13,12 +13,12 @@
// You should have received a copy of the GNU General Public License along with
// this program. If not, see <http://www.gnu.org/licenses/>.
#include <aoc/RedNosedReports.hpp>
#include <iostream>
#include <sstream>
#include <vector>
#include <aoc/RedNosedReports.h>
std::string RedNosedReports::getPuzzleName() const
{
return "Day 2: Red-Nosed Reports";

View File

@@ -13,7 +13,7 @@
// You should have received a copy of the GNU General Public License along with
// this program. If not, see <http://www.gnu.org/licenses/>.
#include <aoc/Solver.h>
#include <aoc/Solver.hpp>
Solver::Solver()
: part1{ 0 }, part2{ 0 } {}

View File

@@ -13,11 +13,11 @@
// You should have received a copy of the GNU General Public License along with
// this program. If not, see <http://www.gnu.org/licenses/>.
#include <aoc/SolverEngine.hpp>
#include <fstream>
#include <iostream>
#include <aoc/SolverEngine.h>
SolverEngine::SolverEngine(const std::vector<std::string>& inputPaths)
: inputPaths_{ inputPaths } {}

View File

@@ -13,7 +13,7 @@
// You should have received a copy of the GNU General Public License along with
// this program. If not, see <http://www.gnu.org/licenses/>.
#include <aoc/StringStateMachine.h>
#include <aoc/StringStateMachine.hpp>
StringStateMachine::StringStateMachine(const std::string& line, StringState& entryState)
{