Repository navigation
Convert to 'east const' standard for clang-format - #336
Open
Chuck Walbourn (walbourn) wants to merge 2 commits into
Open
Chuck Walbourn (walbourn) wants to merge 2 commits into
Chuck Walbourn (walbourn) wants to merge 2 commits into
Conversation
Chuck Walbourn (walbourn)
requested review from
Roland Shum (ShumWengSang) and
Scott Matloff (scm-xbox)
and removed request for
Roland Shum (ShumWengSang) and
Scott Matloff (scm-xbox)
November 3, 2026 22:00
Chuck Walbourn (walbourn)
marked this pull request as draft
November 3, 2026 22:00
Chuck Walbourn (walbourn)
force-pushed
the
eastconstformat
branch
from
November 3, 2026 22:01
f88182e to
a39ac1b
Compare
Collaborator
Author
|
Leaving this as a draft until I clear out some pending PRs. |
Chuck Walbourn (walbourn)
force-pushed
the
eastconstformat
branch
from
November 4, 2026 01:33
a39ac1b to
180da7a
Compare
Chuck Walbourn (walbourn)
marked this pull request as ready for review
November 4, 2026 01:34
Chuck Walbourn (walbourn)
requested review from
Roland Shum (ShumWengSang),
Jesse Natalie (jenatali) and
Scott Matloff (scm-xbox)
and
a balanced review from Copilot
November 4, 2026 01:35
There was a problem hiding this comment.
🟢 Approval recommended
The east-const formatting update has no active review issues.
No open issues 🎉
What changed in this PR
This PR adopts east-const formatting (T const rather than const T) across DirectXMesh library implementations, utilities, and Meshconvert. The changes preserve existing types and behavior.
Changes:
- Sets clang-format’s
QualifierAlignmenttoRight. - Repositions
constin declarations, parameters, return types, and casts throughout the affected C++ files.
| File | Description |
|---|---|
| Utilities/WaveFrontReader.h | Reformats reader constants and vertex parameters. |
| Utilities/FlexibleVertexFormat.h | Reformats vertex-format parameters and constants. |
| Meshconvert/MeshOBJ.cpp | Reformats OBJ import/export declarations and locals. |
| Meshconvert/Meshconvert.cpp | Reformats CLI strings, declarations, and constants. |
| Meshconvert/Mesh.h | Reformats mesh accessors and parameter types. |
| Meshconvert/Mesh.cpp | Reformats mesh operations and file I/O declarations. |
| Meshconvert/CMO.h | Reformats the default material declaration. |
| Meshconvert/CmdLineHelpers.h | Reformats command-line helper types and casts. |
| DirectXMesh/scoped.h | Reformats allocation sizes and deleted copy operations. |
| DirectXMesh/DirectXMeshWeldVertices.cpp | Reformats welding callback and point-representation parameters. |
| DirectXMesh/DirectXMeshVBWriter.cpp | Reformats vertex-buffer writer types and casts. |
| DirectXMesh/DirectXMeshVBReader.cpp | Reformats vertex-buffer reader types and casts. |
| DirectXMesh/DirectXMeshValidate.cpp | Reformats validation parameters and constants. |
| DirectXMesh/DirectXMeshUtil.cpp | Reformats utility parameters and layout constants. |
| DirectXMesh/DirectXMeshTangentFrame.cpp | Reformats tangent-frame parameters and constants. |
| DirectXMesh/DirectXMeshRemap.cpp | Reformats remapping parameters, constants, and casts. |
| DirectXMesh/DirectXMeshP.h | Reformats internal iterator constants and pointers. |
| DirectXMesh/DirectXMeshOptimizeTVC.cpp | Reformats face-optimization parameters and locals. |
| DirectXMesh/DirectXMeshOptimizeLRU.cpp | Reformats cache-optimization types and constants. |
| DirectXMesh/DirectXMeshOptimize.cpp | Reformats sorting and vertex-optimization parameters. |
| DirectXMesh/DirectXMeshNormals.cpp | Reformats normal-generation parameters and winding constants. |
| DirectXMesh/DirectXMeshletGenerator.cpp | Reformats meshlet helper types and generation parameters. |
| DirectXMesh/DirectXMeshGSAdjacency.cpp | Reformats geometry-shader adjacency parameters and constants. |
| DirectXMesh/DirectXMeshConcat.cpp | Reformats face and vertex offset constants. |
| DirectXMesh/DirectXMeshClean.cpp | Reformats mesh-cleaning constants and attribute parameters. |
| DirectXMesh/DirectXMeshAdjacency.cpp | Reformats adjacency parameters, constants, and casts. |
| .github/linters/.clang-format | Enables right-aligned qualifiers for east-const formatting. |
Review effort: Balanced
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
While the C++ standard suggests
const int xas the preferred standard, there are a number of reasons to preferint const x.This PR changes the clang-format to use "east const" style.
For more information, see http://slashslash.info/eastconst/