mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-25 19:31:59 +01:00
fix nopch
* and use Position const& for polygon origin *aed08b8a82followup (cherry picked from commit926f36758a)
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user