Remove YAGNI methods from performance systems

GridChunk: Remove getWorldBounds, markAllDirty, getVisibleChunks
- getWorldBounds: Chunk visibility handled by isVisible() instead
- markAllDirty: GridLayers uses per-cell markDirty() pattern
- getVisibleChunks: GridLayers computes visible range inline
- Keep dirtyChunks() for diagnostics

GridLayers: Remove getChunkCoords
- Trivial helper replaced by inline division throughout codebase

SpatialHash: Remove queryRect, totalEntities, cleanBucket
- queryRect: Exceeds #115 scope (only queryRadius required)
- totalEntities: Redundant with separate entity count tracking
- cleanBucket: Dead code - expired weak_ptrs cleaned during remove/update

All removals identified via cppcheck static analysis. Core functionality
of each system remains intact and actively used.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
John McCardle 2026-01-09 15:40:13 -05:00
commit b6eb70748a
6 changed files with 0 additions and 123 deletions

View file

@ -57,11 +57,6 @@ int GridLayer::getChunkIndex(int cell_x, int cell_y) const {
return cy * chunks_x + cx;
}
void GridLayer::getChunkCoords(int cell_x, int cell_y, int& chunk_x, int& chunk_y) const {
chunk_x = cell_x / CHUNK_SIZE;
chunk_y = cell_y / CHUNK_SIZE;
}
void GridLayer::getChunkBounds(int chunk_x, int chunk_y, int& start_x, int& start_y, int& end_x, int& end_y) const {
start_x = chunk_x * CHUNK_SIZE;
start_y = chunk_y * CHUNK_SIZE;