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:
parent
ae27e7deee
commit
b6eb70748a
6 changed files with 0 additions and 123 deletions
|
|
@ -50,9 +50,6 @@ public:
|
|||
// Mark chunk as dirty
|
||||
void markDirty();
|
||||
|
||||
// Get pixel bounds of this chunk in world coordinates
|
||||
sf::FloatRect getWorldBounds(int cell_width, int cell_height) const;
|
||||
|
||||
// Check if chunk overlaps with viewport
|
||||
bool isVisible(float left_edge, float top_edge,
|
||||
float right_edge, float bottom_edge) const;
|
||||
|
|
@ -90,13 +87,6 @@ public:
|
|||
UIGridPoint& at(int x, int y);
|
||||
const UIGridPoint& at(int x, int y) const;
|
||||
|
||||
// Mark all chunks dirty (for full rebuild)
|
||||
void markAllDirty();
|
||||
|
||||
// Get chunks that overlap with viewport
|
||||
std::vector<GridChunk*> getVisibleChunks(float left_edge, float top_edge,
|
||||
float right_edge, float bottom_edge);
|
||||
|
||||
// Resize grid (rebuilds chunks)
|
||||
void resize(int new_grid_x, int new_grid_y);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue