Use method IsCoordValid() to replace explicit checks.
This commit is contained in:
@@ -39,7 +39,7 @@ template<class T, class CONTAINER>
|
||||
inline void
|
||||
Cell::Visit(const CellCoord& standing_cell, TypeContainerVisitor<T, CONTAINER> &visitor, Map &m) const
|
||||
{
|
||||
if (standing_cell.x_coord >= TOTAL_NUMBER_OF_CELLS_PER_MAP || standing_cell.y_coord >= TOTAL_NUMBER_OF_CELLS_PER_MAP)
|
||||
if (!standing_cell.IsCoordValid())
|
||||
return;
|
||||
|
||||
uint16 district = (District)this->data.Part.reserved;
|
||||
@@ -170,7 +170,7 @@ template<class T, class CONTAINER>
|
||||
inline void
|
||||
Cell::Visit(const CellCoord& standing_cell, TypeContainerVisitor<T, CONTAINER> &visitor, Map &m, float radius, float x_off, float y_off) const
|
||||
{
|
||||
if (standing_cell.x_coord >= TOTAL_NUMBER_OF_CELLS_PER_MAP || standing_cell.y_coord >= TOTAL_NUMBER_OF_CELLS_PER_MAP)
|
||||
if (!standing_cell.IsCoordValid())
|
||||
return;
|
||||
|
||||
//no jokes here... Actually placing ASSERT() here was good idea, but
|
||||
|
||||
Reference in New Issue
Block a user