summaryrefslogtreecommitdiff
path: root/game
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2022-01-02 19:55:40 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2022-01-02 19:55:40 +0000
commitb5b9c95de160a97701777d37187de194d0b29e61 (patch)
tree9acc47919f90b119ee6029266f565bd33e0c3630 /game
parentSeparate geographic data (GeoData) from its visual representation(s) (Terrain) (diff)
downloadilt-b5b9c95de160a97701777d37187de194d0b29e61.tar.bz2
ilt-b5b9c95de160a97701777d37187de194d0b29e61.tar.xz
ilt-b5b9c95de160a97701777d37187de194d0b29e61.zip
Replace include guard macros with pragma once
Diffstat (limited to 'game')
-rw-r--r--game/activities/go.h5
-rw-r--r--game/activities/idle.h5
-rw-r--r--game/activity.h5
-rw-r--r--game/activityOf.h5
-rw-r--r--game/gamestate.h5
-rw-r--r--game/network/link.h5
-rw-r--r--game/network/network.h5
-rw-r--r--game/network/rail.h5
-rw-r--r--game/network/routeWalker.h5
-rw-r--r--game/objective.h5
-rw-r--r--game/objectives/freeroam.h5
-rw-r--r--game/objectives/goto.h5
-rw-r--r--game/orders.h5
-rw-r--r--game/selectable.h5
-rw-r--r--game/terrain.h5
-rw-r--r--game/vehicles/linkHistory.h5
-rw-r--r--game/vehicles/railVehicle.h5
-rw-r--r--game/vehicles/railVehicleClass.h5
-rw-r--r--game/vehicles/train.h5
-rw-r--r--game/vehicles/vehicle.h5
-rw-r--r--game/worldobject.h5
21 files changed, 21 insertions, 84 deletions
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<float> 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<Idle> {
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 <game/worldobject.h>
#include <memory>
@@ -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<typename T> 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 <collection.hpp>
#include <memory>
@@ -19,5 +18,3 @@ public:
std::shared_ptr<GeoData> 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 <array>
#include <glm/glm.hpp>
@@ -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 <collection.hpp>
@@ -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 <set>
@@ -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<Objective>;
-
-#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 <game/activity.h>
#include <game/network/link.h>
@@ -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 <game/activity.h>
#include <game/network/link.h>
@@ -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 <collection.hpp>
#include <memory>
@@ -12,5 +11,3 @@ public:
Objective * next();
};
using OrdersPtr = std::shared_ptr<Orders>;
-
-#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 <glm/glm.hpp>
#include <special_members.hpp>
@@ -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<Mesh, false> meshes;
std::shared_ptr<Texture> 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 <game/network/link.h>
#include <utility>
@@ -17,5 +16,3 @@ private:
std::vector<WEntry> 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<Location, 2> bogies;
};
using RailVehiclePtr = std::unique_ptr<RailVehicle>;
-
-#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 <array>
@@ -30,5 +29,3 @@ private:
static float objectLength(ObjParser & o);
};
using RailVehicleClassPtr = std::shared_ptr<RailVehicleClass>;
-
-#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<Vehicle>;
-
-#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 <special_members.hpp>
@@ -13,5 +12,3 @@ public:
virtual void tick(TickDuration elapsed) = 0;
};
-
-#endif