diff options
author | ModoX <moardox@gmail.com> | 2025-02-06 21:19:00 +0100 |
---|---|---|
committer | ModoX <moardox@gmail.com> | 2025-02-06 21:19:00 +0100 |
commit | 926f36758ad4335a69fd3aa9f7aa783bad81d404 (patch) | |
tree | 20d575473a99556d358f0310bb94be4c9f522c0e /src/server/game/Maps | |
parent | aed08b8a82cd4c14a6831ace7e9c4065ce29c5a4 (diff) |
fix nopch
* and use Position const& for polygon origin
* aed08b8a82cd4c14a6831ace7e9c4065ce29c5a4 followup
Diffstat (limited to 'src/server/game/Maps')
-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; |