From 926f36758ad4335a69fd3aa9f7aa783bad81d404 Mon Sep 17 00:00:00 2001 From: ModoX Date: Thu, 6 Feb 2025 21:19:00 +0100 Subject: fix nopch * and use Position const& for polygon origin * aed08b8a82cd4c14a6831ace7e9c4065ce29c5a4 followup --- src/server/game/Maps/AreaBoundary.cpp | 3 ++- src/server/game/Maps/AreaBoundary.h | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/server/game/Maps/AreaBoundary.cpp b/src/server/game/Maps/AreaBoundary.cpp index 989c9957546..da1c70fda4b 100644 --- a/src/server/game/Maps/AreaBoundary.cpp +++ b/src/server/game/Maps/AreaBoundary.cpp @@ -17,6 +17,7 @@ #include "AreaBoundary.h" #include "Unit.h" +#include // ---== RECTANGLE ==--- RectangleBoundary::RectangleBoundary(float southX, float northX, float eastY, float westY, bool isInverted) : @@ -91,7 +92,7 @@ bool ZRangeBoundary::IsWithinBoundaryArea(Position const* pos) const } // ---== POLYGON ==--- -PolygonBoundary::PolygonBoundary(Position origin, std::vector&& vertices, bool isInverted /* = false*/) : +PolygonBoundary::PolygonBoundary(Position const& origin, std::vector&& vertices, bool isInverted /* = false*/) : AreaBoundary(isInverted), _origin(origin), _vertices(std::move(vertices)) { } bool PolygonBoundary::IsWithinBoundaryArea(Position const* pos) const diff --git a/src/server/game/Maps/AreaBoundary.h b/src/server/game/Maps/AreaBoundary.h index e650cb8b12a..b03dafb8776 100644 --- a/src/server/game/Maps/AreaBoundary.h +++ b/src/server/game/Maps/AreaBoundary.h @@ -153,7 +153,7 @@ class TC_GAME_API ZRangeBoundary : public AreaBoundary class TC_GAME_API PolygonBoundary : public AreaBoundary { public: - PolygonBoundary(Position origin, std::vector&& vertices, bool isInverted = false); + PolygonBoundary(Position const& origin, std::vector&& vertices, bool isInverted = false); protected: bool IsWithinBoundaryArea(Position const* pos) const override; -- cgit v1.2.3