Skip to content

chore(player): Remove unused GameMessage argument from Player member functions#2669

Merged
xezon merged 2 commits intoTheSuperHackers:mainfrom
Caball009:chore_msg_game_message_fn_parameter
May 1, 2026
Merged

chore(player): Remove unused GameMessage argument from Player member functions#2669
xezon merged 2 commits intoTheSuperHackers:mainfrom
Caball009:chore_msg_game_message_fn_parameter

Conversation

@Caball009
Copy link
Copy Markdown

@Caball009 Caball009 commented Apr 30, 2026

This PR removes unused function parameter GameMessage* msg from functions Player::processSelectTeamGameMessage and Player::processAddTeamGameMessage.

TODO:

  • Replicate in Generals.

@Caball009 Caball009 added Minor Severity: Minor < Major < Critical < Blocker Gen Relates to Generals ZH Relates to Zero Hour labels Apr 30, 2026
@greptile-apps
Copy link
Copy Markdown

greptile-apps Bot commented Apr 30, 2026

Greptile Summary

Removes the unused GameMessage* msg parameter from Player::processSelectTeamGameMessage and Player::processAddTeamGameMessage in both Generals/ and GeneralsMD/ codebases. The parameter was passed at the call sites in GameLogicDispatch.cpp but never read inside the function bodies, so its removal is correct and complete across declarations, definitions, and call sites.

Confidence Score: 5/5

Safe to merge — mechanical parameter removal with no logic changes.

All six changed files are consistent: declarations, definitions, and call sites are updated in lock-step for both Generals and GeneralsMD. The removed parameter was provably unused in both function bodies. No logic, data flow, or behaviour is altered.

No files require special attention.

Important Files Changed

Filename Overview
Generals/Code/GameEngine/Include/Common/Player.h Declarations of processSelectTeamGameMessage and processAddTeamGameMessage updated to drop the unused GameMessage* parameter.
Generals/Code/GameEngine/Source/Common/RTS/Player.cpp Definitions of both functions updated to match the new signatures; parameter was confirmed unused inside both bodies.
Generals/Code/GameEngine/Source/GameLogic/System/GameLogicDispatch.cpp Call sites updated to omit the msg argument; surrounding dispatch logic is unchanged.
GeneralsMD/Code/GameEngine/Include/Common/Player.h Zero Hour counterpart declarations updated identically to the Generals/ header.
GeneralsMD/Code/GameEngine/Source/Common/RTS/Player.cpp Zero Hour counterpart definitions updated; both function bodies confirmed not to use the removed parameter.
GeneralsMD/Code/GameEngine/Source/GameLogic/System/GameLogicDispatch.cpp Zero Hour call sites updated to omit the msg argument; no other logic changes.

Sequence Diagram

sequenceDiagram
    participant GLD as GameLogicDispatch
    participant P as Player

    Note over GLD,P: Before PR
    GLD->>P: processSelectTeamGameMessage(hotkeyNum, msg)
    GLD->>P: processAddTeamGameMessage(hotkeyNum, msg)

    Note over GLD,P: After PR
    GLD->>P: processSelectTeamGameMessage(hotkeyNum)
    GLD->>P: processAddTeamGameMessage(hotkeyNum)
Loading

Reviews (2): Last reviewed commit: "Replicated in Generals." | Re-trigger Greptile

@xezon xezon changed the title chore(gamemessage): Remove unused parameter from Player member functions chore(player): Remove unused GameMessage parameter from Player member functions Apr 30, 2026
@Caball009
Copy link
Copy Markdown
Author

Replicated in Generals.

@xezon xezon changed the title chore(player): Remove unused GameMessage parameter from Player member functions chore(player): Remove unused GameMessage argument from Player member functions May 1, 2026
@xezon xezon merged commit 2896c82 into TheSuperHackers:main May 1, 2026
17 checks passed
@Caball009 Caball009 deleted the chore_msg_game_message_fn_parameter branch May 1, 2026 14:08
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 ZH Relates to Zero Hour

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants