Skip to content

Commit d27d648

Browse files
committed
fix: make worldToCell const to allow calls from const methods
1 parent 35544f7 commit d27d648

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Generals/Code/GameEngine/Include/GameLogic/PartitionManager.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1321,7 +1321,7 @@ class PartitionManager : public SubsystemInterface, public Snapshot
13211321
void getCellCenterPos(Int x, Int y, Real& xx, Real& yy);
13221322

13231323
// find the cell that covers the world coords (wx,wy) and return its coords.
1324-
void worldToCell(Real wx, Real wy, Int *cx, Int *cy);
1324+
void worldToCell(Real wx, Real wy, Int *cx, Int *cy) const;
13251325

13261326
// given a distance in world coords, return the number of cells needed to cover that distance (rounding up)
13271327
Int worldToCellDist(Real w);
@@ -1494,7 +1494,7 @@ class PartitionManager : public SubsystemInterface, public Snapshot
14941494
};
14951495

14961496
// -----------------------------------------------------------------------------
1497-
inline void PartitionManager::worldToCell(Real wx, Real wy, Int *cx, Int *cy)
1497+
inline void PartitionManager::worldToCell(Real wx, Real wy, Int *cx, Int *cy) const
14981498
{
14991499
*cx = REAL_TO_INT_FLOOR((wx - m_worldExtents.lo.x) * m_cellSizeInv);
15001500
*cy = REAL_TO_INT_FLOOR((wy - m_worldExtents.lo.y) * m_cellSizeInv);

0 commit comments

Comments
 (0)