From b5b9c95de160a97701777d37187de194d0b29e61 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sun, 2 Jan 2022 19:55:40 +0000 Subject: Replace include guard macros with pragma once --- game/activities/go.h | 5 +---- game/activities/idle.h | 5 +---- game/activity.h | 5 +---- game/activityOf.h | 5 +---- game/gamestate.h | 5 +---- game/network/link.h | 5 +---- game/network/network.h | 5 +---- game/network/rail.h | 5 +---- game/network/routeWalker.h | 5 +---- game/objective.h | 5 +---- game/objectives/freeroam.h | 5 +---- game/objectives/goto.h | 5 +---- game/orders.h | 5 +---- game/selectable.h | 5 +---- game/terrain.h | 5 +---- game/vehicles/linkHistory.h | 5 +---- game/vehicles/railVehicle.h | 5 +---- game/vehicles/railVehicleClass.h | 5 +---- game/vehicles/train.h | 5 +---- game/vehicles/vehicle.h | 5 +---- game/worldobject.h | 5 +---- 21 files changed, 21 insertions(+), 84 deletions(-) (limited to 'game') diff --git a/game/activities/go.h b/game/activities/go.h index 54af31b..701c13c 100644 --- a/game/activities/go.h +++ b/game/activities/go.h @@ -1,5 +1,4 @@ -#ifndef GO_H -#define GO_H +#pragma once #include "../activity.h" #include "../activityOf.h" @@ -12,5 +11,3 @@ public: std::optional dist; }; - -#endif diff --git a/game/activities/idle.h b/game/activities/idle.h index 902d014..fa9067d 100644 --- a/game/activities/idle.h +++ b/game/activities/idle.h @@ -1,10 +1,7 @@ -#ifndef IDLE_H -#define IDLE_H +#pragma once #include "../activityOf.h" class Idle : public Activity::Of { public: }; - -#endif diff --git a/game/activity.h b/game/activity.h index 44f8d6f..6ba3712 100644 --- a/game/activity.h +++ b/game/activity.h @@ -1,5 +1,4 @@ -#ifndef ACTIVITY_H -#define ACTIVITY_H +#pragma once #include #include @@ -29,5 +28,3 @@ public: virtual void doActivity(AC *, TickDuration) = 0; }; - -#endif diff --git a/game/activityOf.h b/game/activityOf.h index c245866..1fc82aa 100644 --- a/game/activityOf.h +++ b/game/activityOf.h @@ -1,5 +1,4 @@ -#ifndef ACTIVITYOF_H -#define ACTIVITYOF_H +#pragma once #include "activity.h" #include "vehicles/vehicle.h" @@ -13,5 +12,3 @@ template class Activity::Of : public Activity { } } }; - -#endif diff --git a/game/gamestate.h b/game/gamestate.h index 536c420..605aac4 100644 --- a/game/gamestate.h +++ b/game/gamestate.h @@ -1,5 +1,4 @@ -#ifndef GAMESTATE_H -#define GAMESTATE_H +#pragma once #include #include @@ -19,5 +18,3 @@ public: std::shared_ptr geoData; }; extern GameState * gameState; - -#endif diff --git a/game/network/link.h b/game/network/link.h index 16ae5f7..51c29ff 100644 --- a/game/network/link.h +++ b/game/network/link.h @@ -1,5 +1,4 @@ -#ifndef LINK_H -#define LINK_H +#pragma once #include #include @@ -88,5 +87,3 @@ public: Arc arc; }; LinkCurve::~LinkCurve() = default; - -#endif diff --git a/game/network/network.h b/game/network/network.h index 31fc744..3be7943 100644 --- a/game/network/network.h +++ b/game/network/network.h @@ -1,5 +1,4 @@ -#ifndef NETWORK_H -#define NETWORK_H +#pragma once #include "link.h" #include @@ -53,5 +52,3 @@ public: void render(const Shader &) const override; }; - -#endif diff --git a/game/network/rail.h b/game/network/rail.h index 47969d6..758beb6 100644 --- a/game/network/rail.h +++ b/game/network/rail.h @@ -1,5 +1,4 @@ -#ifndef RAILLINKS_H -#define RAILLINKS_H +#pragma once #include "chronology.hpp" #include "game/worldobject.h" @@ -58,5 +57,3 @@ public: private: void tick(TickDuration elapsed) override; }; - -#endif diff --git a/game/network/routeWalker.h b/game/network/routeWalker.h index d70103f..e0577ae 100644 --- a/game/network/routeWalker.h +++ b/game/network/routeWalker.h @@ -1,5 +1,4 @@ -#ifndef ROUTEWALKER_H -#define ROUTEWALKER_H +#pragma once #include "link.h" #include @@ -19,5 +18,3 @@ private: Solution bestSolution, currentSolution; float solutionLength; }; - -#endif diff --git a/game/objective.h b/game/objective.h index 5b3690e..617b8e9 100644 --- a/game/objective.h +++ b/game/objective.h @@ -1,5 +1,4 @@ -#ifndef OBJECTIVE_H -#define OBJECTIVE_H +#pragma once #include "activity.h" #include "network/link.h" @@ -21,5 +20,3 @@ public: Orders * orders; }; using ObjectivePtr = std::unique_ptr; - -#endif diff --git a/game/objectives/freeroam.h b/game/objectives/freeroam.h index 2cfdcfc..ef74eb7 100644 --- a/game/objectives/freeroam.h +++ b/game/objectives/freeroam.h @@ -1,5 +1,4 @@ -#ifndef FREEROAM_H -#define FREEROAM_H +#pragma once #include #include @@ -12,5 +11,3 @@ public: [[nodiscard]] ActivityPtr createActivity() const override; [[nodiscard]] Link::Next navigate(Link::Nexts::const_iterator, Link::Nexts::const_iterator) const override; }; - -#endif diff --git a/game/objectives/goto.h b/game/objectives/goto.h index 01e47ae..acd5e48 100644 --- a/game/objectives/goto.h +++ b/game/objectives/goto.h @@ -1,5 +1,4 @@ -#ifndef GOTO_H -#define GOTO_H +#pragma once #include #include @@ -18,5 +17,3 @@ private: Link::Nexts links; float startDist; }; - -#endif diff --git a/game/orders.h b/game/orders.h index cd72767..5ac0abf 100644 --- a/game/orders.h +++ b/game/orders.h @@ -1,5 +1,4 @@ -#ifndef ORDERS_H -#define ORDERS_H +#pragma once #include #include @@ -12,5 +11,3 @@ public: Objective * next(); }; using OrdersPtr = std::shared_ptr; - -#endif diff --git a/game/selectable.h b/game/selectable.h index c16246c..0104f3d 100644 --- a/game/selectable.h +++ b/game/selectable.h @@ -1,5 +1,4 @@ -#ifndef SELECTABLE_H -#define SELECTABLE_H +#pragma once #include #include @@ -12,5 +11,3 @@ public: [[nodiscard]] virtual bool intersectRay(const glm::vec3 &, const glm::vec3 &, glm::vec2 *, float *) const = 0; }; - -#endif diff --git a/game/terrain.h b/game/terrain.h index 4775dff..b13efb6 100644 --- a/game/terrain.h +++ b/game/terrain.h @@ -1,5 +1,4 @@ -#ifndef TERRAIN_H -#define TERRAIN_H +#pragma once #include "chronology.hpp" #include "collection.hpp" @@ -28,5 +27,3 @@ private: Collection meshes; std::shared_ptr grass, water; }; - -#endif diff --git a/game/vehicles/linkHistory.h b/game/vehicles/linkHistory.h index 31d0023..6944727 100644 --- a/game/vehicles/linkHistory.h +++ b/game/vehicles/linkHistory.h @@ -1,5 +1,4 @@ -#ifndef LINKHISTORY_H -#define LINKHISTORY_H +#pragma once #include #include @@ -17,5 +16,3 @@ private: std::vector links; float totalLen {0.F}; }; - -#endif diff --git a/game/vehicles/railVehicle.h b/game/vehicles/railVehicle.h index 55cb6a2..f52b154 100644 --- a/game/vehicles/railVehicle.h +++ b/game/vehicles/railVehicle.h @@ -1,5 +1,4 @@ -#ifndef RAILVEHICLE_H -#define RAILVEHICLE_H +#pragma once #include "gfx/renderable.h" #include "railVehicleClass.h" @@ -28,5 +27,3 @@ public: std::array bogies; }; using RailVehiclePtr = std::unique_ptr; - -#endif diff --git a/game/vehicles/railVehicleClass.h b/game/vehicles/railVehicleClass.h index fb881b9..8f82fd2 100644 --- a/game/vehicles/railVehicleClass.h +++ b/game/vehicles/railVehicleClass.h @@ -1,5 +1,4 @@ -#ifndef RAILVEHICLECLASS_H -#define RAILVEHICLECLASS_H +#pragma once #include "gfx/models/mesh.h" #include @@ -30,5 +29,3 @@ private: static float objectLength(ObjParser & o); }; using RailVehicleClassPtr = std::shared_ptr; - -#endif diff --git a/game/vehicles/train.h b/game/vehicles/train.h index c823aed..68f9fbf 100644 --- a/game/vehicles/train.h +++ b/game/vehicles/train.h @@ -1,5 +1,4 @@ -#ifndef TRAIN_H -#define TRAIN_H +#pragma once #include "chronology.hpp" #include "game/activities/go.h" // IWYU pragma: keep @@ -36,5 +35,3 @@ public: [[nodiscard]] Location getBogiePosition(float linkDist, float dist) const; }; - -#endif diff --git a/game/vehicles/vehicle.h b/game/vehicles/vehicle.h index 3ddeac5..24557b5 100644 --- a/game/vehicles/vehicle.h +++ b/game/vehicles/vehicle.h @@ -1,5 +1,4 @@ -#ifndef VEHICLE_H -#define VEHICLE_H +#pragma once #include "chronology.hpp" #include "linkHistory.h" @@ -29,5 +28,3 @@ protected: LinkHistory linkHist; }; using VehicleWPtr = std::weak_ptr; - -#endif diff --git a/game/worldobject.h b/game/worldobject.h index ba77cd0..994545b 100644 --- a/game/worldobject.h +++ b/game/worldobject.h @@ -1,5 +1,4 @@ -#ifndef WORLDOBJECT_H -#define WORLDOBJECT_H +#pragma once #include "chronology.hpp" #include @@ -13,5 +12,3 @@ public: virtual void tick(TickDuration elapsed) = 0; }; - -#endif -- cgit v1.2.3