Skip to content

Replacing the const uint32_t color values with static constexpr uint3…#1519

Closed
RealTimeChris wants to merge 1 commit intobrainboxdotcc:masterfrom
RealTimeChris:update-const-colors
Closed

Replacing the const uint32_t color values with static constexpr uint3…#1519
RealTimeChris wants to merge 1 commit intobrainboxdotcc:masterfrom
RealTimeChris:update-const-colors

Conversation

@RealTimeChris
Copy link
Copy Markdown
Member

Summary

Converts all color constants in the colors namespace to constexpr, enabling compile-time evaluation and optimization.

Changes

  • Added constexpr to all color constant declarations
  • No functional changes - purely optimization

Benefits

  • Compile-time evaluation: Colors used in constant expressions can now be computed at compile time
  • Dead code elimination: Unused color constants can be completely eliminated by the compiler
  • Better inlining: constexpr enables more aggressive compiler optimizations
  • Zero runtime cost: No performance impact, only improvements

Code change checklist

  • I have ensured that all methods and functions are fully documented using doxygen style comments.
  • My code follows the coding style guide.
  • I tested that my change works before raising the PR.
  • I have ensured that I did not break any existing API calls.
  • I have not built my pull request using AI, a static analysis tool or similar without any human oversight.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Dec 3, 2025

Thank you for your contribution, but PRs must be raised against the dev branch. Please log your pull request against the dev branch not master. You can also retarget this pull request, then reopen it.

@github-actions github-actions Bot closed this Dec 3, 2025
@github-actions github-actions Bot added documentation Improvements or additions to documentation code Improvements or additions to code. labels Dec 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

code Improvements or additions to code. documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant