Skip to content

refactor(pathfinder): Remove unused function pathDestination#2308

Open
Caball009 wants to merge 2 commits intoTheSuperHackers:mainfrom
Caball009:remove_Pathfinder_pathDestination
Open

refactor(pathfinder): Remove unused function pathDestination#2308
Caball009 wants to merge 2 commits intoTheSuperHackers:mainfrom
Caball009:remove_Pathfinder_pathDestination

Conversation

@Caball009
Copy link

Function Pathfinder::pathDestination isn't used now nor in the first usable branch, so this PR removes it.

Fortunately, it wasn't used because there would likely be a bug due to the uninitialized coordinate variable here, same as Pathfinder::tightenPathCallback:

@Caball009 Caball009 added Minor Severity: Minor < Major < Critical < Blocker Gen Relates to Generals ZH Relates to Zero Hour Refactor Edits the code with insignificant behavior changes, is never user facing labels Feb 15, 2026
@greptile-apps
Copy link

greptile-apps bot commented Feb 15, 2026

Greptile Overview

Greptile Summary

Removed the unused Pathfinder::pathDestination function from both Generals and GeneralsMD codebases. This function was never called and contained a potential uninitialized variable bug similar to tightenPathCallback.

  • Removed function declaration from header files (4 lines total across both versions)
  • Removed 251-line function implementation from source files (502 lines total across both versions)
  • Verified no references to this function exist in the codebase

Confidence Score: 5/5

  • This PR is safe to merge with no risk
  • Removes dead code with no references in the codebase, preventing potential bugs from unused code paths
  • No files require special attention

Important Files Changed

Filename Overview
Generals/Code/GameEngine/Include/GameLogic/AIPathfind.h Removed unused pathDestination function declaration
Generals/Code/GameEngine/Source/GameLogic/AI/AIPathfind.cpp Removed unused 251-line pathDestination function implementation
GeneralsMD/Code/GameEngine/Include/GameLogic/AIPathfind.h Removed unused pathDestination function declaration
GeneralsMD/Code/GameEngine/Source/GameLogic/AI/AIPathfind.cpp Removed unused 251-line pathDestination function implementation

Last reviewed commit: 50dc090

@xezon xezon requested a review from Mauller February 15, 2026 09:30
@Mauller
Copy link

Mauller commented Feb 15, 2026

I will double check this again, the code appears unused, i believe it was an earlier implementation of what ended up split out into multiple functions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Gen Relates to Generals Minor Severity: Minor < Major < Critical < Blocker Refactor Edits the code with insignificant behavior changes, is never user facing ZH Relates to Zero Hour

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants