Core/Grids: Remove unneccessary constructors and operators from CoordPair and CellArea
This commit is contained in:
@@ -28,17 +28,8 @@ class WorldObject;
|
||||
|
||||
struct CellArea
|
||||
{
|
||||
CellArea() { }
|
||||
CellArea(CellCoord low, CellCoord high) : low_bound(low), high_bound(high) { }
|
||||
|
||||
bool operator!() const { return low_bound == high_bound; }
|
||||
|
||||
void ResizeBorders(CellCoord& begin_cell, CellCoord& end_cell) const
|
||||
{
|
||||
begin_cell = low_bound;
|
||||
end_cell = high_bound;
|
||||
}
|
||||
|
||||
CellCoord low_bound;
|
||||
CellCoord high_bound;
|
||||
};
|
||||
|
||||
@@ -100,21 +100,10 @@ typedef NGrid<MAX_NUMBER_OF_CELLS, WorldTypeMapContainer, GridTypeMapContainer>
|
||||
template<uint32 LIMIT>
|
||||
struct CoordPair
|
||||
{
|
||||
CoordPair(uint32 x=0, uint32 y=0)
|
||||
CoordPair(uint32 x, uint32 y)
|
||||
: x_coord(x), y_coord(y)
|
||||
{ }
|
||||
|
||||
CoordPair(const CoordPair<LIMIT> &obj)
|
||||
: x_coord(obj.x_coord), y_coord(obj.y_coord)
|
||||
{ }
|
||||
|
||||
CoordPair<LIMIT> & operator=(const CoordPair<LIMIT> &obj)
|
||||
{
|
||||
x_coord = obj.x_coord;
|
||||
y_coord = obj.y_coord;
|
||||
return *this;
|
||||
}
|
||||
|
||||
void dec_x(uint32 val)
|
||||
{
|
||||
if (x_coord > val)
|
||||
|
||||
Reference in New Issue
Block a user