Skip to content

refactor: drop stock from used functions, use delete instead of CloseHandle - #103

Merged
Rushaway merged 2 commits into
masterfrom
refactor/style-cleanup
Oct 20, 2026
Merged

Rushaway merged 2 commits into
masterfrom
refactor/style-cleanup

Conversation

@Rushaway

Copy link
Copy Markdown
Member

Summary

Style cleanup, no behavior change.

Changes

  • Drop stock from the 63 functions of CustomChatColors.sp. stock means "may be left out when unused", which only makes sense in an include; all of them are used, and the build would have warned if one were not.
  • CloseHandle(menu) becomes delete menu in the 16 menu handlers.
  • Remove 3 view_as<CCC_ColorType>(CCC_...Color) that cast an enum member to its own enum in Hook_UserMessage. The one on GetNativeCell is kept, it converts an int.

The changes are mechanical and were applied by script (one regex per category); the file diff is only the removed stock prefixes, the 16 handle closes and the 3 casts.

Testing

Compiled with spcomp 1.12.0.7255 against the same dependency set as CI, no warnings. Not exercised on a live server.

  • Open and close the main, tag, name, chat, current-settings and admin menus: no error in sm logs.

🤖 Generated with Claude Code

Copilot AI balanced review requested due to automatic review settings October 20, 2026 18:50

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@Rushaway
Rushaway merged commit b1f4314 into master Oct 20, 2026
9 checks passed
@Rushaway
Rushaway deleted the refactor/style-cleanup branch October 20, 2026 18:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants