Skip to content

Centralize platform/PS2SDK includes into platform_includes.h#80

Closed
NathanNeurotic wants to merge 5 commits into
mainfrom
codex/add-platform_includes.h-for-header-management
Closed

Centralize platform/PS2SDK includes into platform_includes.h#80
NathanNeurotic wants to merge 5 commits into
mainfrom
codex/add-platform_includes.h-for-header-management

Conversation

@NathanNeurotic

Copy link
Copy Markdown
Owner

Motivation

  • Reduce duplicated system and PS2SDK header includes across the codebase by centralizing them into a single wrapper header to simplify maintenance and static analysis.
  • Ensure the large list of platform headers is excluded from cppcheck by guarding with #ifndef __CPPCHECK__ so static analysis and PS2SDK builds behave correctly.
  • Preserve existing conditional compilation gates (e.g., PSX, HDD, FILEXIO, EE_SIO_DEBUG) so optional SDK headers remain visible only when intended.

Description

  • Added include/platform_includes.h which lists standard C and PS2SDK headers and is wrapped in #ifndef __CPPCHECK__ and include guards.
  • Replaced per-file system/SDK #include <...> lines with #include "platform_includes.h" across sources and headers, keeping local/project headers and their ordering unchanged.
  • Kept conditional includes (e.g., #ifdef PSX, #if defined(HDD) || defined(HDD_RUNTIME), #ifdef FILEXIO, #ifdef EE_SIO_DEBUG) inside the shared header so behavior remains the same per-target.
  • Updated ~24 files (sources and headers) to adopt the centralized include and adjusted a few headers to reference platform_includes.h where needed.

Testing

  • Performed a repository-wide search (rg "#include <" src include) to confirm system/SDK #include <...> occurrences were consolidated into platform_includes.h, and the search result shows only the new wrapper lines, indicating success.
  • No unit or build tests were executed as this is a header-only refactor.
  • Commit recorded: the change was committed with message Add platform include wrapper and 24 files updated.
  • No runtime behavior changes were introduced by these header-only edits.

Codex Task

@codacy-production

codacy-production Bot commented Jan 7, 2026

Copy link
Copy Markdown

Codacy's Analysis Summary

18 new issues (≤ 0 issue)
0 new security issue
0 complexity
0 duplications

Review Pull Request in Codacy →

AI Reviewer available: add the codacy-review label to get contextual insights without leaving GitHub.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant