Skip to content

style: normalize C/C++ formatting and remove obsolete commented logging#10

Open
Sgw32 wants to merge 1 commit into
masterfrom
codex/fix-indentations-and-cleanup-comments
Open

style: normalize C/C++ formatting and remove obsolete commented logging#10
Sgw32 wants to merge 1 commit into
masterfrom
codex/fix-indentations-and-cleanup-comments

Conversation

@Sgw32
Copy link
Copy Markdown
Owner

@Sgw32 Sgw32 commented Apr 7, 2026

Motivation

  • Normalize inconsistent indentation and formatting across the C/C++ codebase and remove obviously obsolete commented-out debug/logging lines to improve readability and maintainability.
  • Reduce noise from leftover debug comments (e.g. commented std::cout, printf, Ogre::LogManager::getSingleton().logMessage) while preserving functional code paths.

Description

  • Applied a project-wide formatting pass to C/C++ sources and headers using clang-format -i to standardize brace/spacing/wrapping across files.
  • Removed superfluous commented logging/debug patterns with a targeted script that deletes commented std::cout, printf/fprintf, and Ogre::LogManager log lines; kept non-obvious comments intact.
  • Minor manual tidy-ups where clang-format exposed small inconsistencies (whitespace, includes, simple function-body rewrites) across many modules; no algorithmic or API changes intended.
  • Changes touch a large portion of the tree (style-only) — examples include AIManager.*, Deferred* shaders/CP code, DotSceneLoader.*, Eliza.*, Display.* and many engine modules.

Testing

  • Ran the comment-cleanup script (Python) to remove obsolete commented logging; it reported files changed: 3 and completed successfully.
  • Ran clang-format -i $(rg --files -g '*.cpp' -g '*.cc' -g '*.c' -g '*.h' -g '*.hpp') to reformat source files; completed with no runtime errors.
  • Ran git diff --check to detect whitespace issues; no trailing-whitespace / index errors were reported.
  • Committed the changes with message: style: normalize indentation and remove obsolete commented logging (commit contains the style-only update across 293 files). All automated checks executed above succeeded.

If you want, I can produce a smaller, focused PR that only reformats a subset of modules or revert specific files that need manual review.


Codex Task

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