From 9c2f87faf5aee8ffad825c05fce01766c65180dd Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Mon, 8 Mar 2021 19:51:08 +0000 Subject: Move TickDuration type into global scope --- application/main.cpp | 2 +- game/worldobject.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/application/main.cpp b/application/main.cpp index 6b22a68..c9caf74 100644 --- a/application/main.cpp +++ b/application/main.cpp @@ -107,7 +107,7 @@ public: while (isRunning) { processInputs(); const auto t_end = std::chrono::high_resolution_clock::now(); - const auto t_passed = std::chrono::duration_cast(t_end - t_start); + const auto t_passed = std::chrono::duration_cast(t_end - t_start); world.apply(&WorldObject::tick, t_passed); world.apply(&CameraController::updateCamera, &camera); diff --git a/game/worldobject.h b/game/worldobject.h index db69532..0340ac4 100644 --- a/game/worldobject.h +++ b/game/worldobject.h @@ -4,10 +4,10 @@ #include #include +using TickDuration = std::chrono::duration; + class WorldObject { public: - using TickDuration = std::chrono::duration; - WorldObject() = default; virtual ~WorldObject() = default; NO_COPY(WorldObject); -- cgit v1.2.3