From 613c7e9bf3f437b7ee83908e3f1f77928addc196 Mon Sep 17 00:00:00 2001 From: Richard Fine Date: Sat, 5 Jan 2019 13:58:32 +0000 Subject: [PATCH] Introduce 'Direction' typedef Directions are used quite widely across the codebase, but right now we just use uint8_t for them. Defining a proper type makes the intention clearer. --- src/openrct2/world/Location.hpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/openrct2/world/Location.hpp b/src/openrct2/world/Location.hpp index 950a2937c6..a2de7fd2ef 100644 --- a/src/openrct2/world/Location.hpp +++ b/src/openrct2/world/Location.hpp @@ -129,10 +129,12 @@ struct TileCoordsXYZ int32_t x = 0, y = 0, z = 0; }; +typedef uint8_t Direction; + struct CoordsXYZD { int32_t x, y, z; - uint8_t direction; + Direction direction; bool isNull() const { @@ -143,7 +145,7 @@ struct CoordsXYZD struct TileCoordsXYZD { int32_t x, y, z; - uint8_t direction; + Direction direction; bool isNull() const {