fix nopch
* and use Position const& for polygon origin
* aed08b8a82 followup
This commit is contained in:
@@ -17,6 +17,7 @@
|
|||||||
|
|
||||||
#include "AreaBoundary.h"
|
#include "AreaBoundary.h"
|
||||||
#include "Unit.h"
|
#include "Unit.h"
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
// ---== RECTANGLE ==---
|
// ---== RECTANGLE ==---
|
||||||
RectangleBoundary::RectangleBoundary(float southX, float northX, float eastY, float westY, bool isInverted) :
|
RectangleBoundary::RectangleBoundary(float southX, float northX, float eastY, float westY, bool isInverted) :
|
||||||
@@ -91,7 +92,7 @@ bool ZRangeBoundary::IsWithinBoundaryArea(Position const* pos) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
// ---== POLYGON ==---
|
// ---== 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)) { }
|
AreaBoundary(isInverted), _origin(origin), _vertices(std::move(vertices)) { }
|
||||||
|
|
||||||
bool PolygonBoundary::IsWithinBoundaryArea(Position const* pos) const
|
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
|
class TC_GAME_API PolygonBoundary : public AreaBoundary
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
PolygonBoundary(Position origin, std::vector<Position>&& vertices, bool isInverted = false);
|
PolygonBoundary(Position const& origin, std::vector<Position>&& vertices, bool isInverted = false);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
bool IsWithinBoundaryArea(Position const* pos) const override;
|
bool IsWithinBoundaryArea(Position const* pos) const override;
|
||||||
|
|||||||
Reference in New Issue
Block a user