diff options
author | ModoX <moardox@gmail.com> | 2025-02-06 21:19:00 +0100 |
---|---|---|
committer | Ovahlord <dreadkiller@gmx.de> | 2025-02-08 22:05:44 +0100 |
commit | 4c87e71f38781cef8d3a3d50eab545a4a5a80176 (patch) | |
tree | d1714c30a68420580adfc25cdb933e0375b9d6ad | |
parent | 68bdea005233d1ecf0589f76e5636b0a0fbfcaf8 (diff) |
fix nopch
* and use Position const& for polygon origin
* aed08b8a82cd4c14a6831ace7e9c4065ce29c5a4 followup
(cherry picked from commit 926f36758ad4335a69fd3aa9f7aa783bad81d404)
-rw-r--r-- | src/server/game/Maps/AreaBoundary.cpp | 3 | ||||
-rw-r--r-- | src/server/game/Maps/AreaBoundary.h | 2 |
2 files changed, 3 insertions, 2 deletions
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 <vector> // ---== 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<Position>&& vertices, bool isInverted /* = false*/) : +PolygonBoundary::PolygonBoundary(Position const& origin, std::vector<Position>&& 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<Position>&& vertices, bool isInverted = false); + PolygonBoundary(Position const& origin, std::vector<Position>&& vertices, bool isInverted = false); protected: bool IsWithinBoundaryArea(Position const* pos) const override; |